Skip to content
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

How to trigger ZCL attribute report send when attribute value changed internally? (TZ-52) #3

Closed
u236 opened this issue Feb 4, 2023 · 7 comments

Comments

@u236
Copy link

u236 commented Feb 4, 2023

Hello! Sorry for duplicate issue, but you've close previous too fast :)

I've successfully build HA_light_on_off example with some additions, such a led state control with button, and it works good. Attribute reporting, configured via "configure reporting" global command, works too, but i can't understand, how to trigger device to report led state attribute when it's changed with button?

I need for device send report, when led state changed with button, timer or other reason, but NOT zigbee command. I know how reporting works, but i don't understand how to tell zigbee stack about attrubute value was changed, to trigger report.

Please help me to figure it out :)

@github-actions github-actions bot changed the title How to rigger ZCL attribute report send when attribute value changed internally? How to rigger ZCL attribute report send when attribute value changed internally? (TZ-52) Feb 4, 2023
@jurriaan
Copy link

jurriaan commented Feb 4, 2023

Also curious about this, there is an attribute update api, esp_zb_cluster_update_attr, but it feels like it is to be used when setting up the clusters initially. Or should it also be used to update attributes on the fly?

@u236
Copy link
Author

u236 commented Feb 4, 2023

Also curious about this, there is an attribute update api, esp_zb_cluster_update_attr, but it feels like it is to be used when setting up the clusters initially. Or should it also be used to update attributes on the fly?

Thanks for your reply! I've try this api, but nothing changed, unfortunately. As far as I understand, this api just updates pointer to attribute value location.

@u236 u236 changed the title How to rigger ZCL attribute report send when attribute value changed internally? (TZ-52) How to trigger ZCL attribute report send when attribute value changed internally? (TZ-52) Feb 5, 2023
@likunqiao097304
Copy link
Contributor

Hello! Sorry for duplicate issue, but you've close previous too fast :)

I've successfully build HA_light_on_off example with some additions, such a led state control with button, and it works good. Attribute reporting, configured via "configure reporting" global command, works too, but i can't understand, how to trigger device to report led state attribute when it's changed with button?

I need for device send report, when led state changed with button, timer or other reason, but NOT zigbee command. I know how reporting works, but i don't understand how to tell zigbee stack about attrubute value was changed, to trigger report.

Please help me to figure it out :)

Sure, I am happy to work with you to figure it out. Correct me if I am wrong for your design: You have created a light-example zigbee local device and it could trigger by itself button, timer or other reason, so you'd like to set the attribute change in the stack and if you bind some other zigbee node with this attribute, it will report the changes to remotely.

For the update the certain attribute on the fly, we haven't provide API yet. We will provide it in the next round.

@likunqiao097304
Copy link
Contributor

Also curious about this, there is an attribute update api, esp_zb_cluster_update_attr, but it feels like it is to be used when setting up the clusters initially. Or should it also be used to update attributes on the fly?

esp_zb_cluster_update_attr is used for update the cluster initially for before you the device create. You could see the example:customized_server

@u236
Copy link
Author

u236 commented Feb 6, 2023

For the update the certain attribute on the fly, we haven't provide API yet. We will provide it in the next round.

Thank you, i'll wait for new features :)

@likunqiao097304
Copy link
Contributor

For the update the certain attribute on the fly, we haven't provide API yet. We will provide it in the next round.

Thank you, i'll wait for new features :)

The new API has provided in the latest release. esp_zb_zcl_set_attribute_val please take a look and close the issue if it works.

@u236
Copy link
Author

u236 commented Feb 13, 2023

The new API has provided in the latest release. esp_zb_zcl_set_attribute_val please take a look and close the issue if it works.

Now attribute reported, when i change led state via button and call esp_zb_zcl_set_attribute_val. Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants