node-red-contrib-homekit-bridged 2.0.0-dev.5 → 2.0.0-dev.8

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 (128) hide show
  1. package/build/lib/HAPHostNode.js +183 -141
  2. package/build/lib/HAPServiceNode.js +199 -172
  3. package/build/lib/HAPServiceNode2.js +207 -172
  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 -288
  8. package/build/lib/camera/CameraControl.js +119 -84
  9. package/build/lib/camera/CameraDelegate.js +481 -404
  10. package/build/lib/camera/MP4StreamingServer.js +148 -139
  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 +82 -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 -375
  45. package/build/lib/utils/ServiceUtils2.js +519 -309
  46. package/build/lib/utils/index.js +10 -11
  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 +544 -307
  55. package/build/nodes/service.js +5 -6
  56. package/build/nodes/service2.html +1721 -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 -40
  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 -84
  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/camera/CameraControl.d.ts +0 -3
  91. package/build/lib/camera/CameraDelegate.d.ts +0 -38
  92. package/build/lib/camera/MP4StreamingServer.d.ts +0 -26
  93. package/build/lib/hap/HAPCharacteristic.d.ts +0 -9
  94. package/build/lib/hap/HAPService.d.ts +0 -6
  95. package/build/lib/hap/eve-app/EveCharacteristics.d.ts +0 -20
  96. package/build/lib/hap/eve-app/EveServices.d.ts +0 -5
  97. package/build/lib/types/AccessoryInformationType.d.ts +0 -11
  98. package/build/lib/types/CameraConfigType.d.ts +0 -24
  99. package/build/lib/types/CustomCharacteristicType.d.ts +0 -6
  100. package/build/lib/types/HAPHostConfigType.d.ts +0 -22
  101. package/build/lib/types/HAPHostNodeType.d.ts +0 -14
  102. package/build/lib/types/HAPService2ConfigType.d.ts +0 -6
  103. package/build/lib/types/HAPService2NodeType.d.ts +0 -7
  104. package/build/lib/types/HAPServiceConfigType.d.ts +0 -26
  105. package/build/lib/types/HAPServiceNodeType.d.ts +0 -38
  106. package/build/lib/types/HAPStatusConfigType.d.ts +0 -5
  107. package/build/lib/types/HAPStatusNodeType.d.ts +0 -12
  108. package/build/lib/types/HostType.d.ts +0 -5
  109. package/build/lib/types/NodeType.d.ts +0 -3
  110. package/build/lib/types/PublishTimersType.d.ts +0 -4
  111. package/build/lib/types/hap-nodejs/HapAdaptiveLightingControllerMode.d.ts +0 -5
  112. package/build/lib/types/hap-nodejs/HapCategories.d.ts +0 -41
  113. package/build/lib/types/storage/SerializedHostType.d.ts +0 -5
  114. package/build/lib/types/storage/StorageType.d.ts +0 -8
  115. package/build/lib/utils/AccessoryUtils.d.ts +0 -1
  116. package/build/lib/utils/BridgeUtils.d.ts +0 -1
  117. package/build/lib/utils/CharacteristicUtils.d.ts +0 -1
  118. package/build/lib/utils/CharacteristicUtils2.d.ts +0 -1
  119. package/build/lib/utils/NodeStatusUtils.d.ts +0 -17
  120. package/build/lib/utils/ServiceUtils.d.ts +0 -1
  121. package/build/lib/utils/ServiceUtils2.d.ts +0 -1
  122. package/build/lib/utils/index.d.ts +0 -1
  123. package/build/nodes/bridge.d.ts +0 -1
  124. package/build/nodes/nrchkb.d.ts +0 -1
  125. package/build/nodes/service.d.ts +0 -1
  126. package/build/nodes/service2.d.ts +0 -1
  127. package/build/nodes/standalone.d.ts +0 -1
  128. package/build/nodes/status.d.ts +0 -1
