Hi! I've started coding using VS Code with Espressif-IDF (5.5) SDK and want to write firmwares for ESP32-H2 based Zigbee End Devices (ZED). I have a Zigbee mesh at home (Home Assistant, using Z2M).
Can somebody lead me through the necessary steps? I've read fragments about clusters and endpoint etc. but i'm not shure what to use in which order and which SDK commands? I really like to learn this suff buttom up and so i would be very happy for some explanations.
As an example i'd like to create a firmware for an device implementing an on/off/dim function for a 1-color LED strip.
Newbee questions to start using ESP-IDF for Zigbee
-
lichurbagan
- Posts: 59
- Joined: Thu Nov 13, 2025 3:20 pm
Re: Newbee questions to start using ESP-IDF for Zigbee
To build a Zigbee end device firmware on ESP32-H2, you must first learn the Zigbee object hierarchy. A device has endpoints, endpoints host clusters, clusters expose attributes and commands. For a dimmer light, you need the Basic, Identify, On/Off, and Level Control clusters on one endpoint. In ESP-IDF 5.5 you enable Zigbee in menuconfig, then define your endpoint and clusters in code using the esp_zigbee APIs. Register a callback to handle On/Off and Level commands and map those to your LED GPIO and PWM. Use `esp_zb_init`, register your endpoint, attach your callback, then start the Zigbee main loop. Permit joining in Zigbee2MQTT so your device joins your Home Assistant mesh. Clusters must match standard IDs so Z2M recognizes your dimmer correctly. Debug with verbose logging and check that your device advertises the correct HA device type. For hardware reference and inspiration on modular home automation devices, you can look at a community project like the Universal Smart Home Modular Hub on PCBWay, which includes schematics and PCB files that help you understand board design and integration with wireless controllers:
*spam*
Once your basic firmware works, add attribute reporting, OTA support, and power management. This stepwise understanding helps you write maintainable, standard Zigbee code rather than just copying examples.
*spam*
Once your basic firmware works, add attribute reporting, OTA support, and power management. This stepwise understanding helps you write maintainable, standard Zigbee code rather than just copying examples.
-
nopnop2002
- Posts: 347
- Joined: Thu Oct 03, 2019 10:52 pm
- Contact:
Re: Newbee questions to start using ESP-IDF for Zigbee
ESP32C6 Zigbee Quick Start Guide.
Probably the same for ESP32H2.
https://wiki.seeedstudio.com/xiao_esp32c6_zigbee/
Probably the same for ESP32H2.
https://wiki.seeedstudio.com/xiao_esp32c6_zigbee/
Who is online
Users browsing this forum: Bing [Bot], YisouSpider and 15 guests