Hi,
I am trying to implement the attribute reporting for a zigbee dimmable light device, reporting to the coordinator.
The code is based on the zigbee\light_control example and I am using the function light_switch_send_on_off() in the light_switch example to send commands to the bulb. I have declared dimmable light attributes and clusters in the same way as light_bulb example.
I am using these two function to start the reporting for the on/off attribute and to check if it is working:
zb_err_code = zb_zcl_start_attr_reporting(HA_DIMMABLE_LIGHT_ENDPOINT, ZB_ZCL_CLUSTER_ID_ON_OFF, ZB_ZCL_CLUSTER_SERVER_ROLE, ZB_ZCL_ATTR_ON_OFF_ON_OFF_ID); attr_reporting = zcl_is_attr_reported(HA_DIMMABLE_LIGHT_ENDPOINT, ZB_ZCL_CLUSTER_ID_ON_OFF, ZB_ZCL_CLUSTER_SERVER_ROLE, ZB_ZCL_ATTR_ON_OFF_ON_OFF_ID);
but the first function returns an error code while the second returns 0. How can I solve this?
Maybe the reason is that I have not configured the report. In that case, can you explained me how to do? I have read this page but I couldn't understand how can I do:
Thank you in advance.
Laura