@@ -1,178 +1,178 @@
1
1
  [
2
- {
3
- "id": "2c464315.51c50c",
4
- "type": "group",
5
- "z": "60b06629.a2ebd",
6
- "name": "Fan Full Example: 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": "2c464315.51c50c",
4
+ "type": "group",
5
+ "z": "60b06629.a2ebd",
6
+ "name": "Fan Full Example: 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
+ "b7778e52.220a5",
16
+ "fd8aff55.91d41",
17
+ "c717b796.0735b8",
18
+ "f56a2f96.509c1",
19
+ "d945ba75.897998"
20
+ ],
21
+ "x": 14,
22
+ "y": 1619,
23
+ "w": 752,
24
+ "h": 182,
25
+ "info": "# Fan V2\n\nThis example shows a fan. The inputs from node red are to turn the fan on, off, or set \"No Response\".\n\nThe outputs going to \"Fan output\" will show:\n\nOn / off state <br/>\nRotation speed<br/>\nSwing mode on / off (oscillate) <br/>\nRotation direction (clockwise/counterclockwise)"
13
26
  },
14
- "nodes": [
15
- "b7778e52.220a5",
16
- "fd8aff55.91d41",
17
- "c717b796.0735b8",
18
- "f56a2f96.509c1",
19
- "d945ba75.897998"
20
- ],
21
- "x": 14,
22
- "y": 1619,
23
- "w": 752,
24
- "h": 182,
25
- "info": "# Fan V2\n\nThis example shows a fan. The inputs from node red are to turn the fan on, off, or set \"No Response\".\n\nThe outputs going to \"Fan output\" will show:\n\nOn / off state <br/>\nRotation speed<br/>\nSwing mode on / off (oscillate) <br/>\nRotation direction (clockwise/counterclockwise)"
26
- },
27
- {
28
- "id": "b7778e52.220a5",
29
- "type": "debug",
30
- "z": "60b06629.a2ebd",
31
- "g": "2c464315.51c50c",
32
- "name": "Fan output",
33
- "active": true,
34
- "tosidebar": true,
35
- "console": false,
36
- "tostatus": false,
37
- "complete": "payload",
38
- "targetType": "msg",
39
- "x": 650,
40
- "y": 1660,
41
- "wires": []
42
- },
43
- {
44
- "id": "fd8aff55.91d41",
45
- "type": "homekit-service",
46
- "z": "60b06629.a2ebd",
47
- "g": "2c464315.51c50c",
48
- "isParent": true,
49
- "bridge": "409001a1.3e7a78",
50
- "parentService": "",
51
- "name": "Fan V2",
52
- "serviceName": "Fanv2",
53
- "topic": "",
54
- "filter": false,
55
- "manufacturer": "Default Manufacturer",
56
- "model": "Default Model",
57
- "serialNo": "Default Serial Number",
58
- "firmwareRev": "1.0.0",
59
- "hardwareRev": "1.0.0",
60
- "softwareRev": "1.0.0",
61
- "cameraConfigVideoProcessor": "ffmpeg",
62
- "cameraConfigSource": "",
63
- "cameraConfigStillImageSource": "",
64
- "cameraConfigMaxStreams": 2,
65
- "cameraConfigMaxWidth": 1280,
66
- "cameraConfigMaxHeight": 720,
67
- "cameraConfigMaxFPS": 10,
68
- "cameraConfigMaxBitrate": 300,
69
- "cameraConfigVideoCodec": "libx264",
70
- "cameraConfigAudioCodec": "libfdk_aac",
71
- "cameraConfigAudio": false,
72
- "cameraConfigPacketSize": 1316,
73
- "cameraConfigVerticalFlip": false,
74
- "cameraConfigHorizontalFlip": false,
75
- "cameraConfigMapVideo": "0:0",
76
- "cameraConfigMapAudio": "0:1",
77
- "cameraConfigVideoFilter": "scale=1280:720",
78
- "cameraConfigAdditionalCommandLine": "-tune zerolatency",
79
- "cameraConfigDebug": false,
80
- "cameraConfigSnapshotOutput": "disabled",
81
- "cameraConfigInterfaceName": "",
82
- "characteristicProperties": "{\n \"RotationSpeed\":true,\n \"RotationDirection\":true,\n \"SwingMode\":true\n}",
83
- "outputs": 2,
84
- "x": 420,
85
- "y": 1660,
86
- "wires": [["b7778e52.220a5"], []]
87
- },
88
- {
89
- "id": "c717b796.0735b8",
90
- "type": "inject",
91
- "z": "60b06629.a2ebd",
92
- "g": "2c464315.51c50c",
93
- "name": "NO RESPONSE",
94
- "repeat": "",
95
- "crontab": "",
96
- "once": false,
97
- "onceDelay": 0.1,
98
- "topic": "",
99
- "payload": "{\"Active\":\"NO_RESPONSE\"}",
100
- "payloadType": "json",
101
- "x": 140,
102
- "y": 1760,
103
- "wires": [["fd8aff55.91d41"]]
104
- },
105
- {
106
- "id": "f56a2f96.509c1",
107
- "type": "inject",
108
- "z": "60b06629.a2ebd",
109
- "g": "2c464315.51c50c",
110
- "name": "ON",
111
- "props": [
112
- {
113
- "p": "payload"
114
- },
115
- {
116
- "p": "topic",
117
- "vt": "str"
118
- }
119
- ],
120
- "repeat": "",
121
- "crontab": "",
122
- "once": false,
123
- "onceDelay": 0.1,
124
- "topic": "",
125
- "payload": "{\"Active\":true}",
126
- "payloadType": "json",
127
- "x": 120,
128
- "y": 1660,
129
- "wires": [["fd8aff55.91d41"]]
130
- },
131
- {
132
- "id": "d945ba75.897998",
133
- "type": "inject",
134
- "z": "60b06629.a2ebd",
135
- "g": "2c464315.51c50c",
136
- "name": "OFF",
137
- "props": [
138
- {
139
- "p": "payload"
140
- },
141
- {
142
- "p": "topic",
143
- "vt": "str"
144
- }
145
- ],
146
- "repeat": "",
147
- "crontab": "",
148
- "once": false,
149
- "onceDelay": 0.1,
150
- "topic": "",
151
- "payload": "{\"Active\":false}",
152
- "payloadType": "json",
153
- "x": 120,
154
- "y": 1700,
155
- "wires": [["fd8aff55.91d41"]]
156
- },
157
- {
158
- "id": "409001a1.3e7a78",
159
- "type": "homekit-bridge",
160
- "z": "",
161
- "bridgeName": "Demo 1",
162
- "pinCode": "153-10-538",
163
- "port": "",
164
- "allowInsecureRequest": false,
165
- "manufacturer": "NRCHKB",
166
- "model": "Demo",
167
- "serialNo": "1.1.2",
168
- "customMdnsConfig": false,
169
- "mdnsMulticast": true,
170
- "mdnsInterface": "",
171
- "mdnsPort": "",
172
- "mdnsIp": "",
173
- "mdnsTtl": "",
174
- "mdnsLoopback": true,
175
- "mdnsReuseAddr": true,
176
- "allowMessagePassthrough": true
177
- }
27
+ {
28
+ "id": "b7778e52.220a5",
29
+ "type": "debug",
30
+ "z": "60b06629.a2ebd",
31
+ "g": "2c464315.51c50c",
32
+ "name": "Fan output",
33
+ "active": true,
34
+ "tosidebar": true,
35
+ "console": false,
36
+ "tostatus": false,
37
+ "complete": "payload",
38
+ "targetType": "msg",
39
+ "x": 650,
40
+ "y": 1660,
41
+ "wires": []
42
+ },
43
+ {
44
+ "id": "fd8aff55.91d41",
45
+ "type": "homekit-service",
46
+ "z": "60b06629.a2ebd",
47
+ "g": "2c464315.51c50c",
48
+ "isParent": true,
49
+ "bridge": "409001a1.3e7a78",
50
+ "parentService": "",
51
+ "name": "Fan V2",
52
+ "serviceName": "Fanv2",
53
+ "topic": "",
54
+ "filter": false,
55
+ "manufacturer": "Default Manufacturer",
56
+ "model": "Default Model",
57
+ "serialNo": "Default Serial Number",
58
+ "firmwareRev": "1.0.0",
59
+ "hardwareRev": "1.0.0",
60
+ "softwareRev": "1.0.0",
61
+ "cameraConfigVideoProcessor": "ffmpeg",
62
+ "cameraConfigSource": "",
63
+ "cameraConfigStillImageSource": "",
64
+ "cameraConfigMaxStreams": 2,
65
+ "cameraConfigMaxWidth": 1280,
66
+ "cameraConfigMaxHeight": 720,
67
+ "cameraConfigMaxFPS": 10,
68
+ "cameraConfigMaxBitrate": 300,
69
+ "cameraConfigVideoCodec": "libx264",
70
+ "cameraConfigAudioCodec": "libfdk_aac",
71
+ "cameraConfigAudio": false,
72
+ "cameraConfigPacketSize": 1316,
73
+ "cameraConfigVerticalFlip": false,
74
+ "cameraConfigHorizontalFlip": false,
75
+ "cameraConfigMapVideo": "0:0",
76
+ "cameraConfigMapAudio": "0:1",
77
+ "cameraConfigVideoFilter": "scale=1280:720",
78
+ "cameraConfigAdditionalCommandLine": "-tune zerolatency",
79
+ "cameraConfigDebug": false,
80
+ "cameraConfigSnapshotOutput": "disabled",
81
+ "cameraConfigInterfaceName": "",
82
+ "characteristicProperties": "{\n \"RotationSpeed\":true,\n \"RotationDirection\":true,\n \"SwingMode\":true\n}",
83
+ "outputs": 2,
84
+ "x": 420,
85
+ "y": 1660,
86
+ "wires": [["b7778e52.220a5"], []]
87
+ },
88
+ {
89
+ "id": "c717b796.0735b8",
90
+ "type": "inject",
91
+ "z": "60b06629.a2ebd",
92
+ "g": "2c464315.51c50c",
93
+ "name": "NO RESPONSE",
94
+ "repeat": "",
95
+ "crontab": "",
96
+ "once": false,
97
+ "onceDelay": 0.1,
98
+ "topic": "",
99
+ "payload": "{\"Active\":\"NO_RESPONSE\"}",
100
+ "payloadType": "json",
101
+ "x": 140,
102
+ "y": 1760,
103
+ "wires": [["fd8aff55.91d41"]]
104
+ },
105
+ {
106
+ "id": "f56a2f96.509c1",
107
+ "type": "inject",
108
+ "z": "60b06629.a2ebd",
109
+ "g": "2c464315.51c50c",
110
+ "name": "ON",
111
+ "props": [
112
+ {
113
+ "p": "payload"
114
+ },
115
+ {
116
+ "p": "topic",
117
+ "vt": "str"
118
+ }
119
+ ],
120
+ "repeat": "",
121
+ "crontab": "",
122
+ "once": false,
123
+ "onceDelay": 0.1,
124
+ "topic": "",
125
+ "payload": "{\"Active\":true}",
126
+ "payloadType": "json",
127
+ "x": 120,
128
+ "y": 1660,
129
+ "wires": [["fd8aff55.91d41"]]
130
+ },
131
+ {
132
+ "id": "d945ba75.897998",
133
+ "type": "inject",
134
+ "z": "60b06629.a2ebd",
135
+ "g": "2c464315.51c50c",
136
+ "name": "OFF",
137
+ "props": [
138
+ {
139
+ "p": "payload"
140
+ },
141
+ {
142
+ "p": "topic",
143
+ "vt": "str"
144
+ }
145
+ ],
146
+ "repeat": "",
147
+ "crontab": "",
148
+ "once": false,
149
+ "onceDelay": 0.1,
150
+ "topic": "",
151
+ "payload": "{\"Active\":false}",
152
+ "payloadType": "json",
153
+ "x": 120,
154
+ "y": 1700,
155
+ "wires": [["fd8aff55.91d41"]]
156
+ },
157
+ {
158
+ "id": "409001a1.3e7a78",
159
+ "type": "homekit-bridge",
160
+ "z": "",
161
+ "bridgeName": "Demo 1",
162
+ "pinCode": "153-10-538",
163
+ "port": "",
164
+ "allowInsecureRequest": false,
165
+ "manufacturer": "NRCHKB",
166
+ "model": "Demo",
167
+ "serialNo": "1.1.2",
168
+ "customMdnsConfig": false,
169
+ "mdnsMulticast": true,
170
+ "mdnsInterface": "",
171
+ "mdnsPort": "",
172
+ "mdnsIp": "",
173
+ "mdnsTtl": "",
174
+ "mdnsLoopback": true,
175
+ "mdnsReuseAddr": true,
176
+ "allowMessagePassthrough": true
177
+ }
178
178
  ]