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

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 (125) hide show
  1. package/build/lib/HAPHostNode.js +185 -148
  2. package/build/lib/HAPServiceNode.js +200 -177
  3. package/build/lib/HAPServiceNode2.js +208 -177
  4. package/build/lib/NRCHKBError.js +23 -2
  5. package/build/lib/PairingQRCode.js +62 -0
  6. package/build/lib/Storage.js +152 -90
  7. package/build/lib/api.js +654 -291
  8. package/build/lib/camera/CameraControl.js +125 -0
  9. package/build/lib/camera/CameraDelegate.js +507 -0
  10. package/build/lib/camera/MP4StreamingServer.js +159 -0
  11. package/build/lib/hap/HAPCharacteristic.js +25 -4
  12. package/build/lib/hap/HAPService.js +25 -4
  13. package/build/lib/hap/eve-app/EveCharacteristics.js +124 -81
  14. package/build/lib/hap/eve-app/EveServices.js +50 -17
  15. package/build/lib/hap/hap-nodejs.js +32 -0
  16. package/build/lib/migration/HomeKitService2Migration.js +34 -0
  17. package/build/lib/migration/NodeMigration.js +75 -0
  18. package/build/lib/types/AccessoryInformationType.js +15 -1
  19. package/build/lib/types/CameraConfigType.js +15 -1
  20. package/build/lib/types/CustomCharacteristicType.js +15 -1
  21. package/build/lib/types/HAPHostConfigType.js +15 -1
  22. package/build/lib/types/HAPHostNodeType.js +15 -1
  23. package/build/lib/types/HAPService2ConfigType.js +15 -1
  24. package/build/lib/types/HAPService2NodeType.js +15 -1
  25. package/build/lib/types/HAPServiceConfigType.js +15 -1
  26. package/build/lib/types/HAPServiceNodeType.js +15 -1
  27. package/build/lib/types/HAPStatusConfigType.js +15 -1
  28. package/build/lib/types/HAPStatusNodeType.js +15 -1
  29. package/build/lib/types/HostType.js +28 -7
  30. package/build/lib/types/NodeType.js +15 -1
  31. package/build/lib/types/PublishTimersType.js +15 -1
  32. package/build/lib/types/UniFiControllerConfigType.js +16 -0
  33. package/build/lib/types/hap-nodejs/HapAdaptiveLightingControllerMode.js +28 -7
  34. package/build/lib/types/hap-nodejs/HapCategories.js +64 -43
  35. package/build/lib/types/storage/SerializedHostType.js +15 -1
  36. package/build/lib/types/storage/StorageType.js +34 -10
  37. package/build/lib/unifi/ProtectDiscovery.js +80 -0
  38. package/build/lib/utils/AccessoryUtils.js +152 -110
  39. package/build/lib/utils/BridgeUtils.js +95 -39
  40. package/build/lib/utils/CharacteristicUtils.js +5 -49
  41. package/build/lib/utils/CharacteristicUtils2.js +5 -49
  42. package/build/lib/utils/CharacteristicUtilsBase.js +81 -0
  43. package/build/lib/utils/NodeStatusUtils.js +89 -40
  44. package/build/lib/utils/ServiceUtils.js +433 -371
  45. package/build/lib/utils/ServiceUtils2.js +519 -305
  46. package/build/lib/utils/index.js +11 -12
  47. package/build/nodes/bridge.html +206 -168
  48. package/build/nodes/bridge.js +27 -9
  49. package/build/nodes/locales/en-US/node-red-contrib-homekit-bridged.json +22 -0
  50. package/build/nodes/nrchkb.html +1753 -117
  51. package/build/nodes/nrchkb.js +66 -88
  52. package/build/nodes/plugin-instance.html +509 -0
  53. package/build/nodes/plugin-instance.js +46 -0
  54. package/build/nodes/service.html +557 -306
  55. package/build/nodes/service.js +5 -6
  56. package/build/nodes/service2.html +1735 -455
  57. package/build/nodes/service2.js +5 -8
  58. package/build/nodes/standalone.html +208 -176
  59. package/build/nodes/standalone.js +27 -9
  60. package/build/nodes/status.html +51 -18
  61. package/build/nodes/status.js +47 -41
  62. package/build/nodes/unifi-controller.html +92 -0
  63. package/build/nodes/unifi-controller.js +20 -0
  64. package/build/plugins/embedded/homebridge-camera-ffmpeg/index.js +479 -0
  65. package/build/plugins/embedded/homebridge-unifi-protect/index.js +521 -0
  66. package/build/plugins/embedded/index.js +58 -0
  67. package/build/plugins/nrchkb-homekit-plugins.js +17 -0
  68. package/build/plugins/registry/index.js +203 -0
  69. package/build/plugins/registry/types.js +16 -0
  70. package/build/scripts/migrate-homekit-service-flows.js +47 -0
  71. package/examples/demo/01 - ALL Demos single import.json +1885 -2139
  72. package/examples/demo/02 - Air Purifier.json +12 -61
  73. package/examples/demo/03 - Air Quality sensor with Battery.json +8 -36
  74. package/examples/demo/04 - Dimmable Bulb.json +4 -21
  75. package/examples/demo/05 - Color Bulb (HSV).json +5 -26
  76. package/examples/demo/06 - Fan (simple, 3 speeds).json +6 -31
  77. package/examples/demo/07 - Fan (with speed, oscillate, rotation direction).json +4 -21
  78. package/examples/demo/08 - CO2 detector.json +8 -39
  79. package/examples/demo/09 - CO (carbon monoxide) example.json +9 -44
  80. package/examples/demo/10 - Door window contact sensor.json +8 -39
  81. package/examples/demos (advanced)/01 - Television with inputs and speaker.json +19 -85
  82. package/examples/switch/01 - Plain Switch.json +179 -199
  83. package/package.json +48 -34
  84. package/build/lib/HAPHostNode.d.ts +0 -1
  85. package/build/lib/HAPServiceNode.d.ts +0 -1
  86. package/build/lib/HAPServiceNode2.d.ts +0 -1
  87. package/build/lib/NRCHKBError.d.ts +0 -3
  88. package/build/lib/Storage.d.ts +0 -30
  89. package/build/lib/api.d.ts +0 -1
  90. package/build/lib/hap/HAPCharacteristic.d.ts +0 -9
  91. package/build/lib/hap/HAPService.d.ts +0 -6
  92. package/build/lib/hap/eve-app/EveCharacteristics.d.ts +0 -20
  93. package/build/lib/hap/eve-app/EveServices.d.ts +0 -5
  94. package/build/lib/types/AccessoryInformationType.d.ts +0 -11
  95. package/build/lib/types/CameraConfigType.d.ts +0 -24
  96. package/build/lib/types/CustomCharacteristicType.d.ts +0 -6
  97. package/build/lib/types/HAPHostConfigType.d.ts +0 -22
  98. package/build/lib/types/HAPHostNodeType.d.ts +0 -14
  99. package/build/lib/types/HAPService2ConfigType.d.ts +0 -6
  100. package/build/lib/types/HAPService2NodeType.d.ts +0 -7
  101. package/build/lib/types/HAPServiceConfigType.d.ts +0 -26
  102. package/build/lib/types/HAPServiceNodeType.d.ts +0 -38
  103. package/build/lib/types/HAPStatusConfigType.d.ts +0 -5
  104. package/build/lib/types/HAPStatusNodeType.d.ts +0 -12
  105. package/build/lib/types/HostType.d.ts +0 -5
  106. package/build/lib/types/NodeType.d.ts +0 -3
  107. package/build/lib/types/PublishTimersType.d.ts +0 -4
  108. package/build/lib/types/hap-nodejs/HapAdaptiveLightingControllerMode.d.ts +0 -5
  109. package/build/lib/types/hap-nodejs/HapCategories.d.ts +0 -41
  110. package/build/lib/types/storage/SerializedHostType.d.ts +0 -5
  111. package/build/lib/types/storage/StorageType.d.ts +0 -8
  112. package/build/lib/utils/AccessoryUtils.d.ts +0 -1
  113. package/build/lib/utils/BridgeUtils.d.ts +0 -1
  114. package/build/lib/utils/CharacteristicUtils.d.ts +0 -1
  115. package/build/lib/utils/CharacteristicUtils2.d.ts +0 -1
  116. package/build/lib/utils/NodeStatusUtils.d.ts +0 -17
  117. package/build/lib/utils/ServiceUtils.d.ts +0 -1
  118. package/build/lib/utils/ServiceUtils2.d.ts +0 -1
  119. package/build/lib/utils/index.d.ts +0 -1
  120. package/build/nodes/bridge.d.ts +0 -1
  121. package/build/nodes/nrchkb.d.ts +0 -1
  122. package/build/nodes/service.d.ts +0 -1
  123. package/build/nodes/service2.d.ts +0 -1
  124. package/build/nodes/standalone.d.ts +0 -1
  125. package/build/nodes/status.d.ts +0 -1
