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

Z-Stack: Rewrite device entry in the coordinator's child table if sending fails #680

Merged
merged 3 commits into from
Mar 19, 2023

Conversation

slugzero
Copy link
Contributor

I finally found a workaround for the Z-Stack firmware bug I mentioned in Koenkk/zigbee2mqtt#13478 (comment): I could bring the controller to properly sending the PENDING flag again by rewriting the child entry in the controller child table.

This PR adds this workaround to zigbee-herdsman. Since it is really hard to thoroughly test these kinds of issues (the devices work fine for up to several days before the issue occurs), I designed the fix as unintrusive as possible. It will only jump in if a device does not respond to a message, the affected device is still in the coordinator's child table and the device is known to the coordinator as a sleepy end device.

Together with my previous PR, this should fix Koenkk/zigbee2mqtt#13478 and Koenkk/zigbee2mqtt#16376 and potentially others. I believe there are still a few remaining issues with the pending message queue, but they should now be non-permanent and not require re-pairing or restarting the coordinator any more.

Sometimes the coordinator stops setting the PENDING flag before sending frames to sleepy end devices.
Rewriting the device entry in the child table seems to fix this, at least temporarily.
If sending a frame fails, try to rewrite the device's entry and try again
(if there is already an entry, and only if the device is listed as a sleepy end device, aka CHILD_RFD)
@slugzero slugzero marked this pull request as draft March 17, 2023 21:19
@slugzero slugzero marked this pull request as ready for review March 17, 2023 21:56
@Koenkk
Copy link
Owner

Koenkk commented Mar 18, 2023

This looks very promising, many thanks for diving into this! 🏅

@Koenkk Koenkk merged commit 181ec08 into Koenkk:master Mar 19, 2023
@Koenkk
Copy link
Owner

Koenkk commented Mar 19, 2023

Thanks! 🚀

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

Successfully merging this pull request may close these issues.

Popp/Danfoss TRVs become unresponsive with CC2652P
2 participants