From c34760624536847487280411fa73a8d4bb0891ff Mon Sep 17 00:00:00 2001 From: AlCalzone Date: Tue, 4 Jan 2022 09:07:54 +0100 Subject: [PATCH] fix: ignore CC version 0 report for Version and Manufacturer Specific CC (#4029) --- .../src/lib/commandclass/VersionCC.ts | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/packages/zwave-js/src/lib/commandclass/VersionCC.ts b/packages/zwave-js/src/lib/commandclass/VersionCC.ts index 181bde0fd44a..adf790defa8a 100644 --- a/packages/zwave-js/src/lib/commandclass/VersionCC.ts +++ b/packages/zwave-js/src/lib/commandclass/VersionCC.ts @@ -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 {