@zwave-js/config 12.12.0 → 13.0.0-beta.4

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.
Files changed (97) hide show
  1. package/build/ConfigManager.d.ts +0 -69
  2. package/build/ConfigManager.d.ts.map +1 -1
  3. package/build/ConfigManager.js +1 -542
  4. package/build/ConfigManager.js.map +1 -1
  5. package/build/JsonTemplate.js +2 -3
  6. package/build/JsonTemplate.js.map +1 -1
  7. package/build/Logic.js +2 -3
  8. package/build/Logic.js.map +1 -1
  9. package/build/Manufacturers.js +2 -3
  10. package/build/Manufacturers.js.map +1 -1
  11. package/build/devices/ConditionalItem.js +4 -5
  12. package/build/devices/ConditionalItem.js.map +1 -1
  13. package/build/devices/ConditionalPrimitive.d.ts.map +1 -1
  14. package/build/devices/ConditionalPrimitive.js +2 -2
  15. package/build/devices/ConditionalPrimitive.js.map +1 -1
  16. package/build/devices/DeviceConfig.d.ts +0 -1
  17. package/build/devices/DeviceConfig.d.ts.map +1 -1
  18. package/build/devices/DeviceConfig.js +5 -5
  19. package/build/devices/DeviceConfig.js.map +1 -1
  20. package/build/devices/DeviceMetadata.d.ts.map +1 -1
  21. package/build/devices/ParamInformation.d.ts.map +1 -1
  22. package/build/devices/ParamInformation.js +2 -2
  23. package/build/devices/ParamInformation.js.map +1 -1
  24. package/build/index.d.ts +0 -6
  25. package/build/index.d.ts.map +1 -1
  26. package/build/index.js +0 -6
  27. package/build/index.js.map +1 -1
  28. package/build/index_safe.d.ts +0 -6
  29. package/build/index_safe.d.ts.map +1 -1
  30. package/build/index_safe.js +0 -6
  31. package/build/index_safe.js.map +1 -1
  32. package/build/utils.js +6 -6
  33. package/build/utils.js.map +1 -1
  34. package/build/utils_safe.js +3 -3
  35. package/build/utils_safe.js.map +1 -1
  36. package/config/devices/0x0060/an158.json +14 -20
  37. package/config/devices/0x0063/59350_59372_59373_zwa3016.json +92 -0
  38. package/config/devices/0x010f/fgrm222_0_24.23.json +18 -1
  39. package/config/devices/0x0129/ntb612-zw2.json +1 -1
  40. package/config/devices/0x0129/ntb622-zw2.json +1 -1
  41. package/config/devices/0x0129/ntb632-zw2.json +1 -1
  42. package/config/devices/0x0129/ntb642-zw2.json +1 -1
  43. package/config/devices/0x0129/ntm612-zw2.json +1 -1
  44. package/config/devices/0x0129/ntm617-zw2.json +1 -1
  45. package/config/devices/0x0129/ntm622-zw2.json +1 -1
  46. package/config/devices/0x0129/ntm627-zw2.json +1 -1
  47. package/config/devices/0x0129/ntm632-zw2.json +1 -1
  48. package/config/devices/0x0129/ntm637-zw2.json +1 -1
  49. package/config/devices/0x0129/ntm642-zw2.json +1 -1
  50. package/config/devices/0x0129/ntm647-zw2.json +1 -1
  51. package/config/devices/0x0129/ntt610.json +1 -2
  52. package/config/devices/0x0129/ntt612-zw2.json +1 -1
  53. package/config/devices/0x0129/ntt622-zw2.json +1 -1
  54. package/config/devices/0x0129/templates/yale_template.json +22 -7
  55. package/config/devices/0x0129/yrc_yrd_226_246_256_446-zw2.json +11 -1
  56. package/config/devices/0x0129/yrd4x0-f-zw3.json +109 -0
  57. package/config/devices/0x0148/cometz_700.json +49 -0
  58. package/config/devices/0x014a/gdzw7-eco.json +78 -0
  59. package/config/devices/0x014f/{gd00z-7.json → gd00z-6-7-8.json} +1 -1
  60. package/config/devices/0x015f/mh-s412-5102.json +213 -59
  61. package/config/devices/0x027a/templates/zooz_template.json +32 -0
  62. package/config/devices/0x027a/zen30.json +67 -15
  63. package/config/devices/0x027a/zen32.json +1 -2
  64. package/config/devices/0x027a/zse11.json +10 -0
  65. package/config/devices/0x0346/flood_freeze_sensor.json +77 -0
  66. package/config/devices/0x0458/61303_zw3010.json +73 -0
  67. package/config/manufacturers.json +1 -0
  68. package/package.json +11 -10
  69. package/build/DeviceClasses.d.ts +0 -26
  70. package/build/DeviceClasses.d.ts.map +0 -1
  71. package/build/DeviceClasses.js +0 -127
  72. package/build/DeviceClasses.js.map +0 -1
  73. package/build/Indicators.d.ts +0 -15
  74. package/build/Indicators.d.ts.map +0 -1
  75. package/build/Indicators.js +0 -47
  76. package/build/Indicators.js.map +0 -1
  77. package/build/Meters.d.ts +0 -15
  78. package/build/Meters.d.ts.map +0 -1
  79. package/build/Meters.js +0 -44
  80. package/build/Meters.js.map +0 -1
  81. package/build/Notifications.d.ts +0 -71
  82. package/build/Notifications.d.ts.map +0 -1
  83. package/build/Notifications.js +0 -223
  84. package/build/Notifications.js.map +0 -1
  85. package/build/Scales.d.ts +0 -15
  86. package/build/Scales.d.ts.map +0 -1
  87. package/build/Scales.js +0 -37
  88. package/build/Scales.js.map +0 -1
  89. package/build/SensorTypes.d.ts +0 -11
  90. package/build/SensorTypes.d.ts.map +0 -1
  91. package/build/SensorTypes.js +0 -48
  92. package/build/SensorTypes.js.map +0 -1
  93. package/config/deviceClasses.json +0 -447
  94. package/config/indicators.json +0 -166
  95. package/config/meters.json +0 -47
  96. package/config/scales.json +0 -85
  97. package/config/sensorTypes.json +0 -707