@@ -1,203 +1,183 @@
1
1
  [
2
- {
3
- "id": "fd58cee.fbdb73",
4
- "type": "tab",
5
- "label": "Switch Example",
6
- "disabled": false,
7
- "info": ""
8
- },
9
- {
10
- "id": "38688705.a04688",
11
- "type": "group",
12
- "z": "fd58cee.fbdb73",
13
- "name": "Output debug",
14
- "style": {
15
- "label": true
2
+ {
3
+ "id": "fd58cee.fbdb73",
4
+ "type": "tab",
5
+ "label": "Switch Example",
6
+ "disabled": false,
7
+ "info": ""
16
8
  },
17
- "nodes": [
18
- "d6f9e9ce.b3af8"
19
- ],
20
- "x": 434,
21
- "y": 79,
22
- "w": 212,
23
- "h": 82
24
- },
25
- {
26
- "id": "d1632249.c45458",
27
- "type": "group",
28
- "z": "fd58cee.fbdb73",
29
- "name": "HomeKit Switch Accessory",
30
- "style": {
31
- "stroke": "#ffC000",
32
- "label": true
9
+ {
10
+ "id": "38688705.a04688",
11
+ "type": "group",
12
+ "z": "fd58cee.fbdb73",
13
+ "name": "Output debug",
14
+ "style": {
15
+ "label": true
16
+ },
17
+ "nodes": ["d6f9e9ce.b3af8"],
18
+ "x": 434,
19
+ "y": 79,
20
+ "w": 212,
21
+ "h": 82
33
22
  },
34
- "nodes": [
35
- "4ea13695.19871"
36
- ],
37
- "x": 234,
38
- "y": 79,
39
- "w": 192,
40
- "h": 82
41
- },
42
- {
43
- "id": "d3163811.ca7aa8",
44
- "type": "group",
45
- "z": "fd58cee.fbdb73",
46
- "name": "Controls",
47
- "style": {
48
- "label": true
23
+ {
24
+ "id": "d1632249.c45458",
25
+ "type": "group",
26
+ "z": "fd58cee.fbdb73",
27
+ "name": "HomeKit Switch Accessory",
28
+ "style": {
29
+ "stroke": "#ffC000",
30
+ "label": true
31
+ },
32
+ "nodes": ["4ea13695.19871"],
33
+ "x": 234,
34
+ "y": 79,
35
+ "w": 192,
36
+ "h": 82
49
37
  },
50
- "nodes": [
51
- "e02112b7.b761d",
52
- "e9073d2c.84e64"
53
- ],
54
- "x": 54,
55
- "y": 59,
56
- "w": 172,
57
- "h": 122
58
- },
59
- {
60
- "id": "4ea13695.19871",
61
- "type": "homekit-service",
62
- "z": "fd58cee.fbdb73",
63
- "g": "d1632249.c45458",
64
- "isParent": true,
65
- "bridge": "3dcda60a.e5ff12",
66
- "parentService": "",
67
- "name": "My Switch",
68
- "serviceName": "Switch",
69
- "topic": "",
70
- "filter": false,
71
- "manufacturer": "NRCHKB",
72
- "model": "0.120.5",
73
- "serialNo": "Default Serial Number",
74
- "firmwareRev": "0.120.5",
75
- "hardwareRev": "0.120.5",
76
- "softwareRev": "0.120.5",
77
- "cameraConfigVideoProcessor": "ffmpeg",
78
- "cameraConfigSource": "",
79
- "cameraConfigStillImageSource": "",
80
- "cameraConfigMaxStreams": 2,
81
- "cameraConfigMaxWidth": 1280,
82
- "cameraConfigMaxHeight": 720,
83
- "cameraConfigMaxFPS": 10,
84
- "cameraConfigMaxBitrate": 300,
85
- "cameraConfigVideoCodec": "libx264",
86
- "cameraConfigAudioCodec": "libfdk_aac",
87
- "cameraConfigAudio": false,
88
- "cameraConfigPacketSize": 1316,
89
- "cameraConfigVerticalFlip": false,
90
- "cameraConfigHorizontalFlip": false,
91
- "cameraConfigMapVideo": "0:0",
92
- "cameraConfigMapAudio": "0:1",
93
- "cameraConfigVideoFilter": "scale=1280:720",
94
- "cameraConfigAdditionalCommandLine": "-tune zerolatency",
95
- "cameraConfigDebug": false,
96
- "cameraConfigSnapshotOutput": "disabled",
97
- "cameraConfigInterfaceName": "",
98
- "characteristicProperties": "{}",
99
- "outputs": 2,
100
- "x": 330,
101
- "y": 120,
102
- "wires": [
103
- [
104
- "d6f9e9ce.b3af8"
105
- ],
106
- []
107
- ]
108
- },
109
- {
110
- "id": "d6f9e9ce.b3af8",
111
- "type": "debug",
112
- "z": "fd58cee.fbdb73",
113
- "g": "38688705.a04688",
114
- "name": "",
115
- "active": true,
116
- "tosidebar": true,
117
- "console": false,
118
- "tostatus": false,
119
- "complete": "payload",
120
- "targetType": "msg",
121
- "statusVal": "",
122
- "statusType": "auto",
123
- "x": 530,
124
- "y": 120,
125
- "wires": []
126
- },
127
- {
128
- "id": "e02112b7.b761d",
129
- "type": "inject",
130
- "z": "fd58cee.fbdb73",
131
- "g": "d3163811.ca7aa8",
132
- "name": "On",
133
- "props": [
134
- {
135
- "p": "payload"
136
- }
137
- ],
138
- "repeat": "",
139
- "crontab": "",
140
- "once": false,
141
- "onceDelay": 0.1,
142
- "topic": "",
143
- "payload": "{\"On\":true}",
144
- "payloadType": "json",
145
- "x": 150,
146
- "y": 100,
147
- "wires": [
148
- [
149
- "4ea13695.19871"
150
- ]
151
- ]
152
- },
153
- {
154
- "id": "e9073d2c.84e64",
155
- "type": "inject",
156
- "z": "fd58cee.fbdb73",
157
- "g": "d3163811.ca7aa8",
158
- "name": "Off",
159
- "props": [
160
- {
161
- "p": "payload"
162
- }
163
- ],
164
- "repeat": "",
165
- "crontab": "",
166
- "once": false,
167
- "onceDelay": 0.1,
168
- "topic": "",
169
- "payload": "{\"On\":false}",
170
- "payloadType": "json",
171
- "x": 150,
172
- "y": 140,
173
- "wires": [
174
- [
175
- "4ea13695.19871"
176
- ]
177
- ]
178
- },
179
- {
180
- "id": "3dcda60a.e5ff12",
181
- "type": "homekit-bridge",
182
- "z": "",
183
- "bridgeName": "My Bridge",
184
- "pinCode": "111-11-111",
185
- "port": "",
186
- "allowInsecureRequest": false,
187
- "manufacturer": "NRCHKB",
188
- "model": "0.120.5",
189
- "serialNo": "Default Serial Number",
190
- "firmwareRev": "0.120.5",
191
- "hardwareRev": "0.120.5",
192
- "softwareRev": "0.120.5",
193
- "customMdnsConfig": false,
194
- "mdnsMulticast": true,
195
- "mdnsInterface": "",
196
- "mdnsPort": "",
197
- "mdnsIp": "",
198
- "mdnsTtl": "",
199
- "mdnsLoopback": true,
200
- "mdnsReuseAddr": true,
201
- "allowMessagePassthrough": true
202
- }
203
- ]
38
+ {
39
+ "id": "d3163811.ca7aa8",
40
+ "type": "group",
41
+ "z": "fd58cee.fbdb73",
42
+ "name": "Controls",
43
+ "style": {
44
+ "label": true
45
+ },
46
+ "nodes": ["e02112b7.b761d", "e9073d2c.84e64"],
47
+ "x": 54,
48
+ "y": 59,
49
+ "w": 172,
50
+ "h": 122
51
+ },
52
+ {
53
+ "id": "4ea13695.19871",
54
+ "type": "homekit-service",
55
+ "z": "fd58cee.fbdb73",
56
+ "g": "d1632249.c45458",
57
+ "isParent": true,
58
+ "bridge": "3dcda60a.e5ff12",
59
+ "parentService": "",
60
+ "name": "My Switch",
61
+ "serviceName": "Switch",
62
+ "topic": "",
63
+ "filter": false,
64
+ "manufacturer": "NRCHKB",
65
+ "model": "0.120.5",
66
+ "serialNo": "Default Serial Number",
67
+ "firmwareRev": "0.120.5",
68
+ "hardwareRev": "0.120.5",
69
+ "softwareRev": "0.120.5",
70
+ "cameraConfigVideoProcessor": "ffmpeg",
71
+ "cameraConfigSource": "",
72
+ "cameraConfigStillImageSource": "",
73
+ "cameraConfigMaxStreams": 2,
74
+ "cameraConfigMaxWidth": 1280,
75
+ "cameraConfigMaxHeight": 720,
76
+ "cameraConfigMaxFPS": 10,
77
+ "cameraConfigMaxBitrate": 300,
78
+ "cameraConfigVideoCodec": "libx264",
79
+ "cameraConfigAudioCodec": "libfdk_aac",
80
+ "cameraConfigAudio": false,
81
+ "cameraConfigPacketSize": 1316,
82
+ "cameraConfigVerticalFlip": false,
83
+ "cameraConfigHorizontalFlip": false,
84
+ "cameraConfigMapVideo": "0:0",
85
+ "cameraConfigMapAudio": "0:1",
86
+ "cameraConfigVideoFilter": "scale=1280:720",
87
+ "cameraConfigAdditionalCommandLine": "-tune zerolatency",
88
+ "cameraConfigDebug": false,
89
+ "cameraConfigSnapshotOutput": "disabled",
90
+ "cameraConfigInterfaceName": "",
91
+ "characteristicProperties": "{}",
92
+ "outputs": 2,
93
+ "x": 330,
94
+ "y": 120,
95
+ "wires": [["d6f9e9ce.b3af8"], []]
96
+ },
97
+ {
98
+ "id": "d6f9e9ce.b3af8",
99
+ "type": "debug",
100
+ "z": "fd58cee.fbdb73",
101
+ "g": "38688705.a04688",
102
+ "name": "",
103
+ "active": true,
104
+ "tosidebar": true,
105
+ "console": false,
106
+ "tostatus": false,
107
+ "complete": "payload",
108
+ "targetType": "msg",
109
+ "statusVal": "",
110
+ "statusType": "auto",
111
+ "x": 530,
112
+ "y": 120,
113
+ "wires": []
114
+ },
115
+ {
116
+ "id": "e02112b7.b761d",
117
+ "type": "inject",
118
+ "z": "fd58cee.fbdb73",
119
+ "g": "d3163811.ca7aa8",
120
+ "name": "On",
121
+ "props": [
122
+ {
123
+ "p": "payload"
124
+ }
125
+ ],
126
+ "repeat": "",
127
+ "crontab": "",
128
+ "once": false,
129
+ "onceDelay": 0.1,
130
+ "topic": "",
131
+ "payload": "{\"On\":true}",
132
+ "payloadType": "json",
133
+ "x": 150,
134
+ "y": 100,
135
+ "wires": [["4ea13695.19871"]]
136
+ },
137
+ {
138
+ "id": "e9073d2c.84e64",
139
+ "type": "inject",
140
+ "z": "fd58cee.fbdb73",
141
+ "g": "d3163811.ca7aa8",
142
+ "name": "Off",
143
+ "props": [
144
+ {
145
+ "p": "payload"
146
+ }
147
+ ],
148
+ "repeat": "",
149
+ "crontab": "",
150
+ "once": false,
151
+ "onceDelay": 0.1,
152
+ "topic": "",
153
+ "payload": "{\"On\":false}",
154
+ "payloadType": "json",
155
+ "x": 150,
156
+ "y": 140,
157
+ "wires": [["4ea13695.19871"]]
158
+ },
159
+ {
160
+ "id": "3dcda60a.e5ff12",
161
+ "type": "homekit-bridge",
162
+ "z": "",
163
+ "bridgeName": "My Bridge",
164
+ "pinCode": "111-11-111",
165
+ "port": "",
166
+ "allowInsecureRequest": false,
167
+ "manufacturer": "NRCHKB",
168
+ "model": "0.120.5",
169
+ "serialNo": "Default Serial Number",
170
+ "firmwareRev": "0.120.5",
171
+ "hardwareRev": "0.120.5",
172
+ "softwareRev": "0.120.5",
173
+ "customMdnsConfig": false,
174
+ "mdnsMulticast": true,
175
+ "mdnsInterface": "",
176
+ "mdnsPort": "",
177
+ "mdnsIp": "",
178
+ "mdnsTtl": "",
179
+ "mdnsLoopback": true,
180
+ "mdnsReuseAddr": true,
181
+ "allowMessagePassthrough": true
182
+ }
183
+ ]
package/package.json CHANGED
@@ -1,15 +1,21 @@
1
1
  {
2
2
  "name": "node-red-contrib-homekit-bridged",
3
- "version": "2.0.0-dev.0",
3
+ "version": "2.0.0-dev.10",
4
4
  "description": "Node-RED nodes to simulate Apple HomeKit devices.",
5
5
  "main": "build/nodes/nrchkb.js",
6
6
  "scripts": {
7
- "build": "npm run clean && tsc",
8
7
  "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"
8
+ "build": "npm run clean && node esbuild.config.js",
9
+ "watch:ts": "node esbuild.config.js --watch",
10
+ "watch:nodered": "nodemon --watch build -e js,html --exec node-red",
11
+ "dev": "concurrently \"npm run watch:ts\" \"npm run watch:nodered\"",
12
+ "test": "vitest run",
13
+ "test:ci": "vitest run --no-file-parallelism",
14
+ "test:watch": "vitest",
15
+ "migrate:service2": "node build/scripts/migrate-homekit-service-flows.js",
16
+ "format": "biome format --write",
17
+ "lint": "biome check",
18
+ "prepare": "husky || true"
13
19
  },
14
20
  "repository": {
15
21
  "type": "git",
@@ -31,9 +37,14 @@
31
37
  "standalone": "build/nodes/standalone.js",
32
38
  "service": "build/nodes/service.js",
33
39
  "service2": "build/nodes/service2.js",
34
- "status": "build/nodes/status.js"
40
+ "status": "build/nodes/status.js",
41
+ "unifi-controller": "build/nodes/unifi-controller.js",
42
+ "plugin-instance": "build/nodes/plugin-instance.js"
35
43
  },
36
- "version": ">=1.3.7"
44
+ "plugins": {
45
+ "nrchkb-homekit-plugins": "build/plugins/nrchkb-homekit-plugins.js"
46
+ },
47
+ "version": ">=5.0.0"
37
48
  },
38
49
  "author": "Tadeusz Wyrzykowski <shaquu@icloud.com> (https://github.com/Shaquu)",
39
50
  "license": "Apache-2.0",
@@ -42,43 +53,46 @@
42
53
  },
43
54
  "homepage": "https://github.com/NRCHKB/node-red-contrib-homekit-bridged#readme",
44
55
  "dependencies": {
45
- "@nrchkb/logger": "~3.1.1",
46
- "@homebridge/hap-nodejs": "2.0.2",
56
+ "@homebridge-plugins/homebridge-camera-ffmpeg": "^4.1.0",
57
+ "@homebridge/hap-nodejs": "2.1.7",
58
+ "@nrchkb/logger": "~3.2.1",
59
+ "homebridge-unifi-protect": "^7.29.0",
60
+ "homekit-code": "^1.2.13",
47
61
  "node-persist": "^3.1.3",
48
- "semver": "~7.7.3",
49
- "uuid": "~11.0.5"
62
+ "semver": "~7.8.4",
63
+ "uuid": "~14.0.0"
50
64
  },
51
65
  "devDependencies": {
52
- "@homebridge/ciao": "~1.3.4",
53
- "@node-red/registry": "^4.1.1",
54
- "@types/mocha": "^10.0.10",
55
- "@types/node": "^20",
66
+ "@biomejs/biome": "2.5.0",
67
+ "@homebridge/ciao": "~1.3.9",
68
+ "@node-red/registry": "^5.0.0",
69
+ "@types/node": "^24.0.0",
56
70
  "@types/node-persist": "^3.1.8",
57
71
  "@types/node-red": "^1.3.5",
58
72
  "@types/node-red-node-test-helper": "^0.3.5",
59
73
  "@types/semver": "^7.7.1",
60
74
  "@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",
75
+ "concurrently": "^9.2.1",
76
+ "del-cli": "^7.0.0",
77
+ "esbuild": "^0.28.1",
78
+ "glob": "^13.0.6",
69
79
  "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",
80
+ "node-red": "^5.0.0",
81
+ "node-red-node-test-helper": "^0.3.6",
82
+ "nodemon": "^3.1.14",
74
83
  "ts-node": "^10.9.2",
75
- "typescript": "^5.7.3"
84
+ "typescript": "^6.0.3",
85
+ "vitest": "^4.1.9"
86
+ },
87
+ "vitest": {
88
+ "test": {
89
+ "environment": "node",
90
+ "testTimeout": 30000,
91
+ "include": ["src/**/*.test.ts"]
92
+ }
76
93
  },
77
94
  "engines": {
78
- "node": "^20 || ^22 || ^24"
95
+ "node": ">=22.9.0"
79
96
  },
80
- "files": [
81
- "/build",
82
- "/examples"
83
- ]
97
+ "files": ["/build", "/examples"]
84
98
  }
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,3 +0,0 @@
1
- declare class NRCHKBError extends Error {
2
- }
3
- export default NRCHKBError;
@@ -1,30 +0,0 @@
1
- import { CharacteristicEventTypes, SerializedAccessory, SerializedService } from '@homebridge/hap-nodejs';
2
- import storage, { InitOptions } from 'node-persist';
3
- import { SerializedHostType } from './types/storage/SerializedHostType';
4
- import { StorageType } from './types/storage/StorageType';
5
- type EventCallback = {
6
- event: CharacteristicEventTypes;
7
- callback: (value?: any) => void;
8
- };
9
- export declare class Storage {
10
- private static customStoragePath;
11
- private static storageInitialized;
12
- private static memoryStorage;
13
- private static log;
14
- static storagePath(): string;
15
- static init(...storagePathSegments: string[]): Promise<InitOptions>;
16
- static save(type: StorageType, key: string | undefined, value: unknown): Promise<storage.WriteFileResult>;
17
- static saveCallback(eventCallback: EventCallback, ttl?: number): string;
18
- static saveCustomCharacteristics(value: unknown): Promise<storage.WriteFileResult>;
19
- static saveService(key: string, value: unknown): Promise<storage.WriteFileResult>;
20
- static saveAccessory(key: string, value: unknown): Promise<storage.WriteFileResult>;
21
- static saveHost(key: string, serializedHost: SerializedHostType): Promise<storage.WriteFileResult>;
22
- static load(type: StorageType, key?: string): Promise<any>;
23
- static loadCallback(key: string): EventCallback | undefined;
24
- static loadCustomCharacteristics(): Promise<any>;
25
- static loadService(key: string): Promise<SerializedService>;
26
- static loadAccessory(key: string): Promise<SerializedAccessory>;
27
- static loadHost(key: string): Promise<SerializedHostType>;
28
- static uuid4Validate(uuid: string): boolean;
29
- }
30
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,9 +0,0 @@
1
- import { Characteristic } from '@homebridge/hap-nodejs';
2
- import { EveS2R1, EveS2R2, EveS2W1, EveS2W2 } from './eve-app/EveCharacteristics';
3
- declare class HAPCharacteristic extends Characteristic {
4
- static EveS2R1: typeof EveS2R1;
5
- static EveS2R2: typeof EveS2R2;
6
- static EveS2W1: typeof EveS2W1;
7
- static EveS2W2: typeof EveS2W2;
8
- }
9
- export default HAPCharacteristic;
@@ -1,6 +0,0 @@
1
- import { Service } from '@homebridge/hap-nodejs';
2
- import { EveHistoryData } from './eve-app/EveServices';
3
- declare class HAPService extends Service {
4
- static EveHistoryData: typeof EveHistoryData;
5
- }
6
- export default HAPService;
@@ -1,20 +0,0 @@
1
- import CustomCharacteristicType from '../../types/CustomCharacteristicType';
2
- import HAPCharacteristic from '../HAPCharacteristic';
3
- declare const EveCharacteristics: CustomCharacteristicType[];
4
- export declare class EveS2R1 extends HAPCharacteristic {
5
- static readonly UUID: string;
6
- constructor();
7
- }
8
- export declare class EveS2R2 extends HAPCharacteristic {
9
- static readonly UUID: string;
10
- constructor();
11
- }
12
- export declare class EveS2W1 extends HAPCharacteristic {
13
- static readonly UUID: string;
14
- constructor();
15
- }
16
- export declare class EveS2W2 extends HAPCharacteristic {
17
- static readonly UUID: string;
18
- constructor();
19
- }
20
- export default EveCharacteristics;
@@ -1,5 +0,0 @@
1
- import HAPService from '../HAPService';
2
- export declare class EveHistoryData extends HAPService {
3
- static readonly UUID: string;
4
- constructor();
5
- }
@@ -1,11 +0,0 @@
1
- type AccessoryInformationType = {
2
- UUID: string;
3
- name: string;
4
- manufacturer: string;
5
- serialNo: string;
6
- model: string;
7
- firmwareRev: string;
8
- hardwareRev?: string;
9
- softwareRev?: string;
10
- };
11
- export default AccessoryInformationType;
@@ -1,24 +0,0 @@
1
- type CameraConfigType = {
2
- cameraConfigVideoProcessor: string;
3
- cameraConfigSource: string;
4
- cameraConfigStillImageSource?: string;
5
- cameraConfigMaxStreams: number;
6
- cameraConfigMaxWidth: number;
7
- cameraConfigMaxHeight: number;
8
- cameraConfigMaxFPS: number;
9
- cameraConfigMaxBitrate: number;
10
- cameraConfigVideoCodec: string;
11
- cameraConfigAudioCodec: string;
12
- cameraConfigAudio: string;
13
- cameraConfigPacketSize: number;
14
- cameraConfigVerticalFlip: boolean;
15
- cameraConfigHorizontalFlip: boolean;
16
- cameraConfigMapVideo: string;
17
- cameraConfigMapAudio: string;
18
- cameraConfigVideoFilter: string;
19
- cameraConfigAdditionalCommandLine: string;
20
- cameraConfigDebug: boolean;
21
- cameraConfigSnapshotOutput: string;
22
- cameraConfigInterfaceName: string;
23
- };
24
- export default CameraConfigType;