Skip to content

Commit

Permalink
fix: ignore CC version 0 report for Version and Manufacturer Specific…
Browse files Browse the repository at this point in the history
… CC (#4029)
  • Loading branch information
AlCalzone authored Jan 4, 2022
1 parent 69c3470 commit c347606
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions packages/zwave-js/src/lib/commandclass/VersionCC.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,24 @@ export class VersionCC extends CommandClass {
} (${num2hex(cc)}) in version ${supportedVersion}`;
} else {
// We were lied to - the NIF said this CC is supported, now the node claims it isn't
endpoint.removeCC(cc);
logMessage = ` does NOT support CC ${
CommandClasses[cc]
} (${num2hex(cc)})`;
// Make sure this is not a critical CC, which must be supported though
switch (cc) {
case CommandClasses.Version:
case CommandClasses["Manufacturer Specific"]:
logMessage = ` claims NOT to support CC ${
CommandClasses[cc]
} (${num2hex(
cc,
)}), but it must. Assuming the node supports version 1...`;
endpoint.addCC(cc, { version: 1 });
break;

default:
logMessage = ` does NOT support CC ${
CommandClasses[cc]
} (${num2hex(cc)})`;
endpoint.removeCC(cc);
}
}
this.driver.controllerLog.logNode(node.id, logMessage);
} else {
Expand Down

0 comments on commit c347606

Please sign in to comment.