zwave-js 15.17.1 → 15.19.0
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/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.d.ts +8 -2
- package/build/cjs/lib/controller/Controller.js +18 -7
- package/build/cjs/lib/controller/Controller.js.map +2 -2
- package/build/cjs/lib/controller/_Types.d.ts +1 -1
- package/build/cjs/lib/controller/_Types.js.map +2 -2
- package/build/cjs/lib/controller/utils.d.ts +1 -0
- package/build/cjs/lib/controller/utils.js +9 -0
- package/build/cjs/lib/controller/utils.js.map +2 -2
- package/build/cjs/lib/driver/Driver.js +4 -0
- package/build/cjs/lib/driver/Driver.js.map +2 -2
- package/build/cjs/lib/driver/NetworkCache.d.ts +2 -0
- package/build/cjs/lib/driver/NetworkCache.js +5 -0
- package/build/cjs/lib/driver/NetworkCache.js.map +2 -2
- package/build/cjs/lib/node/Dump.d.ts +1 -0
- package/build/cjs/lib/node/Node.js +11 -5
- package/build/cjs/lib/node/Node.js.map +2 -2
- package/build/cjs/lib/node/NodeStatistics.js +4 -0
- package/build/cjs/lib/node/NodeStatistics.js.map +2 -2
- package/build/cjs/lib/node/mixins/05_Security.d.ts +6 -0
- package/build/cjs/lib/node/mixins/05_Security.js +10 -0
- package/build/cjs/lib/node/mixins/05_Security.js.map +2 -2
- package/build/cjs/lib/node/mixins/20_Status.d.ts +2 -0
- package/build/cjs/lib/node/mixins/20_Status.js +9 -0
- package/build/cjs/lib/node/mixins/20_Status.js.map +2 -2
- package/build/cjs/lib/node/mixins/80_DeviceConfig.js +1 -1
- package/build/cjs/lib/node/mixins/80_DeviceConfig.js.map +2 -2
- package/build/cjs/lib/node/mockCCBehaviors/UserCode.js +31 -0
- package/build/cjs/lib/node/mockCCBehaviors/UserCode.js.map +2 -2
- 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 +8 -2
- package/build/esm/lib/controller/Controller.d.ts.map +1 -1
- package/build/esm/lib/controller/Controller.js +28 -17
- package/build/esm/lib/controller/Controller.js.map +1 -1
- package/build/esm/lib/controller/_Types.d.ts +1 -1
- package/build/esm/lib/controller/_Types.d.ts.map +1 -1
- package/build/esm/lib/controller/_Types.js.map +1 -1
- package/build/esm/lib/controller/utils.d.ts +1 -0
- package/build/esm/lib/controller/utils.d.ts.map +1 -1
- package/build/esm/lib/controller/utils.js +13 -0
- package/build/esm/lib/controller/utils.js.map +1 -1
- package/build/esm/lib/driver/Driver.d.ts.map +1 -1
- package/build/esm/lib/driver/Driver.js +4 -0
- package/build/esm/lib/driver/Driver.js.map +1 -1
- package/build/esm/lib/driver/NetworkCache.d.ts +2 -0
- package/build/esm/lib/driver/NetworkCache.d.ts.map +1 -1
- package/build/esm/lib/driver/NetworkCache.js +5 -0
- package/build/esm/lib/driver/NetworkCache.js.map +1 -1
- package/build/esm/lib/node/Dump.d.ts +1 -0
- package/build/esm/lib/node/Dump.d.ts.map +1 -1
- package/build/esm/lib/node/Node.d.ts.map +1 -1
- package/build/esm/lib/node/Node.js +33 -21
- package/build/esm/lib/node/Node.js.map +1 -1
- package/build/esm/lib/node/NodeStatistics.d.ts.map +1 -1
- package/build/esm/lib/node/NodeStatistics.js +5 -0
- package/build/esm/lib/node/NodeStatistics.js.map +1 -1
- package/build/esm/lib/node/mixins/05_Security.d.ts +6 -0
- package/build/esm/lib/node/mixins/05_Security.d.ts.map +1 -1
- package/build/esm/lib/node/mixins/05_Security.js +11 -0
- package/build/esm/lib/node/mixins/05_Security.js.map +1 -1
- package/build/esm/lib/node/mixins/20_Status.d.ts +2 -0
- package/build/esm/lib/node/mixins/20_Status.d.ts.map +1 -1
- package/build/esm/lib/node/mixins/20_Status.js +13 -0
- package/build/esm/lib/node/mixins/20_Status.js.map +1 -1
- package/build/esm/lib/node/mixins/80_DeviceConfig.d.ts.map +1 -1
- package/build/esm/lib/node/mixins/80_DeviceConfig.js +1 -1
- package/build/esm/lib/node/mixins/80_DeviceConfig.js.map +1 -1
- package/build/esm/lib/node/mockCCBehaviors/UserCode.d.ts.map +1 -1
- package/build/esm/lib/node/mockCCBehaviors/UserCode.js +42 -1
- package/build/esm/lib/node/mockCCBehaviors/UserCode.js.map +1 -1
- package/package.json +13 -13
|
@@ -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.
|
|
25
|
+
const PACKAGE_VERSION = "15.19.0";
|
|
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.
|
|
4
|
+
"sourcesContent": ["// This file is auto-generated by the codegen maintenance script\nexport const PACKAGE_VERSION = \"15.19.0\";\nexport const PACKAGE_NAME = \"zwave-js\";\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;;;;;;AACO,MAAM,kBAAkB;AACxB,MAAM,eAAe;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -502,7 +502,7 @@ export declare class ZWaveController extends TypedEventTarget<ControllerEventCal
|
|
|
502
502
|
* * the source node, endpoint or association group does not exist,
|
|
503
503
|
* * the source node is a ZWLR node and the destination is not the SIS
|
|
504
504
|
* * the destination node is a ZWLR node
|
|
505
|
-
* * the association is not allowed for other reasons. In this case, the error's
|
|
505
|
+
* * the association is not allowed for other reasons (unless `force` is set). In this case, the error's
|
|
506
506
|
* `context` property will contain an array with all forbidden destinations, each with an added `checkResult` property
|
|
507
507
|
* which contains the reason why the association is forbidden:
|
|
508
508
|
* ```ts
|
|
@@ -513,7 +513,13 @@ export declare class ZWaveController extends TypedEventTarget<ControllerEventCal
|
|
|
513
513
|
* }[]
|
|
514
514
|
* ```
|
|
515
515
|
*/
|
|
516
|
-
addAssociations(source: AssociationAddress, group: number, destinations: AssociationAddress[]
|
|
516
|
+
addAssociations(source: AssociationAddress, group: number, destinations: AssociationAddress[], options?: {
|
|
517
|
+
/**
|
|
518
|
+
* Whether to force creating associations even if they are not allowed.
|
|
519
|
+
* **Note:** Invalid associations will most likely not work
|
|
520
|
+
*/
|
|
521
|
+
force?: boolean;
|
|
522
|
+
}): Promise<void>;
|
|
517
523
|
/**
|
|
518
524
|
* Removes the given associations from a node or endpoint
|
|
519
525
|
*/
|
|
@@ -1381,8 +1381,9 @@ let ZWaveController = (() => {
|
|
|
1381
1381
|
} else if (!(0, import_core.securityClassIsS2)(actualSecurityClass)) {
|
|
1382
1382
|
bootstrapFailure = import_Inclusion.SecurityBootstrapFailure.Unknown;
|
|
1383
1383
|
}
|
|
1384
|
-
} else
|
|
1385
|
-
smartStartFailed =
|
|
1384
|
+
} else {
|
|
1385
|
+
smartStartFailed = opts.strategy === import_Inclusion.InclusionStrategy.SmartStart;
|
|
1386
|
+
newNode.failedS2Bootstrapping = true;
|
|
1386
1387
|
}
|
|
1387
1388
|
if (forceAddedS2Support && !(0, import_core.securityClassIsS2)(actualSecurityClass)) {
|
|
1388
1389
|
newNode.removeCC(import_core.CommandClasses["Security 2"]);
|
|
@@ -2016,6 +2017,9 @@ let ZWaveController = (() => {
|
|
|
2016
2017
|
this.driver.controllerLog.print(`Node ${nodeId2} was (supposedly) included by another controller, but it is already part of the network. Ignoring the message...`, "warn");
|
|
2017
2018
|
return;
|
|
2018
2019
|
}
|
|
2020
|
+
if (this.inclusionState === import_Inclusion.InclusionState.Including) {
|
|
2021
|
+
return;
|
|
2022
|
+
}
|
|
2019
2023
|
const deviceClass = new import_DeviceClass.DeviceClass(nodeInfo.basicDeviceClass, nodeInfo.genericDeviceClass, nodeInfo.specificDeviceClass);
|
|
2020
2024
|
const newNode = new import_Node.ZWaveNode(
|
|
2021
2025
|
nodeId2,
|
|
@@ -2129,6 +2133,9 @@ let ZWaveController = (() => {
|
|
|
2129
2133
|
bootstrapFailure = import_Inclusion.SecurityBootstrapFailure.Unknown;
|
|
2130
2134
|
}
|
|
2131
2135
|
}
|
|
2136
|
+
if (bootstrapFailure != void 0) {
|
|
2137
|
+
newNode.failedS2Bootstrapping = true;
|
|
2138
|
+
}
|
|
2132
2139
|
} else if (newNode.supportsCC(import_core.CommandClasses.Security) && (deviceClass.specific ?? deviceClass.generic).requiresSecurity) {
|
|
2133
2140
|
this.driver.controllerLog.logNode(newNode.id, `Waiting for node ${inclCtrlr.id} to perform S0 bootstrapping...`);
|
|
2134
2141
|
await inclCtrlr.commandClasses["Inclusion Controller"].initiateStep(newNode.id, import_cc.InclusionControllerStep.S0Inclusion);
|
|
@@ -3536,7 +3543,7 @@ let ZWaveController = (() => {
|
|
|
3536
3543
|
* * the source node, endpoint or association group does not exist,
|
|
3537
3544
|
* * the source node is a ZWLR node and the destination is not the SIS
|
|
3538
3545
|
* * the destination node is a ZWLR node
|
|
3539
|
-
* * the association is not allowed for other reasons. In this case, the error's
|
|
3546
|
+
* * the association is not allowed for other reasons (unless `force` is set). In this case, the error's
|
|
3540
3547
|
* `context` property will contain an array with all forbidden destinations, each with an added `checkResult` property
|
|
3541
3548
|
* which contains the reason why the association is forbidden:
|
|
3542
3549
|
* ```ts
|
|
@@ -3547,10 +3554,10 @@ let ZWaveController = (() => {
|
|
|
3547
3554
|
* }[]
|
|
3548
3555
|
* ```
|
|
3549
3556
|
*/
|
|
3550
|
-
async addAssociations(source, group, destinations) {
|
|
3557
|
+
async addAssociations(source, group, destinations, options) {
|
|
3551
3558
|
const node = this.nodes.getOrThrow(source.nodeId);
|
|
3552
3559
|
const endpoint = node.getEndpointOrThrow(source.endpoint ?? 0);
|
|
3553
|
-
await import_cc.utils.addAssociations(this.driver, endpoint, group, destinations);
|
|
3560
|
+
await import_cc.utils.addAssociations(this.driver, endpoint, group, destinations, options);
|
|
3554
3561
|
if ((0, import_core.isLongRangeNodeId)(source.nodeId))
|
|
3555
3562
|
return;
|
|
3556
3563
|
const destinationNodeIDs = (0, import_arrays.distinct)(destinations.map((d) => d.nodeId)).filter((id) => id !== this.ownNodeId);
|
|
@@ -3843,6 +3850,9 @@ let ZWaveController = (() => {
|
|
|
3843
3850
|
bootstrapFailure = import_Inclusion.SecurityBootstrapFailure.Unknown;
|
|
3844
3851
|
}
|
|
3845
3852
|
}
|
|
3853
|
+
if (bootstrapFailure != void 0) {
|
|
3854
|
+
newNode.failedS2Bootstrapping = true;
|
|
3855
|
+
}
|
|
3846
3856
|
} else if (strategy === import_Inclusion.InclusionStrategy.Security_S0) {
|
|
3847
3857
|
bootstrapFailure = await this.secureBootstrapS0(
|
|
3848
3858
|
newNode,
|
|
@@ -4678,7 +4688,7 @@ let ZWaveController = (() => {
|
|
|
4678
4688
|
}
|
|
4679
4689
|
const ret = new import_shared.Bytes(size);
|
|
4680
4690
|
let offset = 0;
|
|
4681
|
-
const initialChunkSize = this._manufacturerId
|
|
4691
|
+
const initialChunkSize = (0, import_utils.getInitial500SeriesNVMBackupChunkSize)(this._manufacturerId, this._productType, this._productId);
|
|
4682
4692
|
let chunkSize = Math.min(initialChunkSize, ret.length);
|
|
4683
4693
|
while (offset < ret.length) {
|
|
4684
4694
|
const chunk = await this.externalNVMReadBuffer(offset, Math.min(chunkSize, ret.length - offset));
|
|
@@ -4835,7 +4845,8 @@ let ZWaveController = (() => {
|
|
|
4835
4845
|
]);
|
|
4836
4846
|
}
|
|
4837
4847
|
}
|
|
4838
|
-
const
|
|
4848
|
+
const initialChunkSize = (0, import_utils.getInitial500SeriesNVMBackupChunkSize)(this._manufacturerId, this._productType, this._productId);
|
|
4849
|
+
const chunkSize = (await this.externalNVMReadBuffer(0, initialChunkSize)).length - 5;
|
|
4839
4850
|
for (let offset = 0; offset < nvmData.length; offset += chunkSize) {
|
|
4840
4851
|
await this.externalNVMWriteBuffer(offset, nvmData.subarray(offset, offset + chunkSize));
|
|
4841
4852
|
if (onProgress) {
|