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
@@ -1,268 +1,237 @@
1
1
  [
2
- {
3
- "id": "a875cc7.a4c42b",
4
- "type": "group",
5
- "z": "60b06629.a2ebd",
6
- "name": "Contact Sensor: input only sensor",
7
- "style": {
8
- "stroke": "#999999",
9
- "fill": "none",
10
- "label": true,
11
- "label-position": "nw",
12
- "color": "#a4a4a4"
13
- },
14
- "nodes": [
15
- "a5194c26.18c628",
16
- "2f9bc0d.42a73c",
17
- "dfca0b2d.8b8e8",
18
- "d74a610c.09a36",
19
- "c15b6468.ae2eb8",
20
- "6f7bc7fa.7f4f6",
21
- "99b55eb3.e31bf8",
22
- "508d9ccf.29e404"
23
- ],
24
- "x": 14,
25
- "y": 1359,
26
- "w": 752,
27
- "h": 242,
28
- "info": "# Contact Sensor\n\nThe contact sensor has one inject node to Open the sensor (door, window, etc). Once open, a ten second timer will run then set it back to closed.\n\nAdditional inputs are for \"No Response\", \"Tampered\", and \"Battery\". Note that this battery will not show a battery level but only a good/low battery status."
2
+ {
3
+ "id": "a875cc7.a4c42b",
4
+ "type": "group",
5
+ "z": "60b06629.a2ebd",
6
+ "name": "Contact Sensor: input only sensor",
7
+ "style": {
8
+ "stroke": "#999999",
9
+ "fill": "none",
10
+ "label": true,
11
+ "label-position": "nw",
12
+ "color": "#a4a4a4"
29
13
  },
30
- {
31
- "id": "a5194c26.18c628",
32
- "type": "homekit-service",
33
- "z": "60b06629.a2ebd",
34
- "g": "a875cc7.a4c42b",
35
- "isParent": true,
36
- "bridge": "409001a1.3e7a78",
37
- "parentService": "",
38
- "name": "Contact Sensor",
39
- "serviceName": "ContactSensor",
40
- "topic": "",
41
- "filter": false,
42
- "manufacturer": "Full Contact",
43
- "model": "Door",
44
- "serialNo": "Sensor",
45
- "firmwareRev": "1.0.0",
46
- "hardwareRev": "1.0.0",
47
- "softwareRev": "1.0.0",
48
- "cameraConfigVideoProcessor": "ffmpeg",
49
- "cameraConfigSource": "",
50
- "cameraConfigStillImageSource": "",
51
- "cameraConfigMaxStreams": 2,
52
- "cameraConfigMaxWidth": 1280,
53
- "cameraConfigMaxHeight": 720,
54
- "cameraConfigMaxFPS": 10,
55
- "cameraConfigMaxBitrate": 300,
56
- "cameraConfigVideoCodec": "libx264",
57
- "cameraConfigAudioCodec": "libfdk_aac",
58
- "cameraConfigAudio": false,
59
- "cameraConfigPacketSize": 1316,
60
- "cameraConfigVerticalFlip": false,
61
- "cameraConfigHorizontalFlip": false,
62
- "cameraConfigMapVideo": "0:0",
63
- "cameraConfigMapAudio": "0:1",
64
- "cameraConfigVideoFilter": "scale=1280:720",
65
- "cameraConfigAdditionalCommandLine": "-tune zerolatency",
66
- "cameraConfigDebug": false,
67
- "cameraConfigSnapshotOutput": "disabled",
68
- "cameraConfigInterfaceName": "",
69
- "characteristicProperties": "{\n \"StatusTampered\":true,\n \"StatusLowBattery\":true\n}",
70
- "outputs": 2,
71
- "x": 660,
72
- "y": 1400,
73
- "wires": [
74
- [],
75
- []
76
- ]
77
- },
78
- {
79
- "id": "2f9bc0d.42a73c",
80
- "type": "inject",
81
- "z": "60b06629.a2ebd",
82
- "g": "a875cc7.a4c42b",
83
- "name": "Tampered",
84
- "repeat": "",
85
- "crontab": "",
86
- "once": false,
87
- "onceDelay": 0.1,
88
- "topic": "",
89
- "payload": "{\"StatusTampered\":1}",
90
- "payloadType": "json",
91
- "x": 120,
92
- "y": 1520,
93
- "wires": [
94
- [
95
- "a5194c26.18c628"
96
- ]
97
- ]
98
- },
99
- {
100
- "id": "dfca0b2d.8b8e8",
101
- "type": "inject",
102
- "z": "60b06629.a2ebd",
103
- "g": "a875cc7.a4c42b",
104
- "name": "Clear tampered",
105
- "repeat": "",
106
- "crontab": "",
107
- "once": false,
108
- "onceDelay": 0.1,
109
- "topic": "",
110
- "payload": "{\"StatusTampered\":0}",
111
- "payloadType": "json",
112
- "x": 140,
113
- "y": 1560,
114
- "wires": [
115
- [
116
- "a5194c26.18c628"
117
- ]
118
- ]
119
- },
120
- {
121
- "id": "d74a610c.09a36",
122
- "type": "inject",
123
- "z": "60b06629.a2ebd",
124
- "g": "a875cc7.a4c42b",
125
- "name": "Low batt",
126
- "repeat": "",
127
- "crontab": "",
128
- "once": false,
129
- "onceDelay": 0.1,
130
- "topic": "",
131
- "payload": "{\"StatusLowBattery\":1}",
132
- "payloadType": "json",
133
- "x": 480,
134
- "y": 1520,
135
- "wires": [
136
- [
137
- "a5194c26.18c628"
138
- ]
139
- ]
140
- },
141
- {
142
- "id": "c15b6468.ae2eb8",
143
- "type": "inject",
144
- "z": "60b06629.a2ebd",
145
- "g": "a875cc7.a4c42b",
146
- "name": "Good batt",
147
- "repeat": "",
148
- "crontab": "",
149
- "once": false,
150
- "onceDelay": 0.1,
151
- "topic": "",
152
- "payload": "{\"StatusLowBattery\":0}",
153
- "payloadType": "json",
154
- "x": 480,
155
- "y": 1560,
156
- "wires": [
157
- [
158
- "a5194c26.18c628"
159
- ]
160
- ]
161
- },
162
- {
163
- "id": "6f7bc7fa.7f4f6",
164
- "type": "inject",
165
- "z": "60b06629.a2ebd",
166
- "g": "a875cc7.a4c42b",
167
- "name": "NO RESPONSE",
168
- "props": [
169
- {
170
- "p": "payload"
171
- },
172
- {
173
- "p": "topic",
174
- "vt": "str"
175
- }
176
- ],
177
- "repeat": "",
178
- "crontab": "",
179
- "once": false,
180
- "onceDelay": 0.1,
181
- "topic": "",
182
- "payload": "{\"ContactSensorState\":\"NO_RESPONSE\"}",
183
- "payloadType": "json",
184
- "x": 140,
185
- "y": 1460,
186
- "wires": [
187
- [
188
- "a5194c26.18c628"
189
- ]
190
- ]
191
- },
192
- {
193
- "id": "99b55eb3.e31bf8",
194
- "type": "trigger",
195
- "z": "60b06629.a2ebd",
196
- "g": "a875cc7.a4c42b",
197
- "name": "10 Sec open",
198
- "op1": "",
199
- "op2": "{\"ContactSensorState\":0}",
200
- "op1type": "pay",
201
- "op2type": "json",
202
- "duration": "10",
203
- "extend": false,
204
- "units": "s",
205
- "reset": "",
206
- "bytopic": "all",
207
- "topic": "topic",
208
- "outputs": 1,
209
- "x": 350,
210
- "y": 1400,
211
- "wires": [
212
- [
213
- "a5194c26.18c628"
214
- ]
215
- ]
216
- },
217
- {
218
- "id": "508d9ccf.29e404",
219
- "type": "inject",
220
- "z": "60b06629.a2ebd",
221
- "g": "a875cc7.a4c42b",
222
- "name": "Open",
223
- "props": [
224
- {
225
- "p": "payload"
226
- },
227
- {
228
- "p": "topic",
229
- "vt": "str"
230
- }
231
- ],
232
- "repeat": "",
233
- "crontab": "",
234
- "once": false,
235
- "onceDelay": "1",
236
- "topic": "",
237
- "payload": "{\"ContactSensorState\":1}",
238
- "payloadType": "json",
239
- "x": 110,
240
- "y": 1400,
241
- "wires": [
242
- [
243
- "99b55eb3.e31bf8"
244
- ]
245
- ]
246
- },
247
- {
248
- "id": "409001a1.3e7a78",
249
- "type": "homekit-bridge",
250
- "z": "",
251
- "bridgeName": "Demo 1",
252
- "pinCode": "153-10-538",
253
- "port": "",
254
- "allowInsecureRequest": false,
255
- "manufacturer": "NRCHKB",
256
- "model": "Demo",
257
- "serialNo": "1.1.2",
258
- "customMdnsConfig": false,
259
- "mdnsMulticast": true,
260
- "mdnsInterface": "",
261
- "mdnsPort": "",
262
- "mdnsIp": "",
263
- "mdnsTtl": "",
264
- "mdnsLoopback": true,
265
- "mdnsReuseAddr": true,
266
- "allowMessagePassthrough": true
267
- }
14
+ "nodes": [
15
+ "a5194c26.18c628",
16
+ "2f9bc0d.42a73c",
17
+ "dfca0b2d.8b8e8",
18
+ "d74a610c.09a36",
19
+ "c15b6468.ae2eb8",
20
+ "6f7bc7fa.7f4f6",
21
+ "99b55eb3.e31bf8",
22
+ "508d9ccf.29e404"
23
+ ],
24
+ "x": 14,
25
+ "y": 1359,
26
+ "w": 752,
27
+ "h": 242,
28
+ "info": "# Contact Sensor\n\nThe contact sensor has one inject node to Open the sensor (door, window, etc). Once open, a ten second timer will run then set it back to closed.\n\nAdditional inputs are for \"No Response\", \"Tampered\", and \"Battery\". Note that this battery will not show a battery level but only a good/low battery status."
29
+ },
30
+ {
31
+ "id": "a5194c26.18c628",
32
+ "type": "homekit-service",
33
+ "z": "60b06629.a2ebd",
34
+ "g": "a875cc7.a4c42b",
35
+ "isParent": true,
36
+ "bridge": "409001a1.3e7a78",
37
+ "parentService": "",
38
+ "name": "Contact Sensor",
39
+ "serviceName": "ContactSensor",
40
+ "topic": "",
41
+ "filter": false,
42
+ "manufacturer": "Full Contact",
43
+ "model": "Door",
44
+ "serialNo": "Sensor",
45
+ "firmwareRev": "1.0.0",
46
+ "hardwareRev": "1.0.0",
47
+ "softwareRev": "1.0.0",
48
+ "cameraConfigVideoProcessor": "ffmpeg",
49
+ "cameraConfigSource": "",
50
+ "cameraConfigStillImageSource": "",
51
+ "cameraConfigMaxStreams": 2,
52
+ "cameraConfigMaxWidth": 1280,
53
+ "cameraConfigMaxHeight": 720,
54
+ "cameraConfigMaxFPS": 10,
55
+ "cameraConfigMaxBitrate": 300,
56
+ "cameraConfigVideoCodec": "libx264",
57
+ "cameraConfigAudioCodec": "libfdk_aac",
58
+ "cameraConfigAudio": false,
59
+ "cameraConfigPacketSize": 1316,
60
+ "cameraConfigVerticalFlip": false,
61
+ "cameraConfigHorizontalFlip": false,
62
+ "cameraConfigMapVideo": "0:0",
63
+ "cameraConfigMapAudio": "0:1",
64
+ "cameraConfigVideoFilter": "scale=1280:720",
65
+ "cameraConfigAdditionalCommandLine": "-tune zerolatency",
66
+ "cameraConfigDebug": false,
67
+ "cameraConfigSnapshotOutput": "disabled",
68
+ "cameraConfigInterfaceName": "",
69
+ "characteristicProperties": "{\n \"StatusTampered\":true,\n \"StatusLowBattery\":true\n}",
70
+ "outputs": 2,
71
+ "x": 660,
72
+ "y": 1400,
73
+ "wires": [[], []]
74
+ },
75
+ {
76
+ "id": "2f9bc0d.42a73c",
77
+ "type": "inject",
78
+ "z": "60b06629.a2ebd",
79
+ "g": "a875cc7.a4c42b",
80
+ "name": "Tampered",
81
+ "repeat": "",
82
+ "crontab": "",
83
+ "once": false,
84
+ "onceDelay": 0.1,
85
+ "topic": "",
86
+ "payload": "{\"StatusTampered\":1}",
87
+ "payloadType": "json",
88
+ "x": 120,
89
+ "y": 1520,
90
+ "wires": [["a5194c26.18c628"]]
91
+ },
92
+ {
93
+ "id": "dfca0b2d.8b8e8",
94
+ "type": "inject",
95
+ "z": "60b06629.a2ebd",
96
+ "g": "a875cc7.a4c42b",
97
+ "name": "Clear tampered",
98
+ "repeat": "",
99
+ "crontab": "",
100
+ "once": false,
101
+ "onceDelay": 0.1,
102
+ "topic": "",
103
+ "payload": "{\"StatusTampered\":0}",
104
+ "payloadType": "json",
105
+ "x": 140,
106
+ "y": 1560,
107
+ "wires": [["a5194c26.18c628"]]
108
+ },
109
+ {
110
+ "id": "d74a610c.09a36",
111
+ "type": "inject",
112
+ "z": "60b06629.a2ebd",
113
+ "g": "a875cc7.a4c42b",
114
+ "name": "Low batt",
115
+ "repeat": "",
116
+ "crontab": "",
117
+ "once": false,
118
+ "onceDelay": 0.1,
119
+ "topic": "",
120
+ "payload": "{\"StatusLowBattery\":1}",
121
+ "payloadType": "json",
122
+ "x": 480,
123
+ "y": 1520,
124
+ "wires": [["a5194c26.18c628"]]
125
+ },
126
+ {
127
+ "id": "c15b6468.ae2eb8",
128
+ "type": "inject",
129
+ "z": "60b06629.a2ebd",
130
+ "g": "a875cc7.a4c42b",
131
+ "name": "Good batt",
132
+ "repeat": "",
133
+ "crontab": "",
134
+ "once": false,
135
+ "onceDelay": 0.1,
136
+ "topic": "",
137
+ "payload": "{\"StatusLowBattery\":0}",
138
+ "payloadType": "json",
139
+ "x": 480,
140
+ "y": 1560,
141
+ "wires": [["a5194c26.18c628"]]
142
+ },
143
+ {
144
+ "id": "6f7bc7fa.7f4f6",
145
+ "type": "inject",
146
+ "z": "60b06629.a2ebd",
147
+ "g": "a875cc7.a4c42b",
148
+ "name": "NO RESPONSE",
149
+ "props": [
150
+ {
151
+ "p": "payload"
152
+ },
153
+ {
154
+ "p": "topic",
155
+ "vt": "str"
156
+ }
157
+ ],
158
+ "repeat": "",
159
+ "crontab": "",
160
+ "once": false,
161
+ "onceDelay": 0.1,
162
+ "topic": "",
163
+ "payload": "{\"ContactSensorState\":\"NO_RESPONSE\"}",
164
+ "payloadType": "json",
165
+ "x": 140,
166
+ "y": 1460,
167
+ "wires": [["a5194c26.18c628"]]
168
+ },
169
+ {
170
+ "id": "99b55eb3.e31bf8",
171
+ "type": "trigger",
172
+ "z": "60b06629.a2ebd",
173
+ "g": "a875cc7.a4c42b",
174
+ "name": "10 Sec open",
175
+ "op1": "",
176
+ "op2": "{\"ContactSensorState\":0}",
177
+ "op1type": "pay",
178
+ "op2type": "json",
179
+ "duration": "10",
180
+ "extend": false,
181
+ "units": "s",
182
+ "reset": "",
183
+ "bytopic": "all",
184
+ "topic": "topic",
185
+ "outputs": 1,
186
+ "x": 350,
187
+ "y": 1400,
188
+ "wires": [["a5194c26.18c628"]]
189
+ },
190
+ {
191
+ "id": "508d9ccf.29e404",
192
+ "type": "inject",
193
+ "z": "60b06629.a2ebd",
194
+ "g": "a875cc7.a4c42b",
195
+ "name": "Open",
196
+ "props": [
197
+ {
198
+ "p": "payload"
199
+ },
200
+ {
201
+ "p": "topic",
202
+ "vt": "str"
203
+ }
204
+ ],
205
+ "repeat": "",
206
+ "crontab": "",
207
+ "once": false,
208
+ "onceDelay": "1",
209
+ "topic": "",
210
+ "payload": "{\"ContactSensorState\":1}",
211
+ "payloadType": "json",
212
+ "x": 110,
213
+ "y": 1400,
214
+ "wires": [["99b55eb3.e31bf8"]]
215
+ },
216
+ {
217
+ "id": "409001a1.3e7a78",
218
+ "type": "homekit-bridge",
219
+ "z": "",
220
+ "bridgeName": "Demo 1",
221
+ "pinCode": "153-10-538",
222
+ "port": "",
223
+ "allowInsecureRequest": false,
224
+ "manufacturer": "NRCHKB",
225
+ "model": "Demo",
226
+ "serialNo": "1.1.2",
227
+ "customMdnsConfig": false,
228
+ "mdnsMulticast": true,
229
+ "mdnsInterface": "",
230
+ "mdnsPort": "",
231
+ "mdnsIp": "",
232
+ "mdnsTtl": "",
233
+ "mdnsLoopback": true,
234
+ "mdnsReuseAddr": true,
235
+ "allowMessagePassthrough": true
236
+ }
268
237
  ]