node-red-contrib-homekit-bridged 2.0.0-dev.0 → 2.0.0-dev.2

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 (45) hide show
  1. package/build/lib/HAPHostNode.js +59 -64
  2. package/build/lib/HAPServiceNode.js +91 -95
  3. package/build/lib/HAPServiceNode2.js +93 -97
  4. package/build/lib/Storage.d.ts +3 -3
  5. package/build/lib/Storage.js +2 -2
  6. package/build/lib/api.js +26 -29
  7. package/build/lib/hap/HAPCharacteristic.d.ts +1 -1
  8. package/build/lib/hap/HAPService.d.ts +1 -1
  9. package/build/lib/hap/eve-app/EveCharacteristics.d.ts +1 -1
  10. package/build/lib/hap/eve-app/EveCharacteristics.js +10 -10
  11. package/build/lib/types/CustomCharacteristicType.d.ts +1 -1
  12. package/build/lib/types/HAPHostConfigType.d.ts +4 -4
  13. package/build/lib/types/HAPHostNodeType.d.ts +4 -4
  14. package/build/lib/types/HAPService2ConfigType.d.ts +2 -2
  15. package/build/lib/types/HAPService2NodeType.d.ts +3 -3
  16. package/build/lib/types/HAPServiceConfigType.d.ts +3 -3
  17. package/build/lib/types/HAPServiceNodeType.d.ts +10 -10
  18. package/build/lib/types/HAPStatusConfigType.d.ts +1 -1
  19. package/build/lib/types/HAPStatusNodeType.d.ts +5 -5
  20. package/build/lib/types/NodeType.d.ts +1 -1
  21. package/build/lib/types/storage/SerializedHostType.d.ts +2 -2
  22. package/build/lib/utils/AccessoryUtils.js +15 -15
  23. package/build/lib/utils/BridgeUtils.js +5 -5
  24. package/build/lib/utils/CharacteristicUtils.js +6 -6
  25. package/build/lib/utils/CharacteristicUtils2.js +6 -6
  26. package/build/lib/utils/NodeStatusUtils.d.ts +2 -2
  27. package/build/lib/utils/NodeStatusUtils.js +2 -2
  28. package/build/lib/utils/ServiceUtils.js +39 -38
  29. package/build/lib/utils/ServiceUtils2.js +39 -37
  30. package/build/lib/utils/index.js +2 -2
  31. package/build/nodes/nrchkb.js +2 -2
  32. package/build/nodes/status.js +15 -16
  33. package/examples/demo/01 - ALL Demos single import.json +64 -318
  34. package/examples/demo/02 - Air Purifier.json +279 -328
  35. package/examples/demo/03 - Air Quality sensor with Battery.json +254 -282
  36. package/examples/demo/04 - Dimmable Bulb.json +172 -189
  37. package/examples/demo/05 - Color Bulb (HSV).json +195 -216
  38. package/examples/demo/06 - Fan (simple, 3 speeds).json +240 -265
  39. package/examples/demo/07 - Fan (with speed, oscillate, rotation direction).json +175 -192
  40. package/examples/demo/08 - CO2 detector.json +224 -255
  41. package/examples/demo/09 - CO (carbon monoxide) example.json +255 -290
  42. package/examples/demo/10 - Door window contact sensor.json +234 -265
  43. package/examples/demos (advanced)/01 - Television with inputs and speaker.json +541 -607
  44. package/examples/switch/01 - Plain Switch.json +7 -27
  45. package/package.json +83 -81
@@ -14,9 +14,7 @@
14
14
  "style": {
15
15
  "label": true
16
16
  },
17
- "nodes": [
18
- "d6f9e9ce.b3af8"
19
- ],
17
+ "nodes": ["d6f9e9ce.b3af8"],
20
18
  "x": 434,
21
19
  "y": 79,
22
20
  "w": 212,
@@ -31,9 +29,7 @@
31
29
  "stroke": "#ffC000",
32
30
  "label": true
33
31
  },
34
- "nodes": [
35
- "4ea13695.19871"
36
- ],
32
+ "nodes": ["4ea13695.19871"],
37
33
  "x": 234,
38
34
  "y": 79,
39
35
  "w": 192,
@@ -47,10 +43,7 @@
47
43
  "style": {
48
44
  "label": true
49
45
  },
