node-red-contrib-homekit-bridged 2.0.0-dev.1 → 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 -146
  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 -290
  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 -112
  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 -368
  45. package/build/lib/utils/ServiceUtils2.js +519 -304
  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 -1885
  72. package/examples/demo/02 - Air Purifier.json +279 -279
  73. package/examples/demo/03 - Air Quality sensor with Battery.json +254 -254
  74. package/examples/demo/04 - Dimmable Bulb.json +172 -172
  75. package/examples/demo/05 - Color Bulb (HSV).json +195 -195
  76. package/examples/demo/06 - Fan (simple, 3 speeds).json +240 -240
  77. package/examples/demo/07 - Fan (with speed, oscillate, rotation direction).json +175 -175
  78. package/examples/demo/08 - CO2 detector.json +224 -224
  79. package/examples/demo/09 - CO (carbon monoxide) example.json +255 -255
  80. package/examples/demo/10 - Door window contact sensor.json +234 -234
  81. package/examples/demos (advanced)/01 - Television with inputs and speaker.json +541 -541
  82. package/examples/switch/01 - Plain Switch.json +178 -178
  83. package/package.json +95 -82
  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,198 +1,198 @@
1
1
  [
2
- {
3
- "id": "384e0889.1fdae",
4
- "type": "group",
5
- "z": "60b06629.a2ebd",
6
- "name": "Color Bulb: input from device, output to device",
7
- "style": {
8
- "stroke": "#999999",
9
- "fill": "none",
10
- "label": true,
11
- "label-position": "nw",
12
- "color": "#a4a4a4"
2
+ {
3
+ "id": "384e0889.1fdae",
4
+ "type": "group",
5
+ "z": "60b06629.a2ebd",
6
+ "name": "Color Bulb: input from device, output to device",
7
+ "style": {
8
+ "stroke": "#999999",
9
+ "fill": "none",
10
+ "label": true,
11
+ "label-position": "nw",
12
+ "color": "#a4a4a4"
13
+ },
14
+ "nodes": [
15
+ "d838176b.dbaf7",
16
+ "7bf880d4.3cd4d",
17
+ "ee1452a5.08edd",
18
+ "c6ed2a2a.90a01",
19
+ "8cdfae2b.2f2ce8",
20
+ "1758401b.6c62e8"
21
+ ],
22
+ "x": 14,
23
+ "y": 659,
24
+ "w": 752,
25
+ "h": 162,
26
+ "info": "# Color Bulb\n\nThis is a color bulb. It accepts and sends out Hue, Saturation, Value, and On/off state.\n\nHue is the color\n\nSaturation is how deep the color is\n\nValue is brightness\n\nOn is power state"
13
27
  },
14
- "nodes": [
15
- "d838176b.dbaf7",
16
- "7bf880d4.3cd4d",
17
- "ee1452a5.08edd",
18
- "c6ed2a2a.90a01",
19
- "8cdfae2b.2f2ce8",
20
- "1758401b.6c62e8"
21
- ],
22
- "x": 14,
23
- "y": 659,
24
- "w": 752,
25
- "h": 162,
26
- "info": "# Color Bulb\n\nThis is a color bulb. It accepts and sends out Hue, Saturation, Value, and On/off state.\n\nHue is the color\n\nSaturation is how deep the color is\n\nValue is brightness\n\nOn is power state"
27
- },
28
- {
29
- "id": "d838176b.dbaf7",
30
- "type": "debug",
31
- "z": "60b06629.a2ebd",
32
- "g": "384e0889.1fdae",
33
- "name": "Color light output",
34
- "active": true,
35
- "tosidebar": true,
36
- "console": false,
37
- "tostatus": false,
38
- "complete": "payload",
39
- "targetType": "msg",
40
- "x": 630,
41
- "y": 780,
42
- "wires": []
43
- },
44
- {
45
- "id": "7bf880d4.3cd4d",
46
- "type": "homekit-service",
47
- "z": "60b06629.a2ebd",
48
- "g": "384e0889.1fdae",
49
- "isParent": true,
50
- "bridge": "409001a1.3e7a78",
51
- "parentService": "",
52
- "name": "Color",
53
- "serviceName": "Lightbulb",
54
- "topic": "",
55
- "filter": false,
56
- "manufacturer": "Garrett",
57
- "model": "Color",
58
- "serialNo": "42",
59
- "firmwareRev": "1.2",
60
- "hardwareRev": "1.0.0",
61
- "softwareRev": "1.0.0",
62
- "cameraConfigVideoProcessor": "ffmpeg",
63
- "cameraConfigSource": "",
64
- "cameraConfigStillImageSource": "",
65
- "cameraConfigMaxStreams": 2,
66
- "cameraConfigMaxWidth": 1280,
67
- "cameraConfigMaxHeight": 720,
68
- "cameraConfigMaxFPS": 10,
69
- "cameraConfigMaxBitrate": 300,
70
- "cameraConfigVideoCodec": "libx264",
71
- "cameraConfigAudioCodec": "libfdk_aac",
72
- "cameraConfigAudio": false,
73
- "cameraConfigPacketSize": 1316,
74
- "cameraConfigVerticalFlip": false,
75
- "cameraConfigHorizontalFlip": false,
76
- "cameraConfigMapVideo": "0:0",
77
- "cameraConfigMapAudio": "0:1",
78
- "cameraConfigVideoFilter": "scale=1280:720",
79
- "cameraConfigAdditionalCommandLine": "-tune zerolatency",
80
- "cameraConfigDebug": false,
81
- "cameraConfigSnapshotOutput": "disabled",
82
- "cameraConfigInterfaceName": "",
83
- "characteristicProperties": "{\n \"Brightness\":true,\n \"Hue\":true,\n \"Saturation\":true\n}",
84
- "outputs": 2,
85
- "x": 410,
86
- "y": 780,
87
- "wires": [["d838176b.dbaf7"], []]
88
- },
89
- {
90
- "id": "ee1452a5.08edd",
91
- "type": "inject",
92
- "z": "60b06629.a2ebd",
93
- "g": "384e0889.1fdae",
94
- "name": "NO RESPONSE",
95
- "props": [
96
- {
97
- "p": "payload"
98
- }
99
- ],
100
- "repeat": "",
101
- "crontab": "",
102
- "once": false,
103
- "onceDelay": 0.1,
104
- "topic": "",
105
- "payload": "{\"On\":\"NO_RESPONSE\"}",
106
- "payloadType": "json",
107
- "x": 340,
108
- "y": 700,
109
- "wires": [["7bf880d4.3cd4d"]]
110
- },
111
- {
112
- "id": "c6ed2a2a.90a01",
113
- "type": "inject",
114
- "z": "60b06629.a2ebd",
115
- "g": "384e0889.1fdae",
116
- "name": "ON",
117
- "props": [
118
- {
119
- "p": "payload"
120
- }
121
- ],
122
- "repeat": "",
123
- "crontab": "",
124
- "once": false,
125
- "onceDelay": 0.1,
126
- "topic": "",
127
- "payload": "{\"On\":true}",
128
- "payloadType": "json",
129
- "x": 110,
130
- "y": 700,
131
- "wires": [["7bf880d4.3cd4d"]]
132
- },
133
- {
134
- "id": "8cdfae2b.2f2ce8",
135
- "type": "inject",
136
- "z": "60b06629.a2ebd",
137
- "g": "384e0889.1fdae",
138
- "name": "Reset HSV",
139
- "props": [
140
- {
141
- "p": "payload"
142
- }
143
- ],
144
- "repeat": "",
145
- "crontab": "",
146
- "once": false,
147
- "onceDelay": 0.1,
148
- "topic": "",
149
- "payload": "{\"Brightness\":50,\"Hue\":50,\"Saturation\":50}",
150
- "payloadType": "json",
151
- "x": 120,
152
- "y": 780,
153
- "wires": [["7bf880d4.3cd4d"]]
154
- },
155
- {
156
- "id": "1758401b.6c62e8",
157
- "type": "inject",
158
- "z": "60b06629.a2ebd",
159
- "g": "384e0889.1fdae",
160
- "name": "OFF",
161
- "props": [
162
- {
163
- "p": "payload"
164
- }
165
- ],
166
- "repeat": "",
167
- "crontab": "",
168
- "once": false,
169
- "onceDelay": 0.1,
170
- "topic": "",
171
- "payload": "{\"On\":false}",
172
- "payloadType": "json",
173
- "x": 110,
174
- "y": 740,
175
- "wires": [["7bf880d4.3cd4d"]]
176
- },
177
- {
178
- "id": "409001a1.3e7a78",
179
- "type": "homekit-bridge",
180
- "z": "",
181
- "bridgeName": "Demo 1",
182
- "pinCode": "153-10-538",
183
- "port": "",
184
- "allowInsecureRequest": false,
185
- "manufacturer": "NRCHKB",
186
- "model": "Demo",
187
- "serialNo": "1.1.2",
188
- "customMdnsConfig": false,
189
- "mdnsMulticast": true,
190
- "mdnsInterface": "",
191
- "mdnsPort": "",
192
- "mdnsIp": "",
193
- "mdnsTtl": "",
194
- "mdnsLoopback": true,
195
- "mdnsReuseAddr": true,
196
- "allowMessagePassthrough": true
197
- }
28
+ {
29
+ "id": "d838176b.dbaf7",
30
+ "type": "debug",
31
+ "z": "60b06629.a2ebd",
32
+ "g": "384e0889.1fdae",
33
+ "name": "Color light output",
34
+ "active": true,
35
+ "tosidebar": true,
36
+ "console": false,
37
+ "tostatus": false,
38
+ "complete": "payload",
39
+ "targetType": "msg",
40
+ "x": 630,
41
+ "y": 780,
42
+ "wires": []
43
+ },
44
+ {
45
+ "id": "7bf880d4.3cd4d",
46
+ "type": "homekit-service",
47
+ "z": "60b06629.a2ebd",
48
+ "g": "384e0889.1fdae",
49
+ "isParent": true,
50
+ "bridge": "409001a1.3e7a78",
51
+ "parentService": "",
52
+ "name": "Color",
53
+ "serviceName": "Lightbulb",
54
+ "topic": "",
55
+ "filter": false,
56
+ "manufacturer": "Garrett",
57
+ "model": "Color",
58
+ "serialNo": "42",
59
+ "firmwareRev": "1.2",
60
+ "hardwareRev": "1.0.0",
61
+ "softwareRev": "1.0.0",
62
+ "cameraConfigVideoProcessor": "ffmpeg",
63
+ "cameraConfigSource": "",
64
+ "cameraConfigStillImageSource": "",
65
+ "cameraConfigMaxStreams": 2,
66
+ "cameraConfigMaxWidth": 1280,
67
+ "cameraConfigMaxHeight": 720,
68
+ "cameraConfigMaxFPS": 10,
69
+ "cameraConfigMaxBitrate": 300,
70
+ "cameraConfigVideoCodec": "libx264",
71
+ "cameraConfigAudioCodec": "libfdk_aac",
72
+ "cameraConfigAudio": false,
73
+ "cameraConfigPacketSize": 1316,
74
+ "cameraConfigVerticalFlip": false,
75
+ "cameraConfigHorizontalFlip": false,
76
+ "cameraConfigMapVideo": "0:0",
77
+ "cameraConfigMapAudio": "0:1",
78
+ "cameraConfigVideoFilter": "scale=1280:720",
79
+ "cameraConfigAdditionalCommandLine": "-tune zerolatency",
80
+ "cameraConfigDebug": false,
81
+ "cameraConfigSnapshotOutput": "disabled",
82
+ "cameraConfigInterfaceName": "",
83
+ "characteristicProperties": "{\n \"Brightness\":true,\n \"Hue\":true,\n \"Saturation\":true\n}",
84
+ "outputs": 2,
85
+ "x": 410,
86
+ "y": 780,
87
+ "wires": [["d838176b.dbaf7"], []]
88
+ },
89
+ {
90
+ "id": "ee1452a5.08edd",
91
+ "type": "inject",
92
+ "z": "60b06629.a2ebd",
93
+ "g": "384e0889.1fdae",
94
+ "name": "NO RESPONSE",
95
+ "props": [
96
+ {
97
+ "p": "payload"
98
+ }
99
+ ],
100
+ "repeat": "",
101
+ "crontab": "",
102
+ "once": false,
103
+ "onceDelay": 0.1,
104
+ "topic": "",
105
+ "payload": "{\"On\":\"NO_RESPONSE\"}",
106
+ "payloadType": "json",
107
+ "x": 340,
108
+ "y": 700,
109
+ "wires": [["7bf880d4.3cd4d"]]
110
+ },
111
+ {
112
+ "id": "c6ed2a2a.90a01",
113
+ "type": "inject",
114
+ "z": "60b06629.a2ebd",
115
+ "g": "384e0889.1fdae",
116
+ "name": "ON",
117
+ "props": [
118
+ {
119
+ "p": "payload"
120
+ }
121
+ ],
122
+ "repeat": "",
123
+ "crontab": "",
124
+ "once": false,
125
+ "onceDelay": 0.1,
126
+ "topic": "",
127
+ "payload": "{\"On\":true}",
128
+ "payloadType": "json",
129
+ "x": 110,
130
+ "y": 700,
131
+ "wires": [["7bf880d4.3cd4d"]]
132
+ },
133
+ {
134
+ "id": "8cdfae2b.2f2ce8",
135
+ "type": "inject",
136
+ "z": "60b06629.a2ebd",
137
+ "g": "384e0889.1fdae",
138
+ "name": "Reset HSV",
139
+ "props": [
140
+ {
141
+ "p": "payload"
142
+ }
143
+ ],
144
+ "repeat": "",
145
+ "crontab": "",
146
+ "once": false,
147
+ "onceDelay": 0.1,
148
+ "topic": "",
149
+ "payload": "{\"Brightness\":50,\"Hue\":50,\"Saturation\":50}",
150
+ "payloadType": "json",
151
+ "x": 120,
152
+ "y": 780,
153
+ "wires": [["7bf880d4.3cd4d"]]
154
+ },
155
+ {
156
+ "id": "1758401b.6c62e8",
157
+ "type": "inject",
158
+ "z": "60b06629.a2ebd",
159
+ "g": "384e0889.1fdae",
160
+ "name": "OFF",
161
+ "props": [
162
+ {
163
+ "p": "payload"
164
+ }
165
+ ],
166
+ "repeat": "",
167
+ "crontab": "",
168
+ "once": false,
169
+ "onceDelay": 0.1,
170
+ "topic": "",
171
+ "payload": "{\"On\":false}",
172
+ "payloadType": "json",
173
+ "x": 110,
174
+ "y": 740,
175
+ "wires": [["7bf880d4.3cd4d"]]
176
+ },
177
+ {
178
+ "id": "409001a1.3e7a78",
179
+ "type": "homekit-bridge",
180
+ "z": "",
181
+ "bridgeName": "Demo 1",
182
+ "pinCode": "153-10-538",
183
+ "port": "",
184
+ "allowInsecureRequest": false,
185
+ "manufacturer": "NRCHKB",
186
+ "model": "Demo",
187
+ "serialNo": "1.1.2",
188
+ "customMdnsConfig": false,
189
+ "mdnsMulticast": true,
190
+ "mdnsInterface": "",
191
+ "mdnsPort": "",
192
+ "mdnsIp": "",
193
+ "mdnsTtl": "",
194
+ "mdnsLoopback": true,
195
+ "mdnsReuseAddr": true,
196
+ "allowMessagePassthrough": true
197
+ }
198
198
  ]