Thanks to this wonderful post, I was able to add one of the esp-matter
C++ examples (light
) to my Home and control it (I had started with the C++ examples from Espressif because I didn’t realize there were Swift examples). But I have a couple of questions.
After adding this device, I see it is a WiFi client on my network. I'd prefer to use Thread, and I'm fairly sure the ESP32-C6 supports Thread, but I don’t know how to make it happen.
-
Does a Matter device built with the ESP-IDF and Matter SDKs automatically support both WiFi and Thread? That would seem to be the promise of Matter, in that I think a device is supposed to be able to be integrated into either network type. I have a HomePod Mini that should be able to be a hub.
-
If so, how do I tell the Home app to connect over Thread instead of WiFI?
-
If not, what do I need to look for in the Swift or C++ APIs to make it be a Thread device?
Another question:
- Where does the pairing code 2020-2021 come from? In the ESP Matter docs, it's specified on the command line when you use the
chip-tool
command line tool to start commissioning (I was never able to get this to work though). I had to flash-erase and re-flash my device to get it to work, but I never ranchip-tool
again, so I don't know why it worked to use 2020-2021.
How does the Swift smart-light example know to use this code?
Edit: It seems it’s a default in theconnectedhomeip
SDK, but please confirm.
Thanks so much for these examples!