50
- "nodes": [
51
- "e02112b7.b761d",
52
- "e9073d2c.84e64"
53
- ],
46
+ "nodes": ["e02112b7.b761d", "e9073d2c.84e64"],
54
47
  "x": 54,
55
48
  "y": 59,
56
49
  "w": 172,
@@ -99,12 +92,7 @@
99
92
  "outputs": 2,
100
93
  "x": 330,
101
94
  "y": 120,
102
- "wires": [
103
- [
104
- "d6f9e9ce.b3af8"
105
- ],
106
- []
107
- ]
95
+ "wires": [["d6f9e9ce.b3af8"], []]
108
96
  },
109
97
  {
110
98
  "id": "d6f9e9ce.b3af8",
@@ -144,11 +132,7 @@
144
132
  "payloadType": "json",
145
133
  "x": 150,
146
134
  "y": 100,
147
- "wires": [
148
- [
149
- "4ea13695.19871"
150
- ]
151
- ]
135
+ "wires": [["4ea13695.19871"]]
152
136
  },
153
137
  {
154
138
  "id": "e9073d2c.84e64",
@@ -170,11 +154,7 @@
170
154
  "payloadType": "json",
171
155
  "x": 150,
172
156
  "y": 140,
173
- "wires": [
174
- [
175
- "4ea13695.19871"
176
- ]
177
- ]
157
+ "wires": [["4ea13695.19871"]]
178
158
  },
179
159
  {
180
160
  "id": "3dcda60a.e5ff12",
@@ -200,4 +180,4 @@
200
180
  "mdnsReuseAddr": true,
201
181
  "allowMessagePassthrough": true
202
182
  }
