zwave-js 15.0.6 → 15.1.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/Controller.d.ts +2 -1
- package/build/cjs/Controller.js +4 -0
- package/build/cjs/Controller.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.d.ts +3 -2
- package/build/cjs/lib/controller/Controller.js +14 -2
- package/build/cjs/lib/controller/Controller.js.map +2 -2
- package/build/cjs/lib/controller/Proprietary.d.ts +2 -0
- package/build/cjs/lib/controller/Proprietary.js.map +2 -2
- package/build/cjs/lib/controller/proprietary/NabuCasa.d.ts +17 -3
- package/build/cjs/lib/controller/proprietary/NabuCasa.js +187 -68
- package/build/cjs/lib/controller/proprietary/NabuCasa.js.map +3 -3
- package/build/cjs/lib/driver/Driver.js +17 -2
- package/build/cjs/lib/driver/Driver.js.map +2 -2
- package/build/cjs/lib/node/Node.js +12 -8
- package/build/cjs/lib/node/Node.js.map +2 -2
- package/build/esm/Controller.d.ts +2 -1
- package/build/esm/Controller.d.ts.map +1 -1
- package/build/esm/Controller.js +1 -1
- package/build/esm/Controller.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 +3 -2
- package/build/esm/lib/controller/Controller.d.ts.map +1 -1
- package/build/esm/lib/controller/Controller.js +14 -2
- package/build/esm/lib/controller/Controller.js.map +1 -1
- package/build/esm/lib/controller/Proprietary.d.ts +2 -0
- package/build/esm/lib/controller/Proprietary.d.ts.map +1 -1
- package/build/esm/lib/controller/Proprietary.js.map +1 -1
- package/build/esm/lib/controller/proprietary/NabuCasa.d.ts +17 -3
- package/build/esm/lib/controller/proprietary/NabuCasa.d.ts.map +1 -1
- package/build/esm/lib/controller/proprietary/NabuCasa.js +286 -69
- package/build/esm/lib/controller/proprietary/NabuCasa.js.map +1 -1
- package/build/esm/lib/driver/Driver.d.ts.map +1 -1
- package/build/esm/lib/driver/Driver.js +26 -3
- package/build/esm/lib/driver/Driver.js.map +1 -1
- package/build/esm/lib/node/Node.d.ts.map +1 -1
- package/build/esm/lib/node/Node.js +12 -8
- package/build/esm/lib/node/Node.js.map +1 -1
- package/package.json +7 -7
|
@@ -2,6 +2,7 @@ export type { ControllerLogContext, ControllerNodeLogContext, ControllerSelfLogC
|
|
|
2
2
|
export { ProtocolDataRate, RFRegion, RssiError, isRssiError, } from "@zwave-js/core/safe";
|
|
3
3
|
export type { RSSI, TXReport } from "@zwave-js/core/safe";
|
|
4
4
|
export type { ZWaveApiVersion, ZWaveLibraryTypes } from "@zwave-js/core/safe";
|
|
5
|
+
export type { MigrateNVMOptions } from "@zwave-js/nvmedit";
|
|
5
6
|
export { SerialAPISetupCommand } from "@zwave-js/serial/serialapi";
|
|
6
7
|
export { ZWaveController } from "./lib/controller/Controller.js";
|
|
7
8
|
export type { ControllerEvents } from "./lib/controller/Controller.js";
|
|
@@ -11,5 +12,5 @@ export * from "./lib/controller/Inclusion.js";
|
|
|
11
12
|
export type { ControllerProprietary } from "./lib/controller/Proprietary.js";
|
|
12
13
|
export type { FirmwareUpdateDeviceID, FirmwareUpdateFileInfo, FirmwareUpdateInfo, GetFirmwareUpdatesOptions, RebuildRoutesOptions, RebuildRoutesStatus, SDKVersion, } from "./lib/controller/_Types.js";
|
|
13
14
|
export type { RGB, Vector } from "./lib/controller/proprietary/NabuCasa.js";
|
|
14
|
-
export { ControllerProprietary_NabuCasa, FUNC_ID_NABUCASA, NabuCasaCommand, } from "./lib/controller/proprietary/NabuCasa.js";
|
|
15
|
+
export { ControllerProprietary_NabuCasa, FUNC_ID_NABUCASA, NabuCasaCommand, NabuCasaConfigKey, NabuCasaIndicationSeverity, } from "./lib/controller/proprietary/NabuCasa.js";
|
|
15
16
|
//# sourceMappingURL=Controller.d.ts.map
|
package/build/cjs/Controller.js
CHANGED
|
@@ -22,6 +22,8 @@ __export(Controller_exports, {
|
|
|
22
22
|
ControllerProprietary_NabuCasa: () => import_NabuCasa.ControllerProprietary_NabuCasa,
|
|
23
23
|
FUNC_ID_NABUCASA: () => import_NabuCasa.FUNC_ID_NABUCASA,
|
|
24
24
|
NabuCasaCommand: () => import_NabuCasa.NabuCasaCommand,
|
|
25
|
+
NabuCasaConfigKey: () => import_NabuCasa.NabuCasaConfigKey,
|
|
26
|
+
NabuCasaIndicationSeverity: () => import_NabuCasa.NabuCasaIndicationSeverity,
|
|
25
27
|
ProtocolDataRate: () => import_safe.ProtocolDataRate,
|
|
26
28
|
RFRegion: () => import_safe.RFRegion,
|
|
27
29
|
RssiError: () => import_safe.RssiError,
|
|
@@ -42,6 +44,8 @@ var import_NabuCasa = require("./lib/controller/proprietary/NabuCasa.js");
|
|
|
42
44
|
ControllerProprietary_NabuCasa,
|
|
43
45
|
FUNC_ID_NABUCASA,
|
|
44
46
|
NabuCasaCommand,
|
|
47
|
+
NabuCasaConfigKey,
|
|
48
|
+
NabuCasaIndicationSeverity,
|
|
45
49
|
ProtocolDataRate,
|
|
46
50
|
RFRegion,
|
|
47
51
|
RssiError,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Controller.ts"],
|
|
4
|
-
"sourcesContent": ["export type {\n\tControllerLogContext,\n\tControllerNodeLogContext,\n\tControllerSelfLogContext,\n\tControllerValueLogContext,\n} from \"@zwave-js/core\";\nexport {\n\tProtocolDataRate,\n\tRFRegion,\n\tRssiError,\n\tisRssiError,\n} from \"@zwave-js/core/safe\";\nexport type { RSSI, TXReport } from \"@zwave-js/core/safe\";\nexport type { ZWaveApiVersion, ZWaveLibraryTypes } from \"@zwave-js/core/safe\";\nexport { SerialAPISetupCommand } from \"@zwave-js/serial/serialapi\";\nexport { ZWaveController } from \"./lib/controller/Controller.js\";\nexport type { ControllerEvents } from \"./lib/controller/Controller.js\";\nexport type { ControllerStatistics } from \"./lib/controller/ControllerStatistics.js\";\nexport { ZWaveFeature } from \"./lib/controller/Features.js\";\nexport * from \"./lib/controller/Inclusion.js\";\nexport type { ControllerProprietary } from \"./lib/controller/Proprietary.js\";\nexport type {\n\tFirmwareUpdateDeviceID,\n\tFirmwareUpdateFileInfo,\n\tFirmwareUpdateInfo,\n\tGetFirmwareUpdatesOptions,\n\tRebuildRoutesOptions,\n\tRebuildRoutesStatus,\n\tSDKVersion,\n} from \"./lib/controller/_Types.js\";\nexport type { RGB, Vector } from \"./lib/controller/proprietary/NabuCasa.js\";\nexport {\n\tControllerProprietary_NabuCasa,\n\tFUNC_ID_NABUCASA,\n\tNabuCasaCommand,\n} from \"./lib/controller/proprietary/NabuCasa.js\";\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAMA
|
|
4
|
+
"sourcesContent": ["export type {\n\tControllerLogContext,\n\tControllerNodeLogContext,\n\tControllerSelfLogContext,\n\tControllerValueLogContext,\n} from \"@zwave-js/core\";\nexport {\n\tProtocolDataRate,\n\tRFRegion,\n\tRssiError,\n\tisRssiError,\n} from \"@zwave-js/core/safe\";\nexport type { RSSI, TXReport } from \"@zwave-js/core/safe\";\nexport type { ZWaveApiVersion, ZWaveLibraryTypes } from \"@zwave-js/core/safe\";\nexport type { MigrateNVMOptions } from \"@zwave-js/nvmedit\";\nexport { SerialAPISetupCommand } from \"@zwave-js/serial/serialapi\";\nexport { ZWaveController } from \"./lib/controller/Controller.js\";\nexport type { ControllerEvents } from \"./lib/controller/Controller.js\";\nexport type { ControllerStatistics } from \"./lib/controller/ControllerStatistics.js\";\nexport { ZWaveFeature } from \"./lib/controller/Features.js\";\nexport * from \"./lib/controller/Inclusion.js\";\nexport type { ControllerProprietary } from \"./lib/controller/Proprietary.js\";\nexport type {\n\tFirmwareUpdateDeviceID,\n\tFirmwareUpdateFileInfo,\n\tFirmwareUpdateInfo,\n\tGetFirmwareUpdatesOptions,\n\tRebuildRoutesOptions,\n\tRebuildRoutesStatus,\n\tSDKVersion,\n} from \"./lib/controller/_Types.js\";\nexport type { RGB, Vector } from \"./lib/controller/proprietary/NabuCasa.js\";\nexport {\n\tControllerProprietary_NabuCasa,\n\tFUNC_ID_NABUCASA,\n\tNabuCasaCommand,\n\tNabuCasaConfigKey,\n\tNabuCasaIndicationSeverity,\n} from \"./lib/controller/proprietary/NabuCasa.js\";\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAMA;;;;;;;;;;;;;;;;AAAA,kBAKO;AAIP,uBAAsC;AACtC,wBAAgC;AAGhC,sBAA6B;AAC7B,+BAAc,0CAdd;AA0BA,sBAMO;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -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.0
|
|
25
|
+
const PACKAGE_VERSION = "15.1.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.0
|
|
4
|
+
"sourcesContent": ["// This file is auto-generated by the codegen maintenance script\nexport const PACKAGE_VERSION = \"15.1.0\";\nexport const PACKAGE_NAME = \"zwave-js\";\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;;;;;;AACO,MAAM,kBAAkB;AACxB,MAAM,eAAe;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type AssociationAddress, type AssociationCheckResult, type AssociationGroup, type FirmwareUpdateOptions, type FirmwareUpdateResult, KEXFailType } from "@zwave-js/cc";
|
|
2
2
|
import { type ControllerCapabilities, ControllerRole, ControllerStatus, LongRangeChannel, type MaybeNotKnown, type MaybeUnknown, NodeIDType, NodeType, RFRegion, type RFRegionInfo, type RSSI, type Route, RouteKind, type SerialApiInitData, type UnknownZWaveChipType, ValueDB, type ZWaveApiVersion, type ZWaveDataRate, ZWaveLibraryTypes } from "@zwave-js/core";
|
|
3
|
-
import { type NVMAdapter } from "@zwave-js/nvmedit";
|
|
3
|
+
import { type MigrateNVMOptions, type NVMAdapter } from "@zwave-js/nvmedit";
|
|
4
4
|
import { FunctionType } from "@zwave-js/serial";
|
|
5
5
|
import { SerialAPISetupCommand, type SerialAPISetup_GetPowerlevelResponse } from "@zwave-js/serial/serialapi";
|
|
6
6
|
import { ExtendedNVMOperationsCommand } from "@zwave-js/serial/serialapi";
|
|
@@ -759,8 +759,9 @@ export declare class ZWaveController extends TypedEventTarget<ControllerEventCal
|
|
|
759
759
|
* @param nvmData The NVM backup to be restored
|
|
760
760
|
* @param convertProgress Can be used to monitor the progress of the NVM conversion, which may take several seconds up to a few minutes depending on the NVM size
|
|
761
761
|
* @param restoreProgress Can be used to monitor the progress of the restore operation, which may take several seconds up to a few minutes depending on the NVM size
|
|
762
|
+
* @param migrateOptions Influence which data should be preserved during a migration
|
|
762
763
|
*/
|
|
763
|
-
restoreNVM(nvmData: Uint8Array, convertProgress?: (bytesRead: number, total: number) => void, restoreProgress?: (bytesWritten: number, total: number) => void): Promise<void>;
|
|
764
|
+
restoreNVM(nvmData: Uint8Array, convertProgress?: (bytesRead: number, total: number) => void, restoreProgress?: (bytesWritten: number, total: number) => void, migrateOptions?: MigrateNVMOptions): Promise<void>;
|
|
764
765
|
/**
|
|
765
766
|
* Restores an NVM backup that was created with `backupNVMRaw`. The Z-Wave radio is turned off/on automatically.
|
|
766
767
|
*
|
|
@@ -933,6 +933,17 @@ let ZWaveController = (() => {
|
|
|
933
933
|
}
|
|
934
934
|
}
|
|
935
935
|
}
|
|
936
|
+
/** @internal */
|
|
937
|
+
async handleUnsolictedProprietaryCommand(msg) {
|
|
938
|
+
for (const impl of Object.values(this.proprietary)) {
|
|
939
|
+
if (typeof impl.handleUnsolicited === "function") {
|
|
940
|
+
if (await impl.handleUnsolicited(msg)) {
|
|
941
|
+
return true;
|
|
942
|
+
}
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
return false;
|
|
946
|
+
}
|
|
936
947
|
/**
|
|
937
948
|
* @internal
|
|
938
949
|
* Interviews the controller for the necessary information.
|
|
@@ -4406,8 +4417,9 @@ let ZWaveController = (() => {
|
|
|
4406
4417
|
* @param nvmData The NVM backup to be restored
|
|
4407
4418
|
* @param convertProgress Can be used to monitor the progress of the NVM conversion, which may take several seconds up to a few minutes depending on the NVM size
|
|
4408
4419
|
* @param restoreProgress Can be used to monitor the progress of the restore operation, which may take several seconds up to a few minutes depending on the NVM size
|
|
4420
|
+
* @param migrateOptions Influence which data should be preserved during a migration
|
|
4409
4421
|
*/
|
|
4410
|
-
async restoreNVM(nvmData, convertProgress, restoreProgress) {
|
|
4422
|
+
async restoreNVM(nvmData, convertProgress, restoreProgress, migrateOptions) {
|
|
4411
4423
|
if (!await this.toggleRF(false)) {
|
|
4412
4424
|
throw new import_core.ZWaveError("Could not turn off the Z-Wave radio before restoring NVM backup!", import_core.ZWaveErrorCodes.Controller_ResponseNOK);
|
|
4413
4425
|
}
|
|
@@ -4420,7 +4432,7 @@ let ZWaveController = (() => {
|
|
|
4420
4432
|
} else {
|
|
4421
4433
|
targetNVM = await this.backupNVMRaw500(convertProgress);
|
|
4422
4434
|
}
|
|
4423
|
-
const convertedNVM = await (0, import_nvmedit.migrateNVM)(nvmData, targetNVM);
|
|
4435
|
+
const convertedNVM = await (0, import_nvmedit.migrateNVM)(nvmData, targetNVM, migrateOptions);
|
|
4424
4436
|
this.driver.controllerLog.print("Restoring NVM backup...");
|
|
4425
4437
|
if (this.sdkVersionGte("7.0")) {
|
|
4426
4438
|
await this.restoreNVMRaw700(convertedNVM, restoreProgress);
|