zwave-js 15.20.0 → 15.20.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
- export declare const PACKAGE_VERSION = "15.20.0";
1
+ export declare const PACKAGE_VERSION = "15.20.1";
2
2
  export declare const PACKAGE_NAME = "zwave-js";
3
3
  //# sourceMappingURL=_version.d.ts.map
@@ -22,7 +22,7 @@ __export(version_exports, {
22
22
  PACKAGE_VERSION: () => PACKAGE_VERSION
23
23
  });
24
24
  module.exports = __toCommonJS(version_exports);
25
- const PACKAGE_VERSION = "15.20.0";
25
+ const PACKAGE_VERSION = "15.20.1";
26
26
  const PACKAGE_NAME = "zwave-js";
27
27
  // Annotate the CommonJS export names for ESM import in node:
28
28
  0 && (module.exports = {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/lib/_version.ts"],
4
- "sourcesContent": ["// This file is auto-generated by the codegen maintenance script\nexport const PACKAGE_VERSION = \"15.20.0\";\nexport const PACKAGE_NAME = \"zwave-js\";\n"],
4
+ "sourcesContent": ["// This file is auto-generated by the codegen maintenance script\nexport const PACKAGE_VERSION = \"15.20.1\";\nexport const PACKAGE_NAME = \"zwave-js\";\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;AAAA;;;;;;AACO,MAAM,kBAAkB;AACxB,MAAM,eAAe;",
6
6
  "names": []
7
7
  }
@@ -129,9 +129,12 @@ class DeviceConfigMixin extends import_FirmwareUpdate.FirmwareUpdateMixin {
129
129
  this._currentDeviceConfigHash = await this.deviceConfig.getHash(1);
130
130
  } else {
131
131
  if (this.cachedDeviceConfigHash) {
132
- const versionString = import_shared.Bytes.view(this.cachedDeviceConfigHash).toString("utf8").match(/^\$v(\d+)\$/)?.[1];
133
- if (versionString) {
134
- cachedHashVersion = parseInt(versionString, 10);
132
+ const parsed = (0, import_config.parseDeviceConfigHash)(this.cachedDeviceConfigHash);
133
+ if (parsed) {
134
+ cachedHashVersion = parsed.version;
135
+ }
136
+ if (parsed?.version === 2) {
137
+ this.cachedDeviceConfigHash = await (0, import_config.fixBrokenDeviceConfigHash)(this.cachedDeviceConfigHash);
135
138
  }
136
139
  }
137
140
  this._currentDeviceConfigHash = await this.deviceConfig.getHash(cachedHashVersion);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/lib/node/mixins/80_DeviceConfig.ts"],
4
- "sourcesContent": ["import { refreshMetadataStringsFromConfigFile } from \"@zwave-js/cc/ConfigurationCC\";\nimport { DeviceConfig } from \"@zwave-js/config\";\nimport { InterviewStage, type MaybeNotKnown, NOT_KNOWN } from \"@zwave-js/core\";\nimport { Bytes, type BytesView, formatId } from \"@zwave-js/shared\";\nimport { cacheKeys } from \"../../driver/NetworkCache.js\";\nimport { FirmwareUpdateMixin } from \"./70_FirmwareUpdate.js\";\n\nexport interface NodeDeviceConfig {\n\t/**\n\t * Contains additional information about this node, loaded from a config file\n\t */\n\tget deviceConfig(): MaybeNotKnown<DeviceConfig>;\n\n\t/**\n\t * Returns the manufacturer/brand name defined in the device configuration,\n\t * or looks it up from the manufacturer database if no config is available\n\t */\n\tget manufacturer(): MaybeNotKnown<string>;\n\n\t/**\n\t * Returns the device label defined in the device configuration.\n\t */\n\tget label(): MaybeNotKnown<string>;\n\n\tget deviceDatabaseUrl(): MaybeNotKnown<string>;\n\n\t/**\n\t * Returns whether the device config for this node has changed since the last interview.\n\t * If it has, the node likely needs to be re-interviewed for the changes to be picked up.\n\t */\n\thasDeviceConfigChanged(): MaybeNotKnown<boolean>;\n\n\t/**\n\t * @internal\n\t * The hash of the device config that was applied during the last interview.\n\t */\n\tget cachedDeviceConfigHash(): BytesView | undefined;\n\n\t/**\n\t * @internal\n\t * The hash of the currently used device config\n\t */\n\tget currentDeviceConfigHash(): BytesView | undefined;\n}\n\nexport abstract class DeviceConfigMixin extends FirmwareUpdateMixin\n\timplements NodeDeviceConfig\n{\n\tprivate _deviceConfig: DeviceConfig | undefined;\n\t/**\n\t * Contains additional information about this node, loaded from a config file\n\t */\n\tpublic get deviceConfig(): MaybeNotKnown<DeviceConfig> {\n\t\treturn this._deviceConfig;\n\t}\n\tprotected set deviceConfig(value: MaybeNotKnown<DeviceConfig>) {\n\t\tthis._deviceConfig = value;\n\t}\n\n\t/**\n\t * Returns the manufacturer/brand name defined in the device configuration,\n\t * or looks it up from the manufacturer database if no config is available\n\t */\n\tpublic get manufacturer(): MaybeNotKnown<string> {\n\t\tif (this._deviceConfig) return this._deviceConfig.manufacturer;\n\t\tif (this.manufacturerId != undefined) {\n\t\t\treturn this.driver.lookupManufacturer(this.manufacturerId);\n\t\t}\n\t}\n\n\t/**\n\t * Returns the device label defined in the device configuration.\n\t */\n\tpublic get label(): MaybeNotKnown<string> {\n\t\treturn this._deviceConfig?.label;\n\t}\n\n\tpublic get deviceDatabaseUrl(): MaybeNotKnown<string> {\n\t\tif (\n\t\t\tthis.manufacturerId != undefined\n\t\t\t&& this.productType != undefined\n\t\t\t&& this.productId != undefined\n\t\t) {\n\t\t\tconst manufacturerId = formatId(this.manufacturerId);\n\t\t\tconst productType = formatId(this.productType);\n\t\t\tconst productId = formatId(this.productId);\n\t\t\tconst firmwareVersion = this.firmwareVersion || \"0.0\";\n\t\t\treturn `https://devices.zwave-js.io/?jumpTo=${manufacturerId}:${productType}:${productId}:${firmwareVersion}`;\n\t\t}\n\t}\n\n\t/**\n\t * Returns whether the device config for this node has changed since the last interview.\n\t * If it has, the node likely needs to be re-interviewed for the changes to be picked up.\n\t */\n\tpublic hasDeviceConfigChanged(): MaybeNotKnown<boolean> {\n\t\t// We can't know if the node is not fully interviewed\n\t\tif (this.interviewStage !== InterviewStage.Complete) return NOT_KNOWN;\n\n\t\t// The controller cannot be re-interviewed\n\t\tif (this.isControllerNode) return false;\n\n\t\t// If the hash was never stored, we can only (very likely) know if the config has not changed\n\t\tif (this.cachedDeviceConfigHash == undefined) {\n\t\t\treturn this.deviceConfig == undefined ? false : NOT_KNOWN;\n\t\t}\n\n\t\t// If it was, a change in hash means the config has changed.\n\t\t// We handle the different hash versions when loading the config already.\n\t\tif (this._currentDeviceConfigHash) {\n\t\t\treturn !DeviceConfig.areHashesEqual(\n\t\t\t\tthis._currentDeviceConfigHash,\n\t\t\t\tthis.cachedDeviceConfigHash,\n\t\t\t);\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * @internal\n\t * The hash of the device config that was applied during the last interview.\n\t */\n\tpublic get cachedDeviceConfigHash(): BytesView | undefined {\n\t\treturn this.driver.cacheGet(cacheKeys.node(this.id).deviceConfigHash);\n\t}\n\n\tprotected set cachedDeviceConfigHash(value: BytesView | undefined) {\n\t\tthis.driver.cacheSet(cacheKeys.node(this.id).deviceConfigHash, value);\n\t}\n\n\tprivate _currentDeviceConfigHash: BytesView | undefined;\n\t/**\n\t * @internal\n\t * The hash of the currently used device config\n\t */\n\tpublic get currentDeviceConfigHash(): BytesView | undefined {\n\t\treturn this._currentDeviceConfigHash;\n\t}\n\tprotected set currentDeviceConfigHash(value: BytesView | undefined) {\n\t\tthis._currentDeviceConfigHash = value;\n\t}\n\n\t/**\n\t * Loads the device configuration for this node from a config file\n\t */\n\tprotected async loadDeviceConfig(): Promise<void> {\n\t\t// But the configuration definitions might change\n\t\tif (\n\t\t\tthis.manufacturerId == undefined\n\t\t\t|| this.productType == undefined\n\t\t\t|| this.productId == undefined\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Try to load the config file\n\t\tthis.deviceConfig = await this.driver.configManager.lookupDevice(\n\t\t\tthis.manufacturerId,\n\t\t\tthis.productType,\n\t\t\tthis.productId,\n\t\t\tthis.firmwareVersion,\n\t\t\tthis.sdkVersion,\n\t\t);\n\n\t\tif (!this.deviceConfig) {\n\t\t\tthis.driver.controllerLog.logNode(\n\t\t\t\tthis.id,\n\t\t\t\t\"No device config found\",\n\t\t\t\t\"warn\",\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\t// We need to remember the hash of the device config here, because we're in an async context\n\t\t// and later comparisons are sync.\n\n\t\t// There are two legacy versions of the device config hash:\n\t\t// - 16 byte MD5 hash\n\t\t// - 32 byte SHA-256 hash\n\t\t// Both only support checking for exact equality of the config hashable.\n\t\t// To be able to compare those stored hashes with the current config,\n\t\t// we need to figure out the stored version now and hash the config using\n\t\t// the same version.\n\t\t// New \"hashes\" are variable length, contain a condensed version of the device config and are prefixed with a version number.\n\n\t\tconst versionPrefix = Bytes.from(\"$v\", \"utf8\");\n\t\tconst hasVersionPrefix = !!this.cachedDeviceConfigHash\n\t\t\t&& Bytes\n\t\t\t\t.view(this.cachedDeviceConfigHash.subarray(0, 2))\n\t\t\t\t.equals(versionPrefix);\n\t\tlet cachedHashVersion: number | undefined;\n\n\t\tif (\n\t\t\tthis.cachedDeviceConfigHash?.length === 16\n\t\t\t&& !hasVersionPrefix\n\t\t) {\n\t\t\t// MD5 = version 0\n\t\t\tcachedHashVersion = 0;\n\t\t\tthis._currentDeviceConfigHash = await this.deviceConfig\n\t\t\t\t.getHash(0);\n\t\t} else if (\n\t\t\tthis.cachedDeviceConfigHash?.length === 32\n\t\t\t&& !hasVersionPrefix\n\t\t) {\n\t\t\t// SHA-256 = version 1\n\t\t\tcachedHashVersion = 1;\n\t\t\tthis._currentDeviceConfigHash = await this.deviceConfig\n\t\t\t\t.getHash(1);\n\t\t} else {\n\t\t\t// Variable length prefixed hash - determine the hash version from the cache\n\t\t\tif (this.cachedDeviceConfigHash) {\n\t\t\t\tconst versionString = Bytes.view(\n\t\t\t\t\tthis.cachedDeviceConfigHash,\n\t\t\t\t).toString(\"utf8\").match(/^\\$v(\\d+)\\$/)?.[1];\n\t\t\t\tif (versionString) {\n\t\t\t\t\tcachedHashVersion = parseInt(versionString, 10);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Use that version for comparison purposes if possible\n\t\t\tthis._currentDeviceConfigHash = await this.deviceConfig.getHash(\n\t\t\t\tcachedHashVersion as any,\n\t\t\t);\n\t\t\t// default to requiring an upgrade if the version cannot be parsed\n\t\t\tcachedHashVersion ??= 0;\n\t\t}\n\n\t\t// Update the cached device config hash to the most recent version upon restoring,\n\t\t// if the node was previously interviewed and the device config has not changed\n\t\t// since then.\n\t\tif (this.interviewStage === InterviewStage.Complete) {\n\t\t\tif (\n\t\t\t\tcachedHashVersion < DeviceConfig.maxHashVersion\n\t\t\t\t&& this.hasDeviceConfigChanged() === false\n\t\t\t) {\n\t\t\t\tthis.cachedDeviceConfigHash = await this.deviceConfig.getHash();\n\t\t\t\t// Also update the current hash to the new version, in case\n\t\t\t\t// it was previously generated with an older version\n\t\t\t\tthis._currentDeviceConfigHash = this.cachedDeviceConfigHash;\n\t\t\t}\n\n\t\t\t// Starting from version 2, we apply labels and descriptions from the device config dynamically\n\t\t\tfor (const ep of this.getAllEndpoints()) {\n\t\t\t\trefreshMetadataStringsFromConfigFile(\n\t\t\t\t\tthis.driver,\n\t\t\t\t\tthis.id,\n\t\t\t\t\tep.index,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tthis.driver.controllerLog.logNode(\n\t\t\tthis.id,\n\t\t\t`${\n\t\t\t\tthis.deviceConfig.isEmbedded\n\t\t\t\t\t? \"Embedded\"\n\t\t\t\t\t: \"User-provided\"\n\t\t\t} device config loaded`,\n\t\t);\n\t}\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;;;;;AAAA,6BAAqD;AACrD,oBAA6B;AAC7B,kBAA8D;AAC9D,oBAAgD;AAChD,0BAA0B;AAC1B,4BAAoC;AAwC9B,MAAgB,0BAA0B,0CAAmB;EA7CnE,OA6CmE;;;EAG1D;;;;EAIR,IAAW,eAAY;AACtB,WAAO,KAAK;EACb;EACA,IAAc,aAAa,OAAkC;AAC5D,SAAK,gBAAgB;EACtB;;;;;EAMA,IAAW,eAAY;AACtB,QAAI,KAAK;AAAe,aAAO,KAAK,cAAc;AAClD,QAAI,KAAK,kBAAkB,QAAW;AACrC,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rokenDeviceConfigHash,\n\tparseDeviceConfigHash,\n} from \"@zwave-js/config\";\nimport { InterviewStage, type MaybeNotKnown, NOT_KNOWN } from \"@zwave-js/core\";\nimport { Bytes, type BytesView, formatId } from \"@zwave-js/shared\";\nimport { cacheKeys } from \"../../driver/NetworkCache.js\";\nimport { FirmwareUpdateMixin } from \"./70_FirmwareUpdate.js\";\n\nexport interface NodeDeviceConfig {\n\t/**\n\t * Contains additional information about this node, loaded from a config file\n\t */\n\tget deviceConfig(): MaybeNotKnown<DeviceConfig>;\n\n\t/**\n\t * Returns the manufacturer/brand name defined in the device configuration,\n\t * or looks it up from the manufacturer database if no config is available\n\t */\n\tget manufacturer(): MaybeNotKnown<string>;\n\n\t/**\n\t * Returns the device label defined in the device configuration.\n\t */\n\tget label(): MaybeNotKnown<string>;\n\n\tget deviceDatabaseUrl(): MaybeNotKnown<string>;\n\n\t/**\n\t * Returns whether the device config for this node has changed since the last interview.\n\t * If it has, the node likely needs to be re-interviewed for the changes to be picked up.\n\t */\n\thasDeviceConfigChanged(): MaybeNotKnown<boolean>;\n\n\t/**\n\t * @internal\n\t * The hash of the device config that was applied during the last interview.\n\t */\n\tget cachedDeviceConfigHash(): BytesView | undefined;\n\n\t/**\n\t * @internal\n\t * The hash of the currently used device config\n\t */\n\tget currentDeviceConfigHash(): BytesView | undefined;\n}\n\nexport abstract class DeviceConfigMixin extends FirmwareUpdateMixin\n\timplements NodeDeviceConfig\n{\n\tprivate _deviceConfig: DeviceConfig | undefined;\n\t/**\n\t * Contains additional information about this node, loaded from a config file\n\t */\n\tpublic get deviceConfig(): MaybeNotKnown<DeviceConfig> {\n\t\treturn this._deviceConfig;\n\t}\n\tprotected set deviceConfig(value: MaybeNotKnown<DeviceConfig>) {\n\t\tthis._deviceConfig = value;\n\t}\n\n\t/**\n\t * Returns the manufacturer/brand name defined in the device configuration,\n\t * or looks it up from the manufacturer database if no config is available\n\t */\n\tpublic get manufacturer(): MaybeNotKnown<string> {\n\t\tif (this._deviceConfig) return this._deviceConfig.manufacturer;\n\t\tif (this.manufacturerId != undefined) {\n\t\t\treturn this.driver.lookupManufacturer(this.manufacturerId);\n\t\t}\n\t}\n\n\t/**\n\t * Returns the device label defined in the device configuration.\n\t */\n\tpublic get label(): MaybeNotKnown<string> {\n\t\treturn this._deviceConfig?.label;\n\t}\n\n\tpublic get deviceDatabaseUrl(): MaybeNotKnown<string> {\n\t\tif (\n\t\t\tthis.manufacturerId != undefined\n\t\t\t&& this.productType != undefined\n\t\t\t&& this.productId != undefined\n\t\t) {\n\t\t\tconst manufacturerId = formatId(this.manufacturerId);\n\t\t\tconst productType = formatId(this.productType);\n\t\t\tconst productId = formatId(this.productId);\n\t\t\tconst firmwareVersion = this.firmwareVersion || \"0.0\";\n\t\t\treturn `https://devices.zwave-js.io/?jumpTo=${manufacturerId}:${productType}:${productId}:${firmwareVersion}`;\n\t\t}\n\t}\n\n\t/**\n\t * Returns whether the device config for this node has changed since the last interview.\n\t * If it has, the node likely needs to be re-interviewed for the changes to be picked up.\n\t */\n\tpublic hasDeviceConfigChanged(): MaybeNotKnown<boolean> {\n\t\t// We can't know if the node is not fully interviewed\n\t\tif (this.interviewStage !== InterviewStage.Complete) return NOT_KNOWN;\n\n\t\t// The controller cannot be re-interviewed\n\t\tif (this.isControllerNode) return false;\n\n\t\t// If the hash was never stored, we can only (very likely) know if the config has not changed\n\t\tif (this.cachedDeviceConfigHash == undefined) {\n\t\t\treturn this.deviceConfig == undefined ? false : NOT_KNOWN;\n\t\t}\n\n\t\t// If it was, a change in hash means the config has changed.\n\t\t// We handle the different hash versions when loading the config already.\n\t\tif (this._currentDeviceConfigHash) {\n\t\t\treturn !DeviceConfig.areHashesEqual(\n\t\t\t\tthis._currentDeviceConfigHash,\n\t\t\t\tthis.cachedDeviceConfigHash,\n\t\t\t);\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * @internal\n\t * The hash of the device config that was applied during the last interview.\n\t */\n\tpublic get cachedDeviceConfigHash(): BytesView | undefined {\n\t\treturn this.driver.cacheGet(cacheKeys.node(this.id).deviceConfigHash);\n\t}\n\n\tprotected set cachedDeviceConfigHash(value: BytesView | undefined) {\n\t\tthis.driver.cacheSet(cacheKeys.node(this.id).deviceConfigHash, value);\n\t}\n\n\tprivate _currentDeviceConfigHash: BytesView | undefined;\n\t/**\n\t * @internal\n\t * The hash of the currently used device config\n\t */\n\tpublic get currentDeviceConfigHash(): BytesView | undefined {\n\t\treturn this._currentDeviceConfigHash;\n\t}\n\tprotected set currentDeviceConfigHash(value: BytesView | undefined) {\n\t\tthis._currentDeviceConfigHash = value;\n\t}\n\n\t/**\n\t * Loads the device configuration for this node from a config file\n\t */\n\tprotected async loadDeviceConfig(): Promise<void> {\n\t\t// But the configuration definitions might change\n\t\tif (\n\t\t\tthis.manufacturerId == undefined\n\t\t\t|| this.productType == undefined\n\t\t\t|| this.productId == undefined\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Try to load the config file\n\t\tthis.deviceConfig = await this.driver.configManager.lookupDevice(\n\t\t\tthis.manufacturerId,\n\t\t\tthis.productType,\n\t\t\tthis.productId,\n\t\t\tthis.firmwareVersion,\n\t\t\tthis.sdkVersion,\n\t\t);\n\n\t\tif (!this.deviceConfig) {\n\t\t\tthis.driver.controllerLog.logNode(\n\t\t\t\tthis.id,\n\t\t\t\t\"No device config found\",\n\t\t\t\t\"warn\",\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\t// We need to remember the hash of the device config here, because we're in an async context\n\t\t// and later comparisons are sync.\n\n\t\t// There are two legacy versions of the device config hash:\n\t\t// - 16 byte MD5 hash\n\t\t// - 32 byte SHA-256 hash\n\t\t// Both only support checking for exact equality of the config hashable.\n\t\t// To be able to compare those stored hashes with the current config,\n\t\t// we need to figure out the stored version now and hash the config using\n\t\t// the same version.\n\t\t// New \"hashes\" are variable length, contain a condensed version of the device config and are prefixed with a version number.\n\n\t\tconst versionPrefix = Bytes.from(\"$v\", \"utf8\");\n\t\tconst hasVersionPrefix = !!this.cachedDeviceConfigHash\n\t\t\t&& Bytes\n\t\t\t\t.view(this.cachedDeviceConfigHash.subarray(0, 2))\n\t\t\t\t.equals(versionPrefix);\n\t\tlet cachedHashVersion: number | undefined;\n\n\t\tif (\n\t\t\tthis.cachedDeviceConfigHash?.length === 16\n\t\t\t&& !hasVersionPrefix\n\t\t) {\n\t\t\t// MD5 = version 0\n\t\t\tcachedHashVersion = 0;\n\t\t\tthis._currentDeviceConfigHash = await this.deviceConfig\n\t\t\t\t.getHash(0);\n\t\t} else if (\n\t\t\tthis.cachedDeviceConfigHash?.length === 32\n\t\t\t&& !hasVersionPrefix\n\t\t) {\n\t\t\t// SHA-256 = version 1\n\t\t\tcachedHashVersion = 1;\n\t\t\tthis._currentDeviceConfigHash = await this.deviceConfig\n\t\t\t\t.getHash(1);\n\t\t} else {\n\t\t\t// Variable length prefixed hash - determine the hash version from the cache\n\t\t\tif (this.cachedDeviceConfigHash) {\n\t\t\t\tconst parsed = parseDeviceConfigHash(\n\t\t\t\t\tthis.cachedDeviceConfigHash,\n\t\t\t\t);\n\t\t\t\tif (parsed) {\n\t\t\t\t\tcachedHashVersion = parsed.version;\n\t\t\t\t}\n\n\t\t\t\tif (parsed?.version === 2) {\n\t\t\t\t\t// Some Z-Wave JS versions had an issue where the optional \"hidden\"\n\t\t\t\t\t// property was included in the hashable, causing incorrect hashes.\n\t\t\t\t\tthis.cachedDeviceConfigHash =\n\t\t\t\t\t\tawait fixBrokenDeviceConfigHash(\n\t\t\t\t\t\t\tthis.cachedDeviceConfigHash,\n\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Use that version for comparison purposes if possible\n\t\t\tthis._currentDeviceConfigHash = await this.deviceConfig.getHash(\n\t\t\t\tcachedHashVersion as any,\n\t\t\t);\n\t\t\t// default to requiring an upgrade if the version cannot be parsed\n\t\t\tcachedHashVersion ??= 0;\n\t\t}\n\n\t\t// Update the cached device config hash to the most recent version upon restoring,\n\t\t// if the node was previously interviewed and the device config has not changed\n\t\t// since then.\n\t\tif (this.interviewStage === InterviewStage.Complete) {\n\t\t\tif (\n\t\t\t\tcachedHashVersion < DeviceConfig.maxHashVersion\n\t\t\t\t&& this.hasDeviceConfigChanged() === false\n\t\t\t) {\n\t\t\t\tthis.cachedDeviceConfigHash = await this.deviceConfig.getHash();\n\t\t\t\t// Also update the current hash to the new version, in case\n\t\t\t\t// it was previously generated with an older version\n\t\t\t\tthis._currentDeviceConfigHash = this.cachedDeviceConfigHash;\n\t\t\t}\n\n\t\t\t// Starting from version 2, we apply labels and descriptions from the device config dynamically\n\t\t\tfor (const ep of this.getAllEndpoints()) {\n\t\t\t\trefreshMetadataStringsFromConfigFile(\n\t\t\t\t\tthis.driver,\n\t\t\t\t\tthis.id,\n\t\t\t\t\tep.index,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tthis.driver.controllerLog.logNode(\n\t\t\tthis.id,\n\t\t\t`${\n\t\t\t\tthis.deviceConfig.isEmbedded\n\t\t\t\t\t? \"Embedded\"\n\t\t\t\t\t: \"User-provided\"\n\t\t\t} device config loaded`,\n\t\t);\n\t}\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;;;;;AAAA,6BAAqD;AACrD,oBAIO;AACP,kBAA8D;AAC9D,oBAAgD;AAChD,0BAA0B;AAC1B,4BAAoC;AAwC9B,MAAgB,0BAA0B,0CAAmB;EAjDnE,OAiDmE;;;EAG1D;;;;EAIR,IAAW,eAAY;AACtB,WAAO,KAAK;EACb;EACA,IAAc,aAAa,OAAkC;AAC5D,SAAK,gBAAgB;EACtB;;;;;EAMA,IAAW,eAAY;AACtB,QAAI,KAAK;AAAe,aAAO,KAAK,cAAc;AAClD,QAAI,KAAK,kBAAkB,QAAW;AACrC,aAAO,KAAK,OAAO,mBAAmB,KAAK,cAAc;IAC1D;EACD;;;;EAKA,IAAW,QAAK;AACf,WAAO,KAAK,eAAe;EAC5B;EAEA,IAAW,oBAAiB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MAAM,MAAM;AAC7C,UAAM,mBAAmB,CAAC,CAAC,KAAK,0BAC5B,oBACD,KAAK,KAAK,uBAAuB,SAAS,GAAG,CAAC,CAAC,EAC/C,OAAO,aAAa;AACvB,QAAI;AAEJ,QACC,KAAK,wBAAwB,WAAW,MACrC,CAAC,kBACH;AAED,0BAAoB;AACpB,WAAK,2BAA2B,MAAM,KAAK,aACzC,QAAQ,CAAC;IACZ,WACC,KAAK,wBAAwB,WAAW,MACrC,CAAC,kBACH;AAED,0BAAoB;AACpB,WAAK,2BAA2B,MAAM,KAAK,aACzC,QAAQ,CAAC;IACZ,OAAO;AAEN,UAAI,KAAK,wBAAwB;AAChC,cAAM,aAAS,qCACd,KAAK,sBAAsB;AAE5B,YAAI,QAAQ;AACX,8BAAoB,OAAO;QAC5B;AAEA,YAAI,QAAQ,YAAY,GAAG;AAG1B,eAAK,yBACJ,UAAM,yCACL,KAAK,sBAAsB;QAE9B;MACD;AAEA,WAAK,2BAA2B,MAAM,KAAK,aAAa,QACvD,iBAAwB;AAGzB,4BAAsB;IACvB;AAKA,QAAI,KAAK,mBAAmB,2BAAe,UAAU;AACpD,UACC,oBAAoB,2BAAa,kBAC9B,KAAK,uBAAsB,MAAO,OACpC;AACD,aAAK,yBAAyB,MAAM,KAAK,aAAa,QAAO;AAG7D,aAAK,2BAA2B,KAAK;MACtC;AAGA,iBAAW,MAAM,KAAK,gBAAe,GAAI;AACxC,yEACC,KAAK,QACL,KAAK,IACL,GAAG,KAAK;MAEV;IACD;AAEA,SAAK,OAAO,cAAc,QACzB,KAAK,IACL,GACC,KAAK,aAAa,aACf,aACA,eACJ,uBAAuB;EAEzB;;",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,3 @@
1
- export declare const PACKAGE_VERSION = "15.20.0";
1
+ export declare const PACKAGE_VERSION = "15.20.1";
2
2
  export declare const PACKAGE_NAME = "zwave-js";
3
3
  //# sourceMappingURL=_version.d.ts.map
@@ -1,4 +1,4 @@
1
1
  // This file is auto-generated by the codegen maintenance script
2
- export const PACKAGE_VERSION = "15.20.0";
2
+ export const PACKAGE_VERSION = "15.20.1";
3
3
  export const PACKAGE_NAME = "zwave-js";
4
4
  //# sourceMappingURL=_version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"80_DeviceConfig.d.ts","sourceRoot":"","sources":["../../../../../src/lib/node/mixins/80_DeviceConfig.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAkB,KAAK,aAAa,EAAa,MAAM,gBAAgB,CAAC;AAC/E,OAAO,EAAS,KAAK,SAAS,EAAY,MAAM,kBAAkB,CAAC;AAEnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAE7D,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,IAAI,YAAY,IAAI,aAAa,CAAC,YAAY,CAAC,CAAC;IAEhD;;;OAGG;IACH,IAAI,YAAY,IAAI,aAAa,CAAC,MAAM,CAAC,CAAC;IAE1C;;OAEG;IACH,IAAI,KAAK,IAAI,aAAa,CAAC,MAAM,CAAC,CAAC;IAEnC,IAAI,iBAAiB,IAAI,aAAa,CAAC,MAAM,CAAC,CAAC;IAE/C;;;OAGG;IACH,sBAAsB,IAAI,aAAa,CAAC,OAAO,CAAC,CAAC;CAajD;AAED,8BAAsB,iBAAkB,SAAQ,mBAC/C,YAAW,gBAAgB;IAE3B,OAAO,CAAC,aAAa,CAA2B;IAChD;;OAEG;IACH,IAAW,YAAY,IAAI,aAAa,CAAC,YAAY,CAAC,CAErD;IACD,SAAS,KAAK,YAAY,CAAC,KAAK,EAAE,aAAa,CAAC,YAAY,CAAC,EAE5D;IAED;;;OAGG;IACH,IAAW,YAAY,IAAI,aAAa,CAAC,MAAM,CAAC,CAK/C;IAED;;OAEG;IACH,IAAW,KAAK,IAAI,aAAa,CAAC,MAAM,CAAC,CAExC;IAED,IAAW,iBAAiB,IAAI,aAAa,CAAC,MAAM,CAAC,CA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Y,IAAI,aAAa,CAAC,MAAM,CAAC,CAK/C;IAED;;OAEG;IACH,IAAW,KAAK,IAAI,aAAa,CAAC,MAAM,CAAC,CAExC;IAED,IAAW,iBAAiB,IAAI,aAAa,CAAC,MAAM,CAAC,CAYpD;IAED;;;OAGG;IACI,sBAAsB,IAAI,aAAa,CAAC,OAAO,CAAC;IA+BvD,SAAS,KAAK,sBAAsB,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,EAEhE;IAED,OAAO,CAAC,wBAAwB,CAAwB;IAQxD,SAAS,KAAK,uBAAuB,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,EAEjE;IAED;;OAEG;cACa,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC;CA2HjD"}
@@ -1,5 +1,5 @@
1
1
  import { refreshMetadataStringsFromConfigFile } from "@zwave-js/cc/ConfigurationCC";
2
- import { DeviceConfig } from "@zwave-js/config";
2
+ import { DeviceConfig, fixBrokenDeviceConfigHash, parseDeviceConfigHash, } from "@zwave-js/config";
3
3
  import { InterviewStage, NOT_KNOWN } from "@zwave-js/core";
4
4
  import { Bytes, formatId } from "@zwave-js/shared";
5
5
  import { cacheKeys } from "../../driver/NetworkCache.js";
@@ -135,9 +135,15 @@ export class DeviceConfigMixin extends FirmwareUpdateMixin {
135
135
  else {
136
136
  // Variable length prefixed hash - determine the hash version from the cache
137
137
  if (this.cachedDeviceConfigHash) {
138
- const versionString = Bytes.view(this.cachedDeviceConfigHash).toString("utf8").match(/^\$v(\d+)\$/)?.[1];
139
- if (versionString) {
140
- cachedHashVersion = parseInt(versionString, 10);
138
+ const parsed = parseDeviceConfigHash(this.cachedDeviceConfigHash);
139
+ if (parsed) {
140
+ cachedHashVersion = parsed.version;
141
+ }
142
+ if (parsed?.version === 2) {
143
+ // Some Z-Wave JS versions had an issue where the optional "hidden"
144
+ // property was included in the hashable, causing incorrect hashes.
145
+ this.cachedDeviceConfigHash =
146
+ await fixBrokenDeviceConfigHash(this.cachedDeviceConfigHash);
141
147
  }
142
148
  }
143
149
  // Use that version for comparison purposes if possible
@@ -1 +1 @@
1
- {"version":3,"file":"80_DeviceConfig.js","sourceRoot":"","sources":["../../../../../src/lib/node/mixins/80_DeviceConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oCAAoC,EAAE,MAAM,8BAA8B,CAAC;AACpF,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAsB,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC/E,OAAO,EAAE,KAAK,EAAkB,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAwC7D,MAAM,OAAgB,iBAAkB,SAAQ,mBAAmB;IAG1D,aAAa,CAA2B;IAChD;;OAEG;IACH,IAAW,YAAY;QACtB,OAAO,IAAI,CAAC,aAAa,CAAC;IAC3B,CAAC;IACD,IAAc,YAAY,CAAC,KAAkC;QAC5D,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;IAC5B,CAAC;IAED;;;OAGG;IACH,IAAW,YAAY;QACtB,IAAI,IAAI,CAAC,aAAa;YAAE,OAAO,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC;QAC/D,IAAI,IAAI,CAAC,cAAc,IAAI,SAAS,EAAE,CAAC;YACtC,OAAO,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAC5D,CAAC;IACF,CAAC;IAED;;OAEG;IACH,IAAW,KAAK;QACf,OAAO,IAAI,CAAC,aAAa,EAAE,KAAK,CAAC;IAClC,CAAC;IAED,IAAW,iBAAiB;QAC3B,IACC,IAAI,CAAC,cAAc,IAAI,SAAS;eAC7B,IAAI,CAAC,WAAW,IAAI,SAAS;eAC7B,IAAI,CAAC,SAAS,IAAI,SAAS,EAC7B,CAAC;YACF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,IAAI,CAAC,YAAY,CAAC,UAAU;YAC3B,CAAC,CAAC,UAAU;YACZ,CAAC,CAAC,eACJ,uBAAuB,CACvB,CAAC;IACH,CAAC;CACD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zwave-js",
3
- "version": "15.20.0",
3
+ "version": "15.20.1",
4
4
  "description": "Z-Wave driver written entirely in JavaScript/TypeScript",
5
5
  "keywords": [],
6
6
  "type": "module",
@@ -129,14 +129,14 @@
129
129
  "@alcalzone/jsonl-db": "^4.0.2",
130
130
  "@andrewbranch/untar.js": "^1.0.3",
131
131
  "@homebridge/ciao": "^1.3.4",
132
- "@zwave-js/cc": "15.20.0",
133
- "@zwave-js/config": "15.20.0",
132
+ "@zwave-js/cc": "15.20.1",
133
+ "@zwave-js/config": "15.20.1",
134
134
  "@zwave-js/core": "15.20.0",
135
- "@zwave-js/host": "15.20.0",
135
+ "@zwave-js/host": "15.20.1",
136
136
  "@zwave-js/nvmedit": "15.20.0",
137
- "@zwave-js/serial": "15.20.0",
137
+ "@zwave-js/serial": "15.20.1",
138
138
  "@zwave-js/shared": "15.20.0",
139
- "@zwave-js/testing": "15.20.0",
139
+ "@zwave-js/testing": "15.20.1",
140
140
  "@zwave-js/waddle": "^1.2.1",
141
141
  "alcalzone-shared": "^5.0.0",
142
142
  "ansi-colors": "^4.1.3",