How to set up Zigbee attribute reporting
Posted: Tue Dec 19, 2023 10:51 pm
Environment: ESP32-H2 DEvKitM-1 V1.2; latest ESP-IDF and Zigbee library.
Using the HA_ON_OFF_LIGHT as the basis with a temperature measurement attribute and cluster added (to endpoint 2), I can connect to the coordinator successfully and it sees the switch and temperature value.
If I regularly call the esp_zb_zcl_write_attr_cmd_req() function I can update the temperature value in the coordinator.
However I can't find how to set up a reporting command (as per the Zigbee Cluster Library Section 2.5.7 (Revision 8, Dec 2019).
(Looking at the ZBOSS documentation, all of the example code snippets that provide use a callback function but I can't see anything similar on any of the ESP function calls.)
Can you please provide an example or code snippet of how this should be done?
Susan
Using the HA_ON_OFF_LIGHT as the basis with a temperature measurement attribute and cluster added (to endpoint 2), I can connect to the coordinator successfully and it sees the switch and temperature value.
If I regularly call the esp_zb_zcl_write_attr_cmd_req() function I can update the temperature value in the coordinator.
However I can't find how to set up a reporting command (as per the Zigbee Cluster Library Section 2.5.7 (Revision 8, Dec 2019).
(Looking at the ZBOSS documentation, all of the example code snippets that provide use a callback function but I can't see anything similar on any of the ESP function calls.)
Can you please provide an example or code snippet of how this should be done?
Susan