@@ -0,0 +1,77 @@
1
+ {
2
+ "manufacturer": "Ring",
3
+ "manufacturerId": "0x0346",
4
+ "label": "4SF1S8-0EN0",
5
+ "description": "Flood Freeze Sensor",
6
+ "devices": [
7
+ {
8
+ "productType": "0x0501",
9
+ "productId": "0x0101",
10
+ "zwaveAllianceId": 3160
11
+ }
12
+ ],
13
+ "firmwareVersion": {
14
+ "min": "0.0",
15
+ "max": "255.255"
16
+ },
17
+ "paramInformation": [
18
+ {
19
+ "#": "1",
20
+ "label": "Heartbeat Interval",
21
+ "valueSize": 2,
22
+ "unit": "seconds",
23
+ "minValue": 255,
24
+ "maxValue": 4200,
25
+ "defaultValue": 4080
26
+ },
27
+ {
28
+ "#": "2",
29
+ "label": "One-Time Wakeup Delay",
30
+ "description": "Device will wakeup once after the configured delay",
31
+ "valueSize": 2,
32
+ "unit": "seconds",
33
+ "minValue": 0,
34
+ "maxValue": 32767,
35
+ "defaultValue": 0,
36
+ "options": [
37
+ {
38
+ "label": "Disable",
39
+ "value": 0
40
+ }
41
+ ]
42
+ },
43
+ {
44
+ "#": "3",
45
+ "label": "Message Retry Attempt Limit",
46
+ "valueSize": 1,
47
+ "minValue": 0,
48
+ "maxValue": 5,
49
+ "defaultValue": 5
50
+ },
51
+ {
52
+ "#": "4",
53
+ "label": "Delay Between Retry Attempts",
54
+ "valueSize": 1,
55
+ "unit": "seconds",
56
+ "minValue": 1,
57
+ "maxValue": 60,
58
+ "defaultValue": 6
59
+ },
60
+ {
61
+ "#": "5",
62
+ "label": "Supervision Report Timeout",
63
+ "description": "How long to wait for a Supervision Report response to a Supervision Get",
64
+ "valueSize": 2,
65
+ "unit": "ms",
66
+ "minValue": 500,
67
+ "maxValue": 5000,
68
+ "defaultValue": 1500
69
+ }
70
+ ],
71
+ "metadata": {
72
+ "inclusion": "To include begin the setup process near your Ring Alarm Base Station. \n\n- In the Ring app, tap Set Up a Device. Choose Security Devices, then Sensors, then Ring Flood/Freeze Sensor, then tap Add Device.\n- To complete the setup process, follow the in-app instructions. \n- When prompted, scan the QR Code or enter the PIN. \n- This begins the pairing process. \n- When prompted, open the lid and pull out the clear tab. \n- Twist the lid to the left to unlock, then lift it to remove. Next, pull out the clear battery tab. This turns on the Sensor. \n- Your Base Station finds it automatically. \n\nNote: The QR Code and PIN are on the back of your sensor and in the product packaging.",
73
+ "exclusion": "To remove this Sensor from your system: \n- Open the side menu in the Ring app and tap Devices, then Base Station. \n- Next, select your Sensor, then tap the gear-shaped icon, and tap Remove Device. \n- When prompted, open the sensor and remove and reinstall the battery to complete the removal.",
74
+ "reset": "To factory reset, press and hold the Setup button for 10 seconds. When the LED ring stops blinking, the Sensor has reset. \nThis process disconnects the Sensor from Ring Alarm. To begin using the Sensor again, repeat the setup process in the Ring app. \n\nNote: Use this procedure only in the event that the network primary controller is missing or otherwise inoperable.",
75
+ "manual": "https://products.z-wavealliance.org/ProductManual/File?folder=&filename=MarketCertificationFiles/3160/Ring%20FloodFreeze-Zwave-Manual.pdf"
76
+ }
77
+ }
@@ -0,0 +1,73 @@
1
+ {
2
+ "manufacturer": "iDevices",
3
+ "manufacturerId": "0x0458",
4
+ "label": "61303 / ZW3010",
5
+ "description": "In-Wall Smart Dimmer",
6
+ "devices": [
7
+ {
8
+ // This device is a re-branded Jasco 46564 / ZW3010
9
+ "productType": "0x4944",
10
+ "productId": "0x3236",
11
+ "zwaveAllianceId": 4319
12
+ }
13
+ ],
14
+ "firmwareVersion": {
15
+ "min": "0.0",
16
+ "max": "255.255"
17
+ },
18
+ "associations": {
19
+ "1": {
20
+ "label": "Lifeline",
21
+ "maxNodes": 5,
22
+ "isLifeline": true
23
+ },
24
+ "2": {
25
+ "label": "Single Press",
26
+ "maxNodes": 5
27
+ },
28
+ "3": {
29
+ "label": "Double Tap",
30
+ "maxNodes": 5,
31
+ "isLifeline": true
32
+ }
33
+ },
34
+ "paramInformation": [
35
+ {
36
+ "#": "3",
37
+ "$import": "~/templates/master_template.json#led_indicator_four_options"
38
+ },
39
+ {
40
+ "#": "6",
41
+ "$import": "~/0x0063/templates/jasco_template.json#dim_rate"
42
+ },
43
+ {
44
+ "#": "16",
45
+ "$import": "~/0x0063/templates/jasco_template.json#switch_mode"
46
+ },
47
+ {
48
+ "#": "19",
49
+ "$import": "~/0x0063/templates/jasco_template.json#alternate_exclusion"
50
+ },
51
+ {
52
+ "#": "30",
53
+ "$import": "~/0x0063/templates/jasco_template.json#dim_threshold_min"
54
+ },
55
+ {
56
+ "#": "31",
57
+ "$import": "~/0x0063/templates/jasco_template.json#dim_threshold_max"
58
+ },
59
+ {
60
+ "#": "32",
61
+ "$import": "~/0x0063/templates/jasco_template.json#default_brightness_level"
62
+ }
63
+ ],
64
+ "compat": {
65
+ "mapBasicSet": "event"
66
+ },
67
+ "metadata": {
68
+ "inclusion": "Adding your device to a Z-Wave network\n1. Follow the instructions for your Z-Wave certified controller to\nadd a device to the Z-Wave network.\n2. Once the controller is ready to add your device, press\nand release the top or bottom of the wireless smart dimmer\n(rocker)",
69
+ "exclusion": "To remove and reset the device\n1. Follow the instructions for your Z-Wave certified controller to\nremove a device from the Z-Wave network.\n2. Once the controller is ready to remove your device, press\nand release the top or bottom of the wireless smart dimmer\n(rocker)",
70
+ "reset": "1. Quickly press ON (top) button three times then immediately\npress the OFF (bottom) button three times. The LED will flash\nON/OFF five times when completed successfully.\nNote: This should only be used if your network’s primary\ncontroller is missing or otherwise inoperable",
71
+ "manual": "https://products.z-wavealliance.org/ProductManual/File?folder=&filename=product_documents/4319/61303-1%20EnFrSp%20QSG%20v1.pdf"
72
+ }
73
+ }
@@ -755,6 +755,7 @@
755
755
  "0x0443": "Reply S.p.A.",
