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: limit number of retries when sending a command results in the transmit status Fail #6361

Merged
merged 2 commits into from
Oct 4, 2023

Conversation

AlCalzone
Copy link
Member

The controller immediately responding with a transmit status of Fail usually means that it is unable to transmit due to being RF jammed. Apparently there are other, non-temporary reasons for this status, so our logic of permanently retrying would result in an infinite loop.

With this PR, commands in this situation are retried up to 5 times before giving up. This should resolve some of the issues users are experiencing in the v12 release.

@AlCalzone
Copy link
Member Author

@zwave-js-bot automerge

zwave-js-bot
zwave-js-bot previously approved these changes Oct 4, 2023
@zwave-js-bot zwave-js-bot enabled auto-merge (squash) October 4, 2023 11:25
@zwave-js-bot zwave-js-bot merged commit 05ac6fe into master Oct 4, 2023
16 checks passed
@zwave-js-bot zwave-js-bot deleted the no-infinite-fail-loop branch October 4, 2023 11:35
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.

2 participants