Skip to content

Commit

Permalink
fix: don't mark node as dead when ConfigurationGet response is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
AlCalzone committed Sep 9, 2020
1 parent 446f508 commit 00718ee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
## __WORK IN PROGRESS__
-->

## 5.0.0-alpha.1 (2020-09-08)
## __WORK IN PROGRESS__
### Breaking changes
* The status `Alive` was added to the `NodeStatus` enumeration. The node status can no longer switch between all states, only between `Dead` and `Alive`, between `Asleep` and `Awake` and from and to `Unknown`.
* The `status` property on `ZWaveNode` is now readonly. To change the status, use the `markAsAsleep` and similar methods, which only change the status if it is legal to do so.
Expand Down
6 changes: 5 additions & 1 deletion packages/zwave-js/src/lib/commandclass/ConfigurationCC.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,11 @@ export class ConfigurationCCAPI extends CCAPI {
try {
const response = (await this.driver.sendCommand<
ConfigurationCCReport
>(cc, this.commandOptions))!;
>(cc, {
...this.commandOptions,
// Explicitly allow the node to send no response without marking it as dead
changeNodeStatusOnTimeout: false,
}))!;
// Nodes may respond with a different parameter, e.g. if we
// requested a non-existing one
if (response.parameter === parameter) {
Expand Down

0 comments on commit 00718ee

Please sign in to comment.