756
756
  "0x0447": "Schneider Electric",
757
757
  "0x044b": "Dongguan Will Power",
758
+ "0x0458": "iDevices",
758
759
  "0x0460": "Shelly",
759
760
  "0x0466": "Nabu Casa",
760
761
  "0x1486": "Remotec",
package/package.json CHANGED
@@ -1,18 +1,19 @@
1
1
  {
2
2
  "name": "@zwave-js/config",
3
- "version": "12.12.0",
3
+ "version": "13.0.0-beta.4",
4
4
  "description": "zwave-js: configuration files",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
8
- "main": "build/index.js",
9
- "types": "build/index.d.ts",
8
+ "type": "commonjs",
10
9
  "exports": {
11
10
  ".": {
11
+ "@@dev": "./src/index.ts",
12
12
  "types": "./build/index.d.ts",
13
13
  "default": "./build/index.js"
14
14
  },
15
15
  "./safe": {
16
+ "@@dev": "./src/index_safe.ts",
16
17
  "types": "./build/index_safe.d.ts",
17
18
  "default": "./build/index_safe.js"
18
19
  },
@@ -48,15 +49,15 @@
48
49
  "clean": "del-cli build/ \"*.tsbuildinfo\"",
49
50
  "extract-api": "yarn api-extractor run",
50
51
  "lint:zwave": "yarn ts maintenance/lintConfigFiles.ts && eslint --cache --cache-location .eslintcache/config --ext .json \"config/devices/**/*.json\"",
51
- "ts": "node -r esbuild-register",
52
+ "ts": "node -r esbuild-register --conditions=@@dev",
52
53
  "lint:ts": "eslint --cache --cache-location .eslintcache/ts --ext .ts \"src/**/*.ts\"",
53
54
  "lint:ts:fix": "yarn run lint:ts --fix",
54
55
  "test:ts": "ava",
55
56
  "test:dirty": "node -r ../../maintenance/esbuild-register.js ../maintenance/src/resolveDirtyTests.ts --run"
56
57
  },
57
58
  "dependencies": {
58
- "@zwave-js/core": "12.12.0",
59
- "@zwave-js/shared": "12.11.1",
59
+ "@zwave-js/core": "13.0.0-beta.4",
60
+ "@zwave-js/shared": "13.0.0-beta.1",
60
61
  "alcalzone-shared": "^4.0.8",
61
62
  "ansi-colors": "^4.1.3",
62
63
  "fs-extra": "^11.2.0",
@@ -66,7 +67,7 @@
66
67
  "winston": "^3.13.0"
67
68
  },
68
69
  "devDependencies": {
69
- "@microsoft/api-extractor": "^7.43.0",
70
+ "@microsoft/api-extractor": "^7.47.0",
70
71
  "@types/fs-extra": "^11.0.4",
71
72
  "@types/js-levenshtein": "^1.1.3",
72
73
  "@types/json-logic-js": "^2.0.7",
@@ -76,18 +77,18 @@
76
77
  "@types/sinon": "^17.0.3",
77
78
  "@types/xml2js": "^0.4.14",
78
79
  "@types/yargs": "^17.0.32",
79
- "@zwave-js/maintenance": "12.12.0",
80
+ "@zwave-js/maintenance": "13.0.0-beta.4",
80
81
  "ava": "^6.1.2",
81
82
  "comment-json": "^4.2.3",
82
83
  "del-cli": "^5.1.0",
83
- "esbuild": "0.20.2",
84
+ "esbuild": "0.21.5",
84
85
  "esbuild-register": "^3.5.0",
85
86
  "got": "^13.0.0",
86
87
  "js-levenshtein": "^1.1.6",
87
88
  "pegjs": "^0.10.0",
88
89
  "sinon": "^17.0.1",
89
90
  "ts-pegjs": "^0.3.1",
90
- "typescript": "5.4.4",
91
+ "typescript": "5.5.3",
91
92
  "xml2js": "^0.6.2",
92
93
  "yargs": "^17.7.2"
93
94
  }
@@ -1,26 +0,0 @@
1
- import { type JSONObject } from "@zwave-js/shared/safe";
2
- export type BasicDeviceClassMap = ReadonlyMap<number, string>;
3
- export type GenericDeviceClassMap = ReadonlyMap<number, GenericDeviceClass>;
4
- export declare function getDefaultGenericDeviceClass(key: number): GenericDeviceClass;
5
- export declare function getDefaultSpecificDeviceClass(generic: GenericDeviceClass, key: number): SpecificDeviceClass;
6
- export interface BasicDeviceClass {
7
- key: number;
8
- label: string;
9
- }
10
- export declare class GenericDeviceClass {
11
- constructor(key: number, definition: JSONObject);
12
- readonly key: number;
13
- readonly label: string;
14
- readonly requiresSecurity?: boolean;
15
- readonly maySupportBasicCC: boolean;
16
- readonly specific: ReadonlyMap<number, SpecificDeviceClass>;
17
- }
18
- export declare class SpecificDeviceClass {
19
- constructor(key: number, definition: JSONObject, generic: GenericDeviceClass);
20
- readonly key: number;
21
- readonly label: string;
22
- readonly zwavePlusDeviceType?: string;
23
- readonly requiresSecurity?: boolean;
24
- readonly maySupportBasicCC: boolean;
25
- }
26
- //# sourceMappingURL=DeviceClasses.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DeviceClasses.d.ts","sourceRoot":"","sources":["../src/DeviceClasses.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAW,MAAM,uBAAuB,CAAC;AAIjE,MAAM,MAAM,mBAAmB,GAAG,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC9D,MAAM,MAAM,qBAAqB,GAAG,WAAW,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;AAE5E,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,MAAM,GAAG,kBAAkB,CAI5E;AAED,wBAAgB,6BAA6B,CAC5C,OAAO,EAAE,kBAAkB,EAC3B,GAAG,EAAE,MAAM,GACT,mBAAmB,CAiBrB;AAED,MAAM,WAAW,gBAAgB;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACd;AAED,qBAAa,kBAAkB;gBACX,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU;IA2FtD,SAAgB,GAAG,EAAE,MAAM,CAAC;IAC5B,SAAgB,KAAK,EAAE,MAAM,CAAC;IAG9B,SAAgB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3C,SAAgB,iBAAiB,EAAE,OAAO,CAAC;IAC3C,SAAgB,QAAQ,EAAE,WAAW,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;CACnE;AAED,qBAAa,mBAAmB;gBAE9B,GAAG,EAAE,MAAM,EACX,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,kBAAkB;IA8D5B,SAAgB,GAAG,EAAE,MAAM,CAAC;IAC5B,SAAgB,KAAK,EAAE,MAAM,CAAC;IAC9B,SAAgB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7C,SAAgB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3C,SAAgB,iBAAiB,EAAE,OAAO,CAAC;CAC3C"}
@@ -1,127 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SpecificDeviceClass = exports.GenericDeviceClass = exports.getDefaultSpecificDeviceClass = exports.getDefaultGenericDeviceClass = void 0;
4
- const safe_1 = require("@zwave-js/shared/safe");
5
- const typeguards_1 = require("alcalzone-shared/typeguards");
6
- const utils_safe_1 = require("./utils_safe");
7
- function getDefaultGenericDeviceClass(key) {
8
- return new GenericDeviceClass(key, {
9
- label: `UNKNOWN (${(0, safe_1.num2hex)(key)})`,
10
- });
11
- }
12
- exports.getDefaultGenericDeviceClass = getDefaultGenericDeviceClass;
13
- function getDefaultSpecificDeviceClass(generic, key) {
14
- if (key === 0) {
15
- return new SpecificDeviceClass(0x00, {
16
- label: "Unused",
17
- }, generic);
18
- }
19
- return new SpecificDeviceClass(key, {
20
- label: `UNKNOWN (${(0, safe_1.num2hex)(key)})`,
21
- }, generic);
22
- }
23
- exports.getDefaultSpecificDeviceClass = getDefaultSpecificDeviceClass;
24
- class GenericDeviceClass {
25
- constructor(key, definition) {
26
- this.key = key;
27
- if (typeof definition.label !== "string") {
28
- (0, utils_safe_1.throwInvalidConfig)("device classes", `The label for generic device class ${(0, safe_1.num2hex)(key)} is not a string!`);
29
- }
30
- this.label = definition.label;
31
- if (definition.zwavePlusDeviceType != undefined) {
32
- if (typeof definition.zwavePlusDeviceType !== "string") {
33
- (0, utils_safe_1.throwInvalidConfig)("device classes", `The zwavePlusDeviceType for generic device class ${(0, safe_1.num2hex)(key)} is not a string!`);
34
- }
35
- else {
36
- this.zwavePlusDeviceType = definition.zwavePlusDeviceType;
37
- }
38
- }
39
- if (definition.requiresSecurity != undefined) {
40
- if (typeof definition.requiresSecurity !== "boolean") {
41
- (0, utils_safe_1.throwInvalidConfig)("device classes", `The requiresSecurity property for generic device class ${(0, safe_1.num2hex)(key)} is not a boolean!`);
42
- }
43
- else {
44
- this.requiresSecurity = definition.requiresSecurity;
45
- }
46
- }
47
- if (definition.maySupportBasicCC != undefined) {
48
- if (definition.maySupportBasicCC !== false) {
49
- (0, utils_safe_1.throwInvalidConfig)("device classes", `maySupportBasicCC in device class ${this.label} (${(0, safe_1.num2hex)(this.key)}) must be false or omitted (= true)!`);
50
- }
51
- else {
52
- this.maySupportBasicCC = false;
53
- }
54
- }
55
- else {
56
- this.maySupportBasicCC = true;
57
- }
58
- const specific = new Map();
59
- if ((0, typeguards_1.isObject)(definition.specific)) {
60
- for (const [specificKey, specificDefinition] of Object.entries(definition.specific)) {
61
- if (!utils_safe_1.hexKeyRegexNDigits.test(specificKey)) {
62
- (0, utils_safe_1.throwInvalidConfig)("device classes", `found invalid key "${specificKey}" in device class ${this.label} (${(0, safe_1.num2hex)(this.key)}). Device classes must have lowercase hexadecimal IDs.`);
63
- }
64
- const specificKeyNum = parseInt(specificKey.slice(2), 16);
65
- specific.set(specificKeyNum, new SpecificDeviceClass(specificKeyNum, specificDefinition, this));
66
- }
67
- }
68
- this.specific = specific;
69
- }
70
- key;
71
- label;
72
- /** @internal */
73
- zwavePlusDeviceType;
74
- requiresSecurity;
75
- maySupportBasicCC;
76
- specific;
77
- }
78
- exports.GenericDeviceClass = GenericDeviceClass;
79
- class SpecificDeviceClass {
80
- constructor(key, definition, generic) {
81
- this.key = key;
82
- if (typeof definition.label !== "string") {
83
- (0, utils_safe_1.throwInvalidConfig)("device classes", `The label for device class ${generic.label} -> ${(0, safe_1.num2hex)(key)} is not a string!`);
84
- }
85
- this.label = definition.label;
86
- if (definition.zwavePlusDeviceType != undefined) {
87
- if (typeof definition.zwavePlusDeviceType !== "string") {
88
- (0, utils_safe_1.throwInvalidConfig)("device classes", `The zwavePlusDeviceType for device class ${generic.label} -> ${(0, safe_1.num2hex)(key)} is not a string!`);
89
- }
90
- else {
91
- this.zwavePlusDeviceType = definition.zwavePlusDeviceType;
92
- }
93
- }
94
- else if (generic.zwavePlusDeviceType != undefined) {
95
- this.zwavePlusDeviceType = generic.zwavePlusDeviceType;
96
- }
97
- if (definition.requiresSecurity != undefined) {
98
- if (typeof definition.requiresSecurity !== "boolean") {
99
- (0, utils_safe_1.throwInvalidConfig)("device classes", `The requiresSecurity property for device class ${generic.label} -> ${(0, safe_1.num2hex)(key)} is not a string!`);
100
- }
101
- else {
102
- this.requiresSecurity = definition.requiresSecurity;
103
- }
104
- }
105
- else if (generic.requiresSecurity != undefined) {
106
- this.requiresSecurity = generic.requiresSecurity;
107
- }
108
- if (definition.maySupportBasicCC != undefined) {
109
- if (definition.maySupportBasicCC !== false) {
110
- (0, utils_safe_1.throwInvalidConfig)("device classes", `maySupportBasicCC in device class ${generic.label} -> ${this.label} (${(0, safe_1.num2hex)(this.key)}) must be false or omitted (= true)!`);
111
- }
112
- else {
113
- this.maySupportBasicCC = false;
114
- }
115
- }
116
- else {
117
- this.maySupportBasicCC = true;
118
- }
119
- }
120
- key;
121
- label;
122
- zwavePlusDeviceType;
123
- requiresSecurity;
124
- maySupportBasicCC;
125
- }
126
- exports.SpecificDeviceClass = SpecificDeviceClass;
127
- //# sourceMappingURL=DeviceClasses.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DeviceClasses.js","sourceRoot":"","sources":["../src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AAG,OAAO,CAAC,mBAAmB,CAAC;QACxD,CAAC;QAED,IAAI,UAAU,CAAC,gBAAgB,IAAI,SAAS,EAAE,CAAC;YAC9C,IAAI,OAAO,UAAU,CAAC,gBAAgB,KAAK,SAAS,EAAE,CAAC;gBACtD,IAAA,+BAAkB,EACjB,gBAAgB,EAChB,kDAAkD,OAAO,CAAC,KAAK,OAC9D,IAAA,cAAO,EAAC,GAAG,CACZ,mBAAmB,CACnB,CAAC;YACH,CAAC;iBAAM,CAAC;gBACP,IAAI,CAAC,gBAAgB,GAAG,UAAU,CAAC,gBAAgB,CAAC;YACrD,CAAC;QACF,CAAC;aAAM,IAAI,OAAO,CAAC,gBAAgB,IAAI,SAAS,EAAE,CAAC;YAClD,IAAI,CAAC,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC;QAClD,CAAC;QAED,IAAI,UAAU,CAAC,iBAAiB,IAAI,SAAS,EAAE,CAAC;YAC/C,IAAI,UAAU,CAAC,iBAAiB,KAAK,KAAK,EAAE,CAAC;gBAC5C,IAAA,+BAAkB,EACjB,gBAAgB,EAChB,qCAAqC,OAAO,CAAC,KAAK,OAAO,IAAI,CAAC,KAAK,KAClE,IAAA,cAAO,EAAC,IAAI,CAAC,GAAG,CACjB,sCAAsC,CACtC,CAAC;YACH,CAAC;iBAAM,CAAC;gBACP,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC;YAChC,CAAC;QACF,CAAC;aAAM,CAAC;YACP,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC;QAC/B,CAAC;IACF,CAAC;IAEe,GAAG,CAAS;IACZ,KAAK,CAAS;IACd,mBAAmB,CAAU;IAC7B,gBAAgB,CAAW;IAC3B,iBAAiB,CAAU;CAC3C;AAvED,kDAuEC"}
@@ -1,15 +0,0 @@
1
- import type { ValueType } from "@zwave-js/core/safe";
2
- import { type JSONObject } from "@zwave-js/shared/safe";
3
- export type IndicatorMap = ReadonlyMap<number, string>;
4
- export type IndicatorPropertiesMap = ReadonlyMap<number, IndicatorProperty>;
5
- export declare class IndicatorProperty {
6
- constructor(id: number, definition: JSONObject);
7
- readonly id: number;
8
- readonly label: string;
9
- readonly description: string | undefined;
10
- readonly min: number | undefined;
11
- readonly max: number | undefined;
12
- readonly readonly: boolean | undefined;
13
- readonly type: ValueType | undefined;
14
- }
15
- //# sourceMappingURL=Indicators.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Indicators.d.ts","sourceRoot":"","sources":["../src/Indicators.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,KAAK,UAAU,EAAW,MAAM,uBAAuB,CAAC;AAGjE,MAAM,MAAM,YAAY,GAAG,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AACvD,MAAM,MAAM,sBAAsB,GAAG,WAAW,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAE5E,qBAAa,iBAAiB;gBACV,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU;IAsErD,SAAgB,EAAE,EAAE,MAAM,CAAC;IAC3B,SAAgB,KAAK,EAAE,MAAM,CAAC;IAC9B,SAAgB,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChD,SAAgB,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,SAAgB,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,SAAgB,QAAQ,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9C,SAAgB,IAAI,EAAE,SAAS,GAAG,SAAS,CAAC;CAC5C"}
@@ -1,47 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.IndicatorProperty = void 0;
4
- const safe_1 = require("@zwave-js/shared/safe");
5
- const utils_safe_1 = require("./utils_safe");
6
- class IndicatorProperty {
7
- constructor(id, definition) {
8
- this.id = id;
9
- if (typeof definition.label !== "string") {
10
- (0, utils_safe_1.throwInvalidConfig)("indicators", `The label for property ${(0, safe_1.num2hex)(id)} is not a string!`);
11
- }
12
- this.label = definition.label;
13
- if (definition.description != undefined
14
- && typeof definition.description !== "string") {
15
- (0, utils_safe_1.throwInvalidConfig)("indicators", `The description for property ${(0, safe_1.num2hex)(id)} is not a string!`);
16
- }
17
- this.description = definition.description;
18
- if (definition.min != undefined && typeof definition.min !== "number") {
19
- (0, utils_safe_1.throwInvalidConfig)("indicators", `The minimum value for property ${(0, safe_1.num2hex)(id)} is not a number!`);
20
- }
21
- this.min = definition.min;
22
- if (definition.max != undefined && typeof definition.max !== "number") {
23
- (0, utils_safe_1.throwInvalidConfig)("indicators", `The maximum value for property ${(0, safe_1.num2hex)(id)} is not a number!`);
24
- }
25
- this.max = definition.max;
26
- if (definition.readonly != undefined
27
- && typeof definition.readonly !== "boolean") {
28
- (0, utils_safe_1.throwInvalidConfig)("indicators", `readonly for property ${(0, safe_1.num2hex)(id)} is not a boolean!`);
29
- }
30
- this.readonly = definition.readonly;
31
- if (definition.type != undefined
32
- && typeof definition.type !== "string") {
33
- (0, utils_safe_1.throwInvalidConfig)("indicators", `type for property ${(0, safe_1.num2hex)(id)} is not a string!`);
34
- }
35
- // TODO: Validate that the value is ok
36
- this.type = definition.type;
37
- }
38
- id;
39
- label;
40
- description;
41
- min;
42
- max;
43
- readonly;
44
- type;
45
- }
46
- exports.IndicatorProperty = IndicatorProperty;
47
- //# sourceMappingURL=Indicators.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Indicators.js","sourceRoot":"","sources":["../src/Indicators.ts"],"names":[],"mappings":";;;AACA,gDAAiE;AACjE,6CAAkD;AAKlD,MAAa,iBAAiB;IAC7B,YAAmB,EAAU,EAAE,UAAsB;QACpD,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QAEb,IAAI,OAAO,UAAU,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC1C,IAAA,+BAAkB,EACjB,YAAY,EACZ,0BAA0B,IAAA,cAAO,EAAC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;YACF,IAAA,+BAAkB,EACjB,YAAY,EACZ,qBAAqB,IAAA,cAAO,EAAC,EAAE,CAAC,mBAAmB,CACnD,CAAC;QACH,CAAC;QACD,sCAAsC;QACtC,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC;IAC7B,CAAC;IAEe,EAAE,CAAS;IACX,KAAK,CAAS;IACd,WAAW,CAAqB;IAChC,GAAG,CAAqB;IACxB,GAAG,CAAqB;IACxB,QAAQ,CAAsB;IAC9B,IAAI,CAAwB;CAC5C;AA9ED,8CA8EC"}
package/build/Meters.d.ts DELETED
@@ -1,15 +0,0 @@
1
- import { type JSONObject } from "@zwave-js/shared/safe";
2
- export type MeterMap = ReadonlyMap<number, Meter>;
3
- export declare class Meter {
4
- constructor(id: number, definition: JSONObject);
5
- readonly id: number;
6
- readonly name: string;
7
- readonly scales: ReadonlyMap<number, MeterScale>;
8
- }
9
- export declare class MeterScale {
10
- constructor(key: number, definition: string);
11
- readonly key: number;
12
- readonly label: string;
13
- }
14
- export declare function getDefaultMeterScale(scale: number): MeterScale;
15
- //# sourceMappingURL=Meters.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Meters.d.ts","sourceRoot":"","sources":["../src/Meters.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAW,MAAM,uBAAuB,CAAC;AAIjE,MAAM,MAAM,QAAQ,GAAG,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAElD,qBAAa,KAAK;gBACE,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU;IAyCrD,SAAgB,EAAE,EAAE,MAAM,CAAC;IAC3B,SAAgB,IAAI,EAAE,MAAM,CAAC;IAC7B,SAAgB,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;CACxD;AAED,qBAAa,UAAU;gBACH,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;IAKlD,SAAgB,GAAG,EAAE,MAAM,CAAC;IAC5B,SAAgB,KAAK,EAAE,MAAM,CAAC;CAC9B;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,CAE9D"}
package/build/Meters.js DELETED
@@ -1,44 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getDefaultMeterScale = exports.MeterScale = exports.Meter = void 0;
4
- const safe_1 = require("@zwave-js/shared/safe");
5
- const typeguards_1 = require("alcalzone-shared/typeguards");
6
- const utils_safe_1 = require("./utils_safe");
7
- class Meter {
8
- constructor(id, definition) {
9
- this.id = id;
10
- this.name = definition.name;
11
- const scales = new Map();
12
- if ((0, typeguards_1.isObject)(definition.scales)) {
13
- for (const [scaleId, scaleDefinition] of Object.entries(definition.scales)) {
14
- if (!utils_safe_1.hexKeyRegexNDigits.test(scaleId)) {
15
- (0, utils_safe_1.throwInvalidConfig)("meters", `found invalid key "${scaleId}" in meter ${(0, safe_1.num2hex)(id)}. Meter scales must have lowercase hexadecimal IDs.`);
16
- }
17
- if (typeof scaleDefinition !== "string") {
18
- (0, utils_safe_1.throwInvalidConfig)("meters", `The scale definition for "${scaleId}" in meter ${(0, safe_1.num2hex)(id)} is not a string!`);
19
- }
20
- const scaleIdNum = parseInt(scaleId.slice(2), 16);
21
- scales.set(scaleIdNum, new MeterScale(scaleIdNum, scaleDefinition));
22
- }
23
- }
24
- this.scales = scales;
25
- }
26
- id;
27
- name;
28
- scales;
29
- }
30
- exports.Meter = Meter;
31
- class MeterScale {
32
- constructor(key, definition) {
33
- this.key = key;
34
- this.label = definition;
35
- }
36
- key;
37
- label;
38
- }
39
- exports.MeterScale = MeterScale;
40
- function getDefaultMeterScale(scale) {
41
- return new MeterScale(scale, `Unknown (${(0, safe_1.num2hex)(scale)})`);
42
- }
43
- exports.getDefaultMeterScale = getDefaultMeterScale;
44
- //# sourceMappingURL=Meters.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Meters.js","sourceRoot":"","sources":["../src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G,GAAG,CAAC;QACf,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC;IACzB,CAAC;IAEe,GAAG,CAAS;IACZ,KAAK,CAAS;CAC9B;AARD,gCAQC;AAED,SAAgB,oBAAoB,CAAC,KAAa;IACjD,OAAO,IAAI,UAAU,CAAC,KAAK,EAAE,YAAY,IAAA,cAAO,EAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AAC7D,CAAC;AAFD,oDAEC"}
@@ -1,71 +0,0 @@
1
- import { type JSONObject } from "@zwave-js/shared/safe";
2
- interface NotificationStateDefinition {
3
- type: "state";
4
- variableName: string;
5
- value: number;
6
- idle: boolean;
7
- }
8
- interface NotificationEventDefinition {
9
- type: "event";
10
- }
11
- export type NotificationValueDefinition = (NotificationStateDefinition | NotificationEventDefinition) & {
12
- description?: string;
13
- label: string;
14
- parameter?: NotificationParameter;
15
- idleVariables?: number[];
16
- };
17
- export type NotificationMap = ReadonlyMap<number, Notification>;
18
- export declare class Notification {
19
- constructor(id: number, definition: JSONObject);
20
- readonly id: number;
21
- readonly name: string;
22
- readonly variables: readonly NotificationVariable[];
23
- readonly events: ReadonlyMap<number, NotificationEvent>;
24
- lookupValue(value: number): NotificationValueDefinition | undefined;
25
- }
26
- export declare class NotificationVariable {
27
- constructor(definition: JSONObject);
28
- readonly name: string;
29
- /** Whether the variable may be reset to idle */
30
- readonly idle: boolean;
31
- readonly states: ReadonlyMap<number, NotificationState>;
32
- }
33
- export declare class NotificationState {
34
- constructor(id: number, definition: JSONObject);
35
- readonly id: number;
36
- readonly label: string;
37
- readonly description?: string;
38
- readonly parameter?: NotificationParameter;
39
- }
40
- export declare class NotificationEvent {
41
- constructor(id: number, definition: JSONObject);
42
- readonly id: number;
43
- readonly label: string;
44
- readonly description?: string;
45
- readonly parameter?: NotificationParameter;
46
- readonly idleVariables?: number[];
47
- }
48
- export declare class NotificationParameter {
49
- constructor(definition: JSONObject);
50
- }
51
- /** Marks a notification that contains a duration */
52
- export declare class NotificationParameterWithDuration {
53
- constructor(_definition: JSONObject);
54
- }
55
- /** Marks a notification that contains a CC */
56
- export declare class NotificationParameterWithCommandClass {
57
- constructor(_definition: JSONObject);
58
- }
59
- /** Marks a notification that contains a named value */
60
- export declare class NotificationParameterWithValue {
61
- constructor(definition: JSONObject);
62
- readonly propertyName: string;
63
- }
64
- /** Marks a notification that contains an enumeration of values */
65
- export declare class NotificationParameterWithEnum {
66
- constructor(definition: JSONObject);
67
- readonly values: ReadonlyMap<number, string>;
68
- readonly default?: number;
69
- }
70
- export {};
71
- //# sourceMappingURL=Notifications.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Notifications.d.ts","sourceRoot":"","sources":["../src/Notifications.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAW,MAAM,uBAAuB,CAAC;AAIjE,UAAU,2BAA2B;IACpC,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;CACd;AAED,UAAU,2BAA2B;IACpC,IAAI,EAAE,OAAO,CAAC;CACd;AAED,MAAM,MAAM,2BAA2B,GACpC,CACC,2BAA2B,GAC3B,2BAA2B,CAC7B,GACC;IACD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,qBAAqB,CAAC;IAClC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,WAAW,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;AAEhE,qBAAa,YAAY;gBACL,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU;IAiCrD,SAAgB,EAAE,EAAE,MAAM,CAAC;IAC3B,SAAgB,IAAI,EAAE,MAAM,CAAC;IAC7B,SAAgB,SAAS,EAAE,SAAS,oBAAoB,EAAE,CAAC;IAC3D,SAAgB,MAAM,EAAE,W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