203
- ]
183
+ ]
package/package.json CHANGED
@@ -1,84 +1,86 @@
1
1
  {
2
- "name": "node-red-contrib-homekit-bridged",
3
- "version": "2.0.0-dev.0",
4
- "description": "Node-RED nodes to simulate Apple HomeKit devices.",
5
- "main": "build/nodes/nrchkb.js",
6
- "scripts": {
7
- "build": "npm run clean && tsc",
8
- "clean": "del-cli \"build/lib\" \"build/**/*.js\"",
9
- "test": "mocha -r ts-node/register './src/**/*.test.[tj]s' --exit --timeout 30000",
10
- "prettier": "prettier --write \"**/*.{js,ts}\"",
11
- "eslint": "eslint \"src/**/*.ts\" --fix",
12
- "prepare": "husky install"
2
+ "name": "node-red-contrib-homekit-bridged",
3
+ "version": "2.0.0-dev.2",
4
+ "description": "Node-RED nodes to simulate Apple HomeKit devices.",
5
+ "main": "build/nodes/nrchkb.js",
6
+ "scripts": {
7
+ "build": "npm run clean && tsc",
8
+ "clean": "del-cli \"build/lib\" \"build/**/*.js\"",
9
+ "test": "vitest run",
10
+ "test:watch": "vitest",
11
+ "format": "npx @biomejs/biome check --write",
12
+ "lint": "npx @biomejs/biome check",
13
+ "prepare": "husky install"
14
+ },
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "git+https://github.com/NRCHKB/node-red-contrib-homekit-bridged.git"
18
+ },
19
+ "keywords": [
20
+ "homekit",
21
+ "node-red",
22
+ "NRCHKB",
23
+ "iot",
24
+ "home",
25
+ "hap-nodejs",
26
+ "homebridge"
27
+ ],
28
+ "node-red": {
29
+ "nodes": {
30
+ "nrchkb": "build/nodes/nrchkb.js",
31
+ "bridge": "build/nodes/bridge.js",
32
+ "standalone": "build/nodes/standalone.js",
33
+ "service": "build/nodes/service.js",
34
+ "service2": "build/nodes/service2.js",
35
+ "status": "build/nodes/status.js"
13
36
  },
14
- "repository": {
15
- "type": "git",
16
- "url": "git+https://github.com/NRCHKB/node-red-contrib-homekit-bridged.git"
17
- },
18
- "keywords": [
19
- "homekit",
20
- "node-red",
21
- "NRCHKB",
22
- "iot",
23
- "home",
24
- "hap-nodejs",
25
- "homebridge"
26
- ],
27
- "node-red": {
28
- "nodes": {
29
- "nrchkb": "build/nodes/nrchkb.js",
30
- "bridge": "build/nodes/bridge.js",
31
- "standalone": "build/nodes/standalone.js",
32
- "service": "build/nodes/service.js",
33
- "service2": "build/nodes/service2.js",
34
- "status": "build/nodes/status.js"
35
- },
36
- "version": ">=1.3.7"
37
- },
38
- "author": "Tadeusz Wyrzykowski <shaquu@icloud.com> (https://github.com/Shaquu)",
39
- "license": "Apache-2.0",
40
- "bugs": {
41
- "url": "https://github.com/NRCHKB/node-red-contrib-homekit-bridged/issues"
42
- },
43
- "homepage": "https://github.com/NRCHKB/node-red-contrib-homekit-bridged#readme",
44
- "dependencies": {
45
- "@nrchkb/logger": "~3.1.1",
46
- "@homebridge/hap-nodejs": "2.0.2",
47
- "node-persist": "^3.1.3",
48
- "semver": "~7.7.3",
49
- "uuid": "~11.0.5"
50
- },
51
- "devDependencies": {
52
- "@homebridge/ciao": "~1.3.4",
53
- "@node-red/registry": "^4.1.1",
54
- "@types/mocha": "^10.0.10",
55
- "@types/node": "^20",
56
- "@types/node-persist": "^3.1.8",
57
- "@types/node-red": "^1.3.5",
58
- "@types/node-red-node-test-helper": "^0.3.5",
59
- "@types/semver": "^7.7.1",
60
- "@types/uuid": "^10.0.0",
61
- "@typescript-eslint/eslint-plugin": "^7.16.0",
62
- "@typescript-eslint/parser": "^7.16.0",
63
- "babel-eslint": "^10.1.0",
64
- "del-cli": "^5.1.0",
65
- "eslint": "^8",
66
- "eslint-config-prettier": "^9.1.0",
67
- "eslint-plugin-prettier": "^5.5.4",
68
- "eslint-plugin-simple-import-sort": "^12.1.1",
69
- "husky": "^9.1.7",
70
- "mocha": "^10.6.0",
71
- "node-red": "^4.1.1",
72
- "node-red-node-test-helper": "^0.3.5",
73
- "prettier": "^3.6.2",
74
- "ts-node": "^10.9.2",
75
- "typescript": "^5.7.3"
76
- },
77
- "engines": {
78
- "node": "^20 || ^22 || ^24"
79
- },
80
- "files": [
81
- "/build",
82
- "/examples"
83
- ]
37
+ "version": ">=1.3.7"
38
+ },
39
+ "author": "Tadeusz Wyrzykowski <shaquu@icloud.com> (https://github.com/Shaquu)",
40
+ "license": "Apache-2.0",
41
+ "bugs": {
42
+ "url": "https://github.com/NRCHKB/node-red-contrib-homekit-bridged/issues"
43
+ },
44
+ "homepage": "https://github.com/NRCHKB/node-red-contrib-homekit-bridged#readme",
45
+ "dependencies": {
46
+ "@homebridge/hap-nodejs": "2.0.2",
47
+ "@nrchkb/logger": "~3.1.1",
48
+ "node-persist": "^3.1.3",
49
+ "semver": "~7.7.3",
50
+ "uuid": "~13.0.0"
51
+ },
52
+ "devDependencies": {
53
+ "@biomejs/biome": "2.3.7",
54
+ "@homebridge/ciao": "~1.3.4",
55
+ "@node-red/registry": "^4.1.1",
56
+ "@types/node": "^20",
57
+ "@types/node-persist": "^3.1.8",
58
+ "@types/node-red": "^1.3.5",
59
+ "@types/node-red-node-test-helper": "^0.3.5",
60
+ "@types/semver": "^7.7.1",
61
+ "@types/uuid": "^10.0.0",
62
+ "del-cli": "^7.0.0",
63
+ "husky": "^9.1.7",
64
+ "node-red": "^4.1.1",
65
+ "node-red-node-test-helper": "^0.3.5",
66
+ "ts-node": "^10.9.2",
67
+ "typescript": "^5.9.3",
68
+ "vitest": "^4.0.13"
69
+ },
70
+ "vitest": {
71
+ "test": {
72
+ "environment": "node",
73
+ "testTimeout": 30000,
74
+ "include": [
75
+ "src/**/*.test.ts"
76
+ ]
77
+ }
78
+ },
79
+ "engines": {
80
+ "node": "^20 || ^22 || ^24"
81
+ },
82
+ "files": [
83
+ "/build",
84
+ "/examples"
85
+ ]
84
86
  }