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

fix: implement workaround for some 500 series controllers replying with invalid callbacks in case of SUC route assignment failure #6370

Merged
merged 4 commits into from
Oct 5, 2023

Conversation

AlCalzone
Copy link
Member

@AlCalzone AlCalzone commented Oct 5, 2023

When assigning or deleting a SUC return route fails, some 500 series controllers reply with an invalid callback that triggers the "unresponsive controller" detection added in version 12, effectively causing a boot loop.

This PR adds a workaround that considers these non-matching callbacks a command failure, so they are no longer "missing".

fixes: #6363

@AlCalzone
Copy link
Member Author

@zwave-js-bot automerge

zwave-js-bot
zwave-js-bot previously approved these changes Oct 5, 2023
@zwave-js-bot zwave-js-bot enabled auto-merge (squash) October 5, 2023 18:31
@AlCalzone AlCalzone disabled auto-merge October 5, 2023 18:34
@AlCalzone
Copy link
Member Author

@zwave-js-bot automerge

@zwave-js-bot zwave-js-bot enabled auto-merge (squash) October 5, 2023 18:36
@AlCalzone AlCalzone changed the title fix: implement workaround for Aeotec Z-Stick Gen5 replying with invalid callbacks in case of SUC route assignment failure fix: implement workaround for some 500 series controllers replying with invalid callbacks in case of SUC route assignment failure Oct 5, 2023
@zwave-js-bot zwave-js-bot merged commit ae9a87b into master Oct 5, 2023
16 checks passed
@zwave-js-bot zwave-js-bot deleted the workaround-gen5-bug branch October 5, 2023 18:43
AlCalzone added a commit that referenced this pull request Oct 5, 2023
The `v12` release was supposed to increase reliability of Z-Wave JS, primarily by detecting situations where the controller was unable to transmit due to excessive RF noise or being unresponsive and automatically taking the necessary steps to recover.

Instead, it uncovered bugs and erratical behavior in the 500 series firmwares, which triggered the automatic recovery in situations where it was not necessary. In the worst case, this would cause Z-Wave JS to end up in an infinite loop or restart over and over.

This patch should fix and/or work around most (if not all) of these issues. Really sorry for the inconvenience!

### Bugfixes
* Fixed an infinite loop caused by assuming the controller was temporarily unable to transmit when when sending a command results in the transmit status `Fail` (#6361)
* Added a workaround to avoid a restart loop caused by 500 series controllers replying with invalid commands when assigning routes back to the controller (SUC) failed (#6370, #6372)
* Automatically recovering an unresponsive controller by restarting it or Z-Wave JS in case of a missing callback is now only done for `SendData` commands. Previously some commands which were expecting a specific command to be received from a node could also trigger this, even if that command was not technically a command callback. (#6373)
* Fixed an issue where rebuilding routes would throw an error because of calling the wrong method internally (#6362)
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.

Catch invalid callbacks with correct callbackID
2 participants