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

feat: abort Send Data commands early after timeout, reduce callback timeout #6411

Merged
merged 2 commits into from
Oct 17, 2023

Conversation

AlCalzone
Copy link
Member

for #6402

This PR introduces an additional timeout for Send Data commands. If this elapses while waiting for a callback, the transmission gets aborted. The driver will still wait for the callback, but unless the controller is actually unresponsive, this should now come relatively quickly.

The default for this is 20 seconds and the callback timeout has been lowered from 65 seconds to 30 seconds. While the specs explicitly mention the 65 seconds, waiting this long has shown to cause problems when nodes are reporting and expect a response.
Some commercial hubs abort around 8-10 seconds, but that seems a tad too low. I may revisit this timeout though.

This change may alleviate some of the issues with unresponsive controllers, assuming they'll honor the abort request and eventually send the callback. If not, the recovery now kicks in faster.

@AlCalzone
Copy link
Member Author

@zwave-js-bot automerge

zwave-js-bot
zwave-js-bot previously approved these changes Oct 17, 2023
@zwave-js-bot zwave-js-bot enabled auto-merge (squash) October 17, 2023 12:11
@zwave-js-bot zwave-js-bot merged commit b687c16 into master Oct 17, 2023
@zwave-js-bot zwave-js-bot deleted the abort-send-data-early branch October 17, 2023 12:25
AlCalzone added a commit that referenced this pull request Oct 17, 2023
This release includes several more fixes and workarounds for the problematic interaction between some controller firmware bugs and the automatic controller recovery introduced in the `v12` release:
* Added a workaround to recognize corrupted `ACK` frames after soft-reset of controllers running an 7.19.x firmware or higher. Previously this triggered the unresponsive controller detection and recovery process. (#6409)
* When the response to a `Send Data` command times out, the command is now aborted, instead of retrying and potentially putting the controller in a bad state due to not waiting for the command cycle to complete. When this happens, Z-Wave JS no longer attempts to recover the controller by restarting it, unless the callback is also missing. (#6408)
* When the callback to a `Send Data` command continues to be missing after restarting the controller, Z-Wave JS no longer restarts itself. Instead the old behavior of marking the node as `dead` is now restored, as the node being unresponsive/unreachable is most likely the actual problem. (#6403)
* In addition, the `Send Data` callback timeout has been reduced to 30 seconds and ongoing transmissions are now aborted before reaching this timeout. This should limit the impact of the controller taking excessively long to transmit, especially in busy networks with lots of unsolicited reporting and end nodes expecting a timely response (#6411)

### Features
* The `Driver` constructor now accepts multiple sets of options and curated presets are available (#6412)

### Additional Bugfixes
* Only auto-refresh `Meter` and `Multilevel Sensor CC` values if none were updated recently (#6398)
* Export all option types for `Configuration CC` (#6413)

### Config file changes
* Add NEO Cool Cam Repeater (#6332)
* Increase report timeout for Aeotec Multisensor 6 to 2s (#6397)
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