Hello to all,
I have a problem relating to cluster reporting: I have a device, Window Covering Device, which acts as a router and I want to connect it to Alexa, which acts as Coordinator so I have no control over its messages.
What I observe is that the binding request is not sent by Alexa so the automatic reporting of the reportable attributes in the Window Covering cluster is not enabled: the attributes are ZB_ZCL_ATTR_WINDOW_COVERING_CURRENT_POSITION_LIFT_PERCENTAGE_ID and ZB_ZCL_ATTR_WINDOW_COVERING_CURRENT_POSITION_TILT_PERCENTAGE_ID.
It is a very serious and urgent problem, so i want to know:
1) If someone had faced a similar situation2) Is it still possible to enable reporting by sending a particular message from the router that I'm building? I had tried with the function that I found in this forum, zb_zcl_put_reporting_info, but it didn't work.
Thank you very much and have a nice day.
I think you can create the binding locally on your device, so if the reporting is configured to be sent, it will be sent.Try to use zb_apsme_bind_request to create binding locally from your device to coordinator.To configure reporting the device can send request to itself. If you use zb_zcl_set_attr_val to set cluster attributes values the stack should be informed about the change and sent the reporting if necessary.
If you can see the reports being sent by the stack, you're half way there.
Can you give me an example to see how and where can I use this function?
I used the function zb_zcl_set_attr_val
zb_apsme_bind_request() requires reference to the buffer containing request data zb_apsme_binding_req_t.There are two things which needs to be done: - get buffer to be passed to the function To allocate buffer use zb_buf_get_out_delayed(callback). Callback is called when the buffer is available and it's ID is passed as function argument. - put the structure inside the buffer - bufid is ID of the allocated buffer To get the pointer to the memory where the structure will be placed, use ZB_BUF_GET_PARAM zb_apsme_binding_req_t *p_aps_bind_req = ZB_BUF_GET_PARAM(bufid, zb_apsme_binding_req_t); //Fill the structure ZB_IEEE_ADDR_COPY(&p_aps_bind_req->src_addr.addr_long, &*your_device_ieee_addr*); p_aps_bind_req->src_endpoint = *your_device_endpoint*; p_aps_bind_req->clusterid = *your_cluster_id*; p_aps_bind_req->addr_mode = ZB_APS_ADDR_MODE_64_ENDP_PRESENT; ZB_IEEE_ADDR_COPY(&p_aps_bind_req->dst_addr.addr_long, &*coordinator_ieee_addr*); p_aps_bind_req->dst_endpoint = *coordinator_ep*; //Send the request zb_apsme_bind_request(bufid)As for the reporting, see CLI example as reference ("zcl subscribe on" command)
I tried this approach but I have a problem: the endpoint of my Coordinator is 0x00 so, when I tried to do binding from the device to the Coordinator, I saw the status of the binding being equal to:
Hi,Endpoint 0 is the endpoint on which the ZDO is present and probably your coordinator implements yet another endpoint.Try to use active_ep command from CLI to read if any other endpoint (other than 0) is present on your coordinator and if so, use that endpoint.