node-red-contrib-homekit-bridged 1.5.0-dev.4 → 1.5.0-dev.7

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