node-red-contrib-homekit-bridged 1.5.0-dev.6 → 1.5.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.
@@ -325,8 +325,7 @@ Camera.prototype.handleStreamRequest = function (request) {
325
325
  ' -r ' +
326
326
  fps +
327
327
  ' -f rawvideo' +
328
- ' ' +
329
- additionalCommandline +
328
+ (additionalCommandline ? ' ' + additionalCommandline : '') +
330
329
  (vf.length > 0 ? ' -vf ' + vf.join(',') : '') +
331
330
  ' -b:v ' +
332
331
  vbitrate +
@@ -49,7 +49,8 @@ module.exports = function (node) {
49
49
  msg.payload[key] = newValue;
50
50
  msg.hap = prepareHapData(context, connection);
51
51
  msg.hap.allChars = allCharacteristics.reduce((allChars, singleChar) => {
52
- allChars[singleChar.displayName] = singleChar.value;
52
+ const cKey = singleChar.constructor.name;
53
+ allChars[cKey] = singleChar.value;
53
54
  return allChars;
54
55
  }, {});
55
56
  if (oldValue !== undefined) {
@@ -26,7 +26,8 @@ module.exports = function (node) {
26
26
  newValue,
27
27
  event: eventObject,
28
28
  allChars: allCharacteristics.reduce((allChars, singleChar) => {
29
- allChars[singleChar.displayName] = singleChar.value;
29
+ const cKey = singleChar.constructor.name;
30
+ allChars[cKey] = singleChar.value;
30
31
  return allChars;
31
32
  }, {}),
32
33
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-red-contrib-homekit-bridged",
3
- "version": "1.5.0-dev.6",
3
+ "version": "1.5.0-dev.8",
4
4
  "description": "Node-RED nodes to simulate Apple HomeKit devices.",
5
5
  "main": "build/nodes/nrchkb.js",
6
6
  "scripts": {
@@ -8,9 +8,7 @@
8
8
  "clean": "rimraf build/lib build/**/*.js",
9
9
  "test": "npm run build && mocha -r ts-node/register './src/**/*.test.[tj]s' --exit",
10
10
  "prettier": "prettier --write \"**/*.{js,ts}\"",
11
- "_postinstall": "husky install",
12
- "prepublishOnly": "pinst --disable",
13
- "postpublish": "pinst --enable"
11
+ "prepare": "husky install"
14
12
  },
15
13
  "repository": {
16
14
  "type": "git",
@@ -48,35 +46,34 @@
48
46
  "homepage": "https://github.com/NRCHKB/node-red-contrib-homekit-bridged#readme",
49
47
  "dependencies": {
50
48
  "@nrchkb/logger": "^1.3.3",
51
- "hap-nodejs": "0.10.2",
49
+ "hap-nodejs": "0.10.3",
52
50
  "node-persist": "^3.1.0",
53
51
  "semver": "^7.3.7",
54
- "uuid": "^8.3.2"
52
+ "uuid": "^9.0.0"
55
53
  },
56
54
  "devDependencies": {
57
55
  "@homebridge/ciao": "^1.1.5",
58
- "@node-red/registry": "^1.3.7",
56
+ "@node-red/registry": "^2.2.3",
59
57
  "@types/mocha": "^9.1.1",
60
58
  "@types/node": "^10.17.60",
61
- "@types/node-persist": "^3.1.2",
59
+ "@types/node-persist": "^3.1.3",
62
60
  "@types/node-red": "^1.2.1",
63
61
  "@types/semver": "^7.3.12",
64
62
  "@types/uuid": "^8.3.4",
65
- "@typescript-eslint/eslint-plugin": "^5.35.1",
66
- "@typescript-eslint/parser": "^5.35.1",
63
+ "@typescript-eslint/eslint-plugin": "^5.37.0",
64
+ "@typescript-eslint/parser": "^5.37.0",
67
65
  "babel-eslint": "^10.1.0",
68
- "eslint": "^8.23.0",
66
+ "eslint": "^8.23.1",
69
67
  "eslint-config-prettier": "^8.5.0",
70
68
  "eslint-plugin-prettier": "^4.2.1",
71
- "husky": "^7.0.4",
72
- "mocha": "^9.2.2",
73
- "node-red": "1.3.7",
69
+ "mocha": "^10.0.0",
70
+ "node-red": "^2.2.3",
74
71
  "node-red-node-test-helper": "^0.3.0",
75
- "pinst": "^2.1.6",
76
72
  "prettier": "^2.7.1",
77
73
  "rimraf": "^3.0.2",
78
74
  "ts-node": "^10.9.1",
79
- "typescript": "^4.8.2"
75
+ "typescript": "^4.8.3",
76
+ "husky": "^8.0.1"
80
77
  },
81
78
  "engines": {
82
79
  "node": ">=10.22.1"
package/CHANGELOG.md DELETED
@@ -1,359 +0,0 @@
1
- #### ⚠️ CAUTION ⚠️
2
-
3
- ##### Before upgrading make sure that you are using the latest version of [Node-RED](https://nodered.org/docs/getting-started/local) and latest LTS version of [Node.js](https://nodejs.org/en/download/)
4
-
5
- ###### Upgrading from versions 0.X to 1.X is a breaking change, all devices will be reset in the Home app. Please review the [release notes](https://github.com/NRCHKB/node-red-contrib-homekit-bridged/releases/tag/v1.0.1) thoroughly before updating!
6
-
7
- # Changelog
8
-
9
- All notable changes to this project will be documented in this file.
10
-
11
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres
12
- to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
13
-
14
- ## [1.5.0-dev.6]
15
-
16
- ### Added
17
-
18
- - Support for new advertiser [AVAHI](https://github.com/homebridge/HAP-NodeJS/pull/918)
19
-
20
- ### Fixed
21
-
22
- - Accessory could not be recovered from NO_RESPONSE using single Characteristic
23
- - Make unsupported Characteristic error more
24
- descriptive [#456](https://github.com/NRCHKB/node-red-contrib-homekit-bridged/issues/456)
25
-
26
- ### Changed
27
-
28
- - Updated hap-nodejs to [0.9.7](https://github.com/homebridge/HAP-NodeJS/releases/tag/v0.9.7) (bug fixes)
29
- - Updated hap-nodejs to [0.9.8](https://github.com/homebridge/HAP-NodeJS/releases/tag/v0.9.8) (bug fixes)
30
- - Updated hap-nodejs to [0.10.0](https://github.com/homebridge/HAP-NodeJS/releases/tag/v0.10.0) (features)
31
- - Updated hap-nodejs to [0.10.1](https://github.com/homebridge/HAP-NodeJS/releases/tag/v0.10.1) (changes)
32
- - Updated hap-nodejs to [0.10.2](https://github.com/homebridge/HAP-NodeJS/releases/tag/v0.10.2) (bug fixes)
33
-
34
- ## [1.4.3]
35
-
36
- ### Added
37
-
38
- - Pass Characteristic key in event context for Service2
39
-
40
- ### Changed
41
-
42
- - Updated hap-nodejs to [0.9.6](https://github.com/homebridge/HAP-NodeJS/releases/tag/v0.9.6) (bug fixes and security
43
- fixes)
44
-
45
- ## [1.4.2]
46
-
47
- ### Fixed
48
-
49
- - Resolve issue with customCharacteristics not loading from file
50
- - Fixed publish process
51
-
52
- ## [1.4.1]
53
-
54
- ### Fixed
55
-
56
- - Fix readme appearance on `flows.nodered.org`
57
-
58
- ## [1.4.0]
59
-
60
- ### Fixed
61
-
62
- - Fixed customCharacteristics incorrect refresh in UI
63
- - Implemented static accessoryUUIDs for subflows Enables the use of nrchkb nodes in subflows with backwards
64
- compatibility #393 - thanks @kevinkub
65
- - Fixed Custom MDNS Configuration not showing in UI for Standalone Accessory
66
- - Stop components from clearing other component's node.status call
67
- - Add missing advertiser selector in UI for Standalone Accessory
68
- - Not naming the host node causes a crash #424
69
- - Do not output oldValue for onSet as it does not have access to old value
70
-
71
- ### Added
72
-
73
- - Notice during app launch: Node.js 10 will be deprecated in Node-RED 2.0.0
74
- - Event output in Service 2 which is available in NRCHKB_EXPERIMENTAL #392 #437
75
- - Status node to fetch Serialized Service #210
76
- - Support for environment variables in characteristic properties #217
77
-
78
- ### Changed
79
-
80
- - Updated hap-nodejs to [0.9.5](https://github.com/homebridge/HAP-NodeJS/releases/tag/v0.9.5) (added new iOS 15 Services
81
- and Characteristics)
82
- - Updated dependencies to latest versions
83
- - Changed `BatteryService` to `Battery` in demo examples as `BatteryService` is deprecated #381 - thanks @crxporter
84
- - Readme rework - thanks @crxporter
85
- - More descriptive error when incorrect Characteristic has been used in msg.payload
86
- - Add msg.hap.allChars to service nodes #438
87
-
88
- ## [1.3.6]
89
-
90
- ### Fixed
91
-
92
- - nrchkb complaining about validValues #52
93
-
94
- ## [1.3.5]
95
-
96
- ### Fixed
97
-
98
- - NO_RESPONSE not working
99
-
100
- ## [1.3.4]
101
-
102
- ### Fixed
103
-
104
- - onChange fired when value not changed #390 - thanks for reporting @Delphius7
105
-
106
- ## [1.3.3]
107
-
108
- ### Fixed
109
-
110
- - Resolve issues with incorrect Characteristics names used in node output
111
-
112
- ## [1.3.2]
113
-
114
- ### Fixed
115
-
116
- - Resolve issues with some Characteristics names not being accepted since hap-nodejs upgrade
117
-
118
- ## [1.3.1]
119
-
120
- ### Fixed
121
-
122
- - Fix allowMessagePassthrough=false not working for messages from Home.app
123
-
124
- ## [1.3.0]
125
-
126
- ### Fixed
127
-
128
- - There was a problem when mdnsConfig was
129
- empty [#322](https://github.com/NRCHKB/node-red-contrib-homekit-bridged/issues/322)
130
- - There was a problem when NRCHKB was updated without Node-RED
131
- restart [#363](https://github.com/NRCHKB/node-red-contrib-homekit-bridged/issues/363)
132
- - Linked service throws error during setup if parent waits for the setup message (thanks @AlexOwl)
133
- - . in Bridge name was causing it not being published without any feedback to user
134
-
135
- ### Added
136
-
137
- - More code tests
138
- - Verify if Node.js version criteria is met on start
139
- - Support fo9r Standalone Accessory mode (like in old
140
- times) [#310](https://github.com/NRCHKB/node-red-contrib-homekit-bridged/issues/310)
141
- - (Experimental) Support for Custom
142
- Characteristics [#52](https://github.com/NRCHKB/node-red-contrib-homekit-bridged/issues/52)
143
- - Add client IP address to onSet/onChange output
144
- message (`msg.hap.session`) [#328](https://github.com/NRCHKB/node-red-contrib-homekit-bridged/issues/328)
145
- - As of new mdns advertiser available now there is a possibility to choose which you want to use in Bridge Config:
146
- ciao (
147
- new, improved but not yet proved) or (good old) bonjour. Default bonjour
148
-
149
- ### Changed
150
-
151
- - Updated hap-nodejs to 0.9.4
152
- - Updated dependencies to latest versions
153
- - TypeScript-ify code
154
- - Generate random pin code for new Bridge nodes
155
-
156
- ## [1.2.0] - 2020.08.16
157
-
158
- ### Fixed
159
-
160
- - JS console error when opening a linked
161
- service [#278](https://github.com/NRCHKB/node-red-contrib-homekit-bridged/issues/278)
162
- - Fixed outputs number not being remembered by editor
163
- - Fixed saving Software Revision fo Service node
164
- - Fixed HAPStorage path on Windows
165
- - There was a translation issue, changed pilot to remote in README.
166
-
167
- ### Added
168
-
169
- - Added Firmware, Software and Hardware Revision fields to Bridge configuration
170
- - Now we have examples that you can import in node-red!
171
- - You can make Service node wait for setup message.
172
-
173
- ### Changed
174
-
175
- - Now Firmware, Software and Hardware Revision and Model fields are set by default to NRCHKB version, Manufacturer is
176
- NRCHKB by default
177
- - Updated hap-nodejs to 0.7.8
178
- - Updated dependencies to latest versions
179
- - Disallow using port 1880 for Bridge as that port is reserved for node-red
180
-
181
- ## [1.1.1] - 2020.06.30
182
-
183
- ### Added
184
-
185
- - Firmware Revision configuration option (
186
- optional) [#211](https://github.com/NRCHKB/node-red-contrib-homekit-bridged/pull/211)
187
- - Hardware and Software Revision configuration option (optional)
188
- - Project now support typescript!
189
-
190
- ### Fixed
191
-
192
- - Error status is not passed to callback when "No response" was
193
- triggered [#227](https://github.com/NRCHKB/node-red-contrib-homekit-bridged/pull/227) also discussed
194
- in [#185](https://github.com/NRCHKB/node-red-contrib-homekit-bridged/pull/185)
195
-
196
- ### Changed
197
-
198
- - Some README.md rework
199
- - Updated hap-nodejs to 0.7.3
200
- - Updated dependencies to latest versions
201
- - Moved lint-staged config to main level and added minimum nodejs version
202
-
203
- ### Removed
204
-
205
- - Some unused code disappeared.
206
-
207
- ## [1.0.4] - 2020.03.03
208
-
209
- ### Fixed
210
-
211
- - Warn when trying to deploy node without bridge or parentService
212
- attached [#214](https://github.com/NRCHKB/node-red-contrib-homekit-bridged/issues/214#issuecomment-594084125)
213
- - Additional Command Line value in Camera Control is now
214
- optional [#214](https://github.com/NRCHKB/node-red-contrib-homekit-bridged/issues/214#issuecomment-593736115)
215
-
216
- ## [1.0.3] - 2020.03.01
217
-
218
- ### Fixed
219
-
220
- - Video Filter value in Camera Control is now optional in node-red editor
221
- too [#214](https://github.com/NRCHKB/node-red-contrib-homekit-bridged/issues/214)
222
-
223
- ## [1.0.2] - 2020.03.01
224
-
225
- ### Added
226
-
227
- - Warning about lost compatibility on README page.
228
-
229
- ## [1.0.0] - 2020.02.23
230
-
231
- Lost backward compatibility. In order to make it work read
232
- this [notice](https://github.com/NRCHKB/node-red-contrib-homekit-bridged/pull/163#issuecomment-590108567).
233
-
234
- ### Fixed
235
-
236
- - Node id macify algorithm changed [#170](https://github.com/NRCHKB/node-red-contrib-homekit-bridged/issues/170)
237
- - Corrections regarding issue [#12](https://github.com/NRCHKB/node-red-contrib-homekit-bridged/issues/12) so that
238
- changes can be deployed without restarting node-red
239
- - Automatically creating a new service and replacing the old one if the service type changed
240
- - Automatically replacing an accessory with a new one if the accessory information changes (e.g., Name, Manufacturer,
241
- ...)
242
- - Video Filter value in Camera Control is now
243
- optional [#194](https://github.com/NRCHKB/node-red-contrib-homekit-bridged/issues/194) (can be empty, before it was
244
- generated if was empty)
245
- - Removed updateReachability as it is deprecated (and doesn't make a difference)
246
-
247
- ### Added
248
-
249
- - After Service selection in node configuration Category will be automatically set to default for Service
250
- - Interface Name for Camera Service configuration
251
- - Support for new TV Remote services
252
- - Now first output is for onChange, second for onSet and third for camera
253
- snapshot. [#200](https://github.com/NRCHKB/node-red-contrib-homekit-bridged/issues/200)
254
- - Sponsor Button on repository page
255
-
256
- ### Changed
257
-
258
- - Accessory Category in node configuration moved under Service selection
259
- - Clarify NO_RESPONSE in README
260
- - Update node-red version in dependencies
261
- - Camera Service source code to match the newest improvements in homebridge-camera-ffmpeg
262
- - Update to latest HAP-NodeJS
263
- - Removed unnecessary accessory category from service node
264
- - Removed fields Manufacturer, Serial Number and Model from linked service nodes
265
- - Moved eslint and prettier configuration to package.json
266
- - Added automatic linting on pre-commit
267
-
268
- ## [0.8.0] - 2019.10.14
269
-
270
- ### Added
271
-
272
- - Added greenkeeper
273
- - Added setting to Bridge configuration called Allow Message Passthrough
274
-
275
- ### Changed
276
-
277
- - Updated README
278
-
279
- ### Fixed
280
-
281
- - Revert hap.context in node output
282
-
283
- ## [0.7.1] - 2019.10.13
284
-
285
- ### Fixed
286
-
287
- - Added labels to node outputs as there are new output for camera snapshot
288
-
289
- ## [0.7.0] - 2019.10.12
290
-
291
- ### Added
292
-
293
- - CHANGELOG page introduction
294
- - Change from "characteristic-change" to "set" to listen to HAP-NodeJS events
295
- - Sorted Service Type list in UI
296
- - Camera support (RTSP, Video Doorbell and others)
297
- - RemoteKey value now appears in node output!
298
- - HAP-NodeJS version changed to latest (0.5.0)
299
- - Added Accessory Category field for Parent Service
300
- - More code refactoring
301
- - The Newest HomeKit Docs uploaded
302
- - Security hints
303
- - And more...
304
-
305
- ### Changed
306
-
307
- - MIT license
308
- - Better node-red tests
309
- - Prettified and linted code!
310
- - Support for node 8 and 10 only
311
- - GitHub Actions for automatic tests and publish
312
- - And more...
313
-
314
- ### Fixed
315
-
316
- - Removed read/write boundaries for Characteristics
317
- - And more...
318
-
319
- ## [0.6.2] - 2019.03.27
320
-
321
- ### Changed
322
-
323
- - Some minor changes in README
324
-
325
- ### Fixed
326
-
327
- - Hotfix for "NO_RESPONSE"
328
-
329
- ## [0.6.1] - 2019.03.21
330
-
331
- ### Added
332
-
333
- - Reintroduced DEBUG mode (DEBUG=NRCHKB node-red)
334
-
335
- ### Changed
336
-
337
- - Renaming organisation
338
- - Minor changes to process of finding Parent Service as Linked Service
339
-
340
- ### Fixed
341
-
342
- - Crash upon removing bridge from Home [#22](https://github.com/NRCHKB/node-red-contrib-homekit-bridged/issues/22)
343
- - Fix: "Error: This callback function has already been called by someone
344
- else..." [#66](https://github.com/NRCHKB/node-red-contrib-homekit-bridged/issues/66)
345
-
346
- ## [0.6.0] - 2019.03.16
347
-
348
- ### Added
349
-
350
- - Introduce Linked Services [#41](https://github.com/NRCHKB/node-red-contrib-homekit-bridged/issues/41)
351
- - MDNS Configuration [#44](https://github.com/NRCHKB/node-red-contrib-homekit-bridged/issues/44)
352
- - Filter on Topic
353
- - NO_RESPONSE trigger [#48](https://github.com/NRCHKB/node-red-contrib-homekit-bridged/issues/48)
354
- - onIdentify [#54](https://github.com/NRCHKB/node-red-contrib-homekit-bridged/issues/54)
355
- - Added automatic tests for building project, code quality and finding vulnerabilities
356
-
357
- ### Changed
358
-
359
- - Redesigned README