-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
strange behavior in reports (TZ-120) #27
Comments
Since you didn't get the period 30 seconds report and also didn't apply the rule of reportable change. It might be you didn't configure the report or bind correctly. |
Maybe I am not explaining myself correctly, the code I show is the switch code, therefore esp_zb_get_short_address() obtains the switch address. It is also configured correctly because in principle periodic reports are sent, when modifying the attribute with the esp_zb_zcl_set_attribute_val function the report stops working |
@diazmanuel Sorry for the late following up. If I understand correctly, you would like to set the configure report to switch and ask switch to send the report to gateway in period of 30 seconds or attribute change larger than 3. However, you got a report command which is less than 3 delta value nor in 30 seconds period first time, and later all future expected report command is stopped. Right? Firstly, for the work around solution, you could use Secondly, could you show me your code how do you register the custom attribute on switch side and how do you do the binding from switch to gateway, I'd like to see if there is any other issue. It might be some issue when we set |
If I understand correctly, you would like to set the configure report to switch and ask switch to send the report to gateway in period of 30 seconds or attribute change larger than 3. here is the code of the switch
In addition, the gateway makes a bind between the end device and the switch. when the end device reports to the switch, it increases the attribute and generates a report to the gateway |
@diazmanuel Hi, I have tried to duplicate most of your code on my side. And here are some results.
Again, for different behavior that you saw device stop reporting after |
@diazmanuel The latest release has been fixed the reportable_change type from uint16_t to void type. Please try it out. |
@likunqiao097304 with this change the strange behavior that it had disappeared, now it works correctly thanks |
I am currently working on the following system. A gateway that acts as a zigbee network coordinator, a device (switch) that handles multiple outputs, and a sensor device for each of these outputs. The coordinator is in charge of performing the binding between the different endpoints of the switch and the sensors. and the switch establishes a binding between itself and the gateway to report a custom cluster each time an output is activated from the sensor
When analyzing the system, I found an error in the behavior of the switch reports to the gateway. After binding the switch to the gateway, the reports are configured as follows
static void bind_cb(esp_zb_zdp_status_t zdo_status, void *user_ctx)
{
}
and the callback of the sensor device report is handle as follow:
static void esp_zb_dev_reporting_cb(esp_zb_zcl_addr_t *addr, uint8_t endpoint, uint16_t cluster_id, uint16_t attr_id, esp_zb_zcl_attr_type_t attr_type, void *value)
{
}
then the expected behavior of the system would be that the switch reports to the gateway every 30 seconds and when the switch receives a report from the sensor it increases the value of attribute 0 of the custom cluster 0XFFFE by 1, if the value increases exceeds what is established in the reports configuration (in this case 3) a new report should be produced from the switch to the gateway.
The real behavior was the following, in principle the switch reported every 30 seconds to the gateway as expected, but upon receiving the command from a sensor the callback of said report was triggered and increased the custom attribute, in theory the switch should not report to the gateway since the increase of said attribute was less than 3 compared to its original value but contrary to what was expected, the switch generated a report to the gateway ignoring the configuration condition (also verify that this report did not correspond to the periodic report every 30 seconds). In addition to having generated the report, it would seem that he deleted the configuration because from that moment on, periodic reports were no longer generated, nor were reports generated when modifying that attribute of the customized cluster again.
after that i try to force the reports after writing the attribute ,by modifying the callback of the incoming reports from the sensors as follows.
static void esp_zb_dev_reporting_cb(esp_zb_zcl_addr_t *addr, uint8_t endpoint, uint16_t cluster_id, uint16_t attr_id, esp_zb_zcl_attr_type_t attr_type, void *value)
{
}
The behavior was similar to the previous one, only this time every time a sensor report arrived, the switch modified the attribute and when forcing the report it was sent, but as in the previous case, the established configuration of the periodic report was ignored and the minimum value that said report will generate
I think writing the custom cluster attribute ignores and clears the report settings. I would like to know if this can be due to a bad behavior of the sdk or if I am doing the configuration wrong
thanks
The text was updated successfully, but these errors were encountered: