zwave-js 14.2.0 → 14.3.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.
- package/build/cjs/Utils.d.ts +1 -1
- package/build/cjs/Utils.js +6 -2
- package/build/cjs/Utils.js.map +2 -2
- package/build/cjs/index_safe.js.map +2 -2
- package/build/cjs/lib/_version.d.ts +1 -1
- package/build/cjs/lib/_version.js +1 -1
- package/build/cjs/lib/_version.js.map +1 -1
- package/build/cjs/lib/controller/Controller.js +13 -13
- package/build/cjs/lib/controller/Controller.js.map +2 -2
- package/build/cjs/lib/controller/FirmwareUpdateService.js +3 -6
- package/build/cjs/lib/controller/FirmwareUpdateService.js.map +3 -3
- package/build/cjs/lib/driver/Driver.js +18 -19
- package/build/cjs/lib/driver/Driver.js.map +2 -2
- package/build/cjs/lib/node/Node.d.ts +2 -1
- package/build/cjs/lib/node/Node.js +22 -9
- package/build/cjs/lib/node/Node.js.map +2 -2
- package/build/cjs/lib/node/mixins/70_FirmwareUpdate.js +3 -4
- package/build/cjs/lib/node/mixins/70_FirmwareUpdate.js.map +2 -2
- package/build/cjs/lib/telemetry/statistics.js +4 -4
- package/build/cjs/lib/telemetry/statistics.js.map +2 -2
- package/build/cjs/lib/zniffer/Zniffer.js +10 -10
- package/build/cjs/lib/zniffer/Zniffer.js.map +2 -2
- package/build/esm/Utils.d.ts +1 -1
- package/build/esm/Utils.d.ts.map +1 -1
- package/build/esm/Utils.js +1 -1
- package/build/esm/Utils.js.map +1 -1
- package/build/esm/index_safe.d.ts.map +1 -1
- package/build/esm/index_safe.js +1 -0
- package/build/esm/index_safe.js.map +1 -1
- package/build/esm/lib/_version.d.ts +1 -1
- package/build/esm/lib/_version.js +1 -1
- package/build/esm/lib/controller/Controller.d.ts.map +1 -1
- package/build/esm/lib/controller/Controller.js +16 -14
- package/build/esm/lib/controller/Controller.js.map +1 -1
- package/build/esm/lib/controller/FirmwareUpdateService.d.ts.map +1 -1
- package/build/esm/lib/controller/FirmwareUpdateService.js +5 -11
- package/build/esm/lib/controller/FirmwareUpdateService.js.map +1 -1
- package/build/esm/lib/driver/Driver.d.ts.map +1 -1
- package/build/esm/lib/driver/Driver.js +19 -20
- package/build/esm/lib/driver/Driver.js.map +1 -1
- package/build/esm/lib/node/Node.d.ts +2 -1
- package/build/esm/lib/node/Node.d.ts.map +1 -1
- package/build/esm/lib/node/Node.js +27 -9
- package/build/esm/lib/node/Node.js.map +1 -1
- package/build/esm/lib/node/mixins/70_FirmwareUpdate.d.ts.map +1 -1
- package/build/esm/lib/node/mixins/70_FirmwareUpdate.js +1 -2
- package/build/esm/lib/node/mixins/70_FirmwareUpdate.js.map +1 -1
- package/build/esm/lib/telemetry/statistics.d.ts.map +1 -1
- package/build/esm/lib/telemetry/statistics.js +7 -9
- package/build/esm/lib/telemetry/statistics.js.map +1 -1
- package/build/esm/lib/zniffer/Zniffer.d.ts.map +1 -1
- package/build/esm/lib/zniffer/Zniffer.js +12 -10
- package/build/esm/lib/zniffer/Zniffer.js.map +1 -1
- package/package.json +11 -11
|
@@ -78,7 +78,8 @@ export declare class ZWaveNode extends ZWaveNodeMixins implements QuerySecurityC
|
|
|
78
78
|
*/
|
|
79
79
|
get defaultTransitionDuration(): string | undefined;
|
|
80
80
|
set defaultTransitionDuration(value: string | Duration | undefined);
|
|
81
|
-
private set
|
|
81
|
+
private set cachedDeviceConfigHash(value);
|
|
82
|
+
private _currentDeviceConfigHash;
|
|
82
83
|
/** Returns a list of all value names that are defined on all endpoints of this node */
|
|
83
84
|
getDefinedValueIDs(): TranslatedValueID[];
|
|
84
85
|
/**
|
|
@@ -325,12 +325,20 @@ let ZWaveNode = (() => {
|
|
|
325
325
|
* @internal
|
|
326
326
|
* The hash of the device config that was applied during the last interview.
|
|
327
327
|
*/
|
|
328
|
-
get
|
|
328
|
+
get cachedDeviceConfigHash() {
|
|
329
329
|
return this.driver.cacheGet(import_NetworkCache.cacheKeys.node(this.id).deviceConfigHash);
|
|
330
330
|
}
|
|
331
|
-
set
|
|
331
|
+
set cachedDeviceConfigHash(value) {
|
|
332
332
|
this.driver.cacheSet(import_NetworkCache.cacheKeys.node(this.id).deviceConfigHash, value);
|
|
333
333
|
}
|
|
334
|
+
_currentDeviceConfigHash;
|
|
335
|
+
/**
|
|
336
|
+
* @internal
|
|
337
|
+
* The hash of the currently used device config
|
|
338
|
+
*/
|
|
339
|
+
get currentDeviceConfigHash() {
|
|
340
|
+
return this._currentDeviceConfigHash;
|
|
341
|
+
}
|
|
334
342
|
/** Returns a list of all value names that are defined on all endpoints of this node */
|
|
335
343
|
getDefinedValueIDs() {
|
|
336
344
|
return nodeUtils.getDefinedValueIDs(this.driver, this);
|
|
@@ -581,7 +589,8 @@ let ZWaveNode = (() => {
|
|
|
581
589
|
this.supportsSecurity = void 0;
|
|
582
590
|
this.supportsBeaming = void 0;
|
|
583
591
|
this._deviceConfig = void 0;
|
|
584
|
-
this.
|
|
592
|
+
this._currentDeviceConfigHash = void 0;
|
|
593
|
+
this.cachedDeviceConfigHash = void 0;
|
|
585
594
|
this._hasEmittedNoS0NetworkKeyError = false;
|
|
586
595
|
this._hasEmittedNoS2NetworkKeyError = false;
|
|
587
596
|
for (const ep of this.getAllEndpoints()) {
|
|
@@ -662,7 +671,7 @@ let ZWaveNode = (() => {
|
|
|
662
671
|
if (this.isControllerNode && this.interviewStage === import_Types2.InterviewStage.ProtocolInfo || !this.isControllerNode && this.interviewStage === import_Types2.InterviewStage.CommandClasses) {
|
|
663
672
|
await this.overwriteConfig();
|
|
664
673
|
}
|
|
665
|
-
this.
|
|
674
|
+
this.cachedDeviceConfigHash = await this._deviceConfig?.getHash();
|
|
666
675
|
this.setInterviewStage(import_Types2.InterviewStage.Complete);
|
|
667
676
|
this.readyMachine.send("INTERVIEW_DONE");
|
|
668
677
|
this.emit("interview completed", this);
|
|
@@ -813,6 +822,11 @@ protocol version: ${this.protocolVersion}`;
|
|
|
813
822
|
if (this.manufacturerId != void 0 && this.productType != void 0 && this.productId != void 0) {
|
|
814
823
|
this._deviceConfig = await this.driver.configManager.lookupDevice(this.manufacturerId, this.productType, this.productId, this.firmwareVersion);
|
|
815
824
|
if (this._deviceConfig) {
|
|
825
|
+
if (this.cachedDeviceConfigHash?.length === 16) {
|
|
826
|
+
this._currentDeviceConfigHash = await this._deviceConfig.getHash("md5");
|
|
827
|
+
} else {
|
|
828
|
+
this._currentDeviceConfigHash = await this._deviceConfig.getHash();
|
|
829
|
+
}
|
|
816
830
|
this.driver.controllerLog.logNode(this.id, `${this._deviceConfig.isEmbedded ? "Embedded" : "User-provided"} device config loaded`);
|
|
817
831
|
} else {
|
|
818
832
|
this.driver.controllerLog.logNode(this.id, "No device config found", "warn");
|
|
@@ -3663,12 +3677,11 @@ ${(0, import_HealthCheck.formatRouteHealthCheckSummary)(this.id, otherNode.id, s
|
|
|
3663
3677
|
return import_core.NOT_KNOWN;
|
|
3664
3678
|
if (this.isControllerNode)
|
|
3665
3679
|
return false;
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
return actualHash == void 0 ? false : import_core.NOT_KNOWN;
|
|
3680
|
+
if (this.cachedDeviceConfigHash == void 0) {
|
|
3681
|
+
return this.deviceConfig == void 0 ? false : import_core.NOT_KNOWN;
|
|
3669
3682
|
}
|
|
3670
|
-
if (
|
|
3671
|
-
return !import_shared.Bytes.view(
|
|
3683
|
+
if (this._currentDeviceConfigHash) {
|
|
3684
|
+
return !import_shared.Bytes.view(this._currentDeviceConfigHash).equals(this.cachedDeviceConfigHash);
|
|
3672
3685
|
}
|
|
3673
3686
|
return true;
|
|
3674
3687
|
}
|