I’m trying to develop my own smart meter reader using a Zigbee enabled Seeed ESP32C6 device.
Using the Arduino IDE, I’ve managed to load the light switch sketch (Zigbee_On_Off_Light) following the guide on the Seeed website, and got it talking nicely with HA through a Sonoff Zigbee USB Controller and Zigbee2MQTT. I can turn the LED on or off from HA or the Boot button on the ESP32 board (and HA will see it).
Next, and on the same board, I tried the Zigbee_Temperature_Sensor example which compiled and loaded with no problem but It’s not connecting to Zigbee properly.
So first I thought perhaps I needed to delete Light Switch device from Z2M. I did that and the (now) Temperature sensor device did connect but it’s come up as the Light Switch device again.
If I re-load the Light Switch sketch, it all works nicely again.
What am I missing? If anyone here has been through this can they help please?
In my experience this is something to do with z2m, as I’ve noticed the same. Even when (forcibly) removing a device, when pairing it again it will recognise it again as a previously deleted device and it will often show the previous “Exposes” UI (or sometimes a mix between old and new).
Sometimes it helps to reinterview the device once paired, or changing manufacturer/model.
I’m guessing it has something to do with the IEEE Address which looks unique to the board!
Update: I re-interviewed and then reconfigured. It now shows the right things in “Exposes” but in “State” the old attributes are still there as “null” along with the new things. ie