homebridge-lib 6.0.2 → 6.1.0

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 (41) hide show
  1. package/README.md +1 -1
  2. package/cli/hap.js +1 -1
  3. package/cli/json.js +1 -1
  4. package/cli/sysinfo.js +1 -1
  5. package/cli/upnp.js +1 -1
  6. package/index.js +1 -1
  7. package/lib/AccessoryDelegate.js +30 -27
  8. package/lib/AdaptiveLighting.js +1 -1
  9. package/lib/CharacteristicDelegate.js +22 -36
  10. package/lib/Colour.js +1 -1
  11. package/lib/CommandLineParser.js +1 -1
  12. package/lib/CommandLineTool.js +1 -1
  13. package/lib/CustomHomeKitTypes.js +1 -1
  14. package/lib/Delegate.js +31 -33
  15. package/lib/EveHomeKitTypes.js +62 -52
  16. package/lib/HttpClient.js +1 -1
  17. package/lib/JsonFormatter.js +1 -1
  18. package/lib/MyHomeKitTypes.js +88 -97
  19. package/lib/OptionParser.js +27 -2
  20. package/lib/Platform.js +3 -17
  21. package/lib/PropertyDelegate.js +8 -11
  22. package/lib/ServiceDelegate/AccessoryInformation.js +1 -1
  23. package/lib/ServiceDelegate/Battery.js +1 -1
  24. package/lib/ServiceDelegate/Dummy.js +1 -1
  25. package/lib/ServiceDelegate/History/Consumption.js +31 -49
  26. package/lib/ServiceDelegate/History/Contact.js +14 -22
  27. package/lib/ServiceDelegate/History/Light.js +15 -23
  28. package/lib/ServiceDelegate/History/LightLevel.js +113 -0
  29. package/lib/ServiceDelegate/History/Motion.js +67 -80
  30. package/lib/ServiceDelegate/History/On.js +27 -33
  31. package/lib/ServiceDelegate/History/Power.js +46 -52
  32. package/lib/ServiceDelegate/History/Room.js +28 -50
  33. package/lib/ServiceDelegate/History/Thermo.js +19 -33
  34. package/lib/ServiceDelegate/History/Weather.js +33 -56
  35. package/lib/ServiceDelegate/History/index.js +155 -182
  36. package/lib/ServiceDelegate/ServiceLabel.js +1 -1
  37. package/lib/ServiceDelegate/index.js +13 -10
  38. package/lib/SystemInfo.js +3 -2
  39. package/lib/UiServer.js +1 -1
  40. package/lib/UpnpClient.js +1 -1
  41. package/package.json +2 -2
@@ -1,7 +1,7 @@
1
1
  // homebridge-lib/lib/EveHomeKitTypes.js
2
2
  //
3
3
  // Library for Homebridge plugins.
4
- // Copyright © 2017-2022 Erik Baauw. All rights reserved.
4
+ // Copyright © 2017-2023 Erik Baauw. All rights reserved.
5
5
 
6
6
  const homebridgeLib = require('../index')
7
7
 
@@ -162,7 +162,7 @@ class EveHomeKitTypes extends homebridgeLib.CustomHomeKitTypes {
162
162
  minValue: 0,
163
163
  maxValue: 380,
164
164
  minStep: 0.1,
165
- perms: [this.Perms.READ, this.Perms.NOTIFY]
165
+ perms: [this.Perms.PAIRED_READ, this.Perms.NOTIFY]
166
166
  })
167
167
 
168
168
  this.createCharacteristicClass('AirParticulateDensity', uuid('10B'), {
@@ -171,7 +171,7 @@ class EveHomeKitTypes extends homebridgeLib.CustomHomeKitTypes {
171
171
  minValue: 0,
172
172
  maxValue: 5000,
173
173
  minStep: 1,
174
- perms: [this.Perms.READ, this.Perms.NOTIFY]
174
+ perms: [this.Perms.PAIRED_READ, this.Perms.NOTIFY]
175
175
  }, 'VOC Level')
176
176
 
177
177
  this.createCharacteristicClass('VOCLevel', uuid('10B'), {
@@ -180,7 +180,7 @@ class EveHomeKitTypes extends homebridgeLib.CustomHomeKitTypes {
180
180
  minValue: 5,
181
181
  maxValue: 5000,
182
182
  minStep: 5,
183
- perms: [this.Perms.READ, this.Perms.NOTIFY]
183
+ perms: [this.Perms.PAIRED_READ, this.Perms.NOTIFY]
184
184
  }, 'VOC Level')
185
185
 
186
186
  this.createCharacteristicClass('TotalConsumption', uuid('10C'), {
@@ -189,7 +189,7 @@ class EveHomeKitTypes extends homebridgeLib.CustomHomeKitTypes {
189
189
  minValue: 0,
190
190
  maxValue: 1000000,
191
191
  minStep: 0.01,
192
- perms: [this.Perms.READ, this.Perms.NOTIFY]
192
+ perms: [this.Perms.PAIRED_READ, this.Perms.NOTIFY]
193
193
  }, 'Total Consumption')
194
194
 
195
195
  this.createCharacteristicClass('CurrentConsumption', uuid('10D'), {
@@ -198,7 +198,7 @@ class EveHomeKitTypes extends homebridgeLib.CustomHomeKitTypes {
198
198
  minValue: 0,
199
199
  maxValue: 12000,
200
200
  minStep: 0.1,
201
- perms: [this.Perms.READ, this.Perms.NOTIFY]
201
+ perms: [this.Perms.PAIRED_READ, this.Perms.NOTIFY]
202
202
  }, 'Current Consumption')
203
203
 
204
204
  this.createCharacteristicClass('AirPressure', uuid('10F'), {
@@ -207,58 +207,58 @@ class EveHomeKitTypes extends homebridgeLib.CustomHomeKitTypes {
207
207
  minValue: 700,
208
208
  maxValue: 1100,
209
209
  minStep: 0.1,
210
- perms: [this.Perms.READ, this.Perms.NOTIFY]
210
+ perms: [this.Perms.PAIRED_READ, this.Perms.NOTIFY]
211
211
  }, 'Air Pressure')
212
212
 
213
213
  this.createCharacteristicClass('ResetTotal', uuid('112'), {
214
214
  format: this.Formats.UINT32,
215
215
  unit: this.Units.seconds, // since 2001/01/01
216
- perms: [this.Perms.READ, this.Perms.NOTIFY, this.Perms.WRITE],
216
+ perms: [this.Perms.PAIRED_READ, this.Perms.NOTIFY, this.Perms.PAIRED_WRITE],
217
217
  adminOnlyAccess: [this.Access.WRITE]
218
218
  }, 'Reset Total')
219
219
 
220
220
  this.createCharacteristicClass('HistoryStatus', uuid('116'), {
221
221
  format: this.Formats.DATA,
222
- perms: [this.Perms.READ, this.Perms.NOTIFY, this.Perms.HIDDEN]
222
+ perms: [this.Perms.PAIRED_READ, this.Perms.NOTIFY, this.Perms.HIDDEN]
223
223
  }, 'History Status')
224
224
 
225
225
  this.createCharacteristicClass('HistoryEntries', uuid('117'), {
226
226
  format: this.Formats.DATA,
227
- perms: [this.Perms.READ, this.Perms.NOTIFY, this.Perms.HIDDEN]
227
+ perms: [this.Perms.PAIRED_READ, this.Perms.NOTIFY, this.Perms.HIDDEN]
228
228
  }, 'History Entries')
229
229
 
230
230
  this.createCharacteristicClass('OpenDuration', uuid('118'), {
231
231
  format: this.Formats.UINT32,
232
232
  unit: this.Units.SECONDS, // since last reset
233
- perms: [this.Perms.READ, this.Perms.NOTIFY, this.Perms.WRITE]
233
+ perms: [this.Perms.PAIRED_READ, this.Perms.NOTIFY, this.Perms.PAIRED_WRITE]
234
234
  }, 'Open Duration')
235
235
 
236
236
  this.createCharacteristicClass('ClosedDuration', uuid('119'), {
237
237
  format: this.Formats.UINT32,
238
238
  unit: this.Units.SECONDS, // since last reset
239
- perms: [this.Perms.READ, this.Perms.NOTIFY, this.Perms.WRITE]
239
+ perms: [this.Perms.PAIRED_READ, this.Perms.NOTIFY, this.Perms.PAIRED_WRITE]
240
240
  }, 'Closed Duration')
241
241
 
242
242
  this.createCharacteristicClass('LastActivation', uuid('11A'), {
243
243
  format: this.Formats.UINT32,
244
244
  unit: this.Units.SECONDS, // since last reset
245
- perms: [this.Perms.READ, this.Perms.NOTIFY]
245
+ perms: [this.Perms.PAIRED_READ, this.Perms.NOTIFY]
246
246
  }, 'Last Activation')
247
247
 
248
248
  this.createCharacteristicClass('HistoryRequest', uuid('11C'), {
249
249
  format: this.Formats.DATA,
250
- perms: [this.Perms.WRITE, this.Perms.HIDDEN]
250
+ perms: [this.Perms.PAIRED_WRITE, this.Perms.HIDDEN]
251
251
  }, 'History Request')
252
252
 
253
253
  this.createCharacteristicClass('ConfigCommand', uuid('11D'), {
254
254
  format: this.Formats.DATA,
255
- perms: [this.Perms.WRITE, this.Perms.HIDDEN]
255
+ perms: [this.Perms.PAIRED_WRITE, this.Perms.HIDDEN]
256
256
  }, 'Config Command')
257
257
 
258
258
  // On various Eve devices - presumably for firmware upgrade.
259
259
  this.createCharacteristicClass('Char11E', uuid('11E'), {
260
260
  format: this.Formats.DATA,
261
- perms: [this.Perms.READ, this.Perms.WRITE, this.Perms.HIDDEN]
261
+ perms: [this.Perms.PAIRED_READ, this.Perms.PAIRED_WRITE, this.Perms.HIDDEN]
262
262
  }, 'Eve 11E')
263
263
 
264
264
  this.createCharacteristicClass('Sensitivity', uuid('120'), {
@@ -266,7 +266,7 @@ class EveHomeKitTypes extends homebridgeLib.CustomHomeKitTypes {
266
266
  minValue: 0,
267
267
  maxValue: 7,
268
268
  validValues: [0, 4, 7],
269
- perms: [this.Perms.READ, this.Perms.NOTIFY, this.Perms.WRITE],
269
+ perms: [this.Perms.PAIRED_READ, this.Perms.NOTIFY, this.Perms.PAIRED_WRITE],
270
270
  adminOnlyAccess: [this.Access.WRITE]
271
271
  })
272
272
  this.Characteristics.Sensitivity.HIGH = 0
@@ -275,7 +275,7 @@ class EveHomeKitTypes extends homebridgeLib.CustomHomeKitTypes {
275
275
 
276
276
  this.createCharacteristicClass('SetTime', uuid('121'), {
277
277
  format: this.Formats.DATA,
278
- perms: [this.Perms.WRITE, this.Perms.HIDDEN]
278
+ perms: [this.Perms.PAIRED_WRITE, this.Perms.HIDDEN]
279
279
  })
280
280
 
281
281
  this.createCharacteristicClass('ElectricCurrent', uuid('126'), {
@@ -284,17 +284,17 @@ class EveHomeKitTypes extends homebridgeLib.CustomHomeKitTypes {
284
284
  minValue: 0,
285
285
  maxValue: 48,
286
286
  minStep: 0.01,
287
- perms: [this.Perms.READ, this.Perms.NOTIFY]
287
+ perms: [this.Perms.PAIRED_READ, this.Perms.NOTIFY]
288
288
  }, 'Electric Current')
289
289
 
290
290
  this.createCharacteristicClass('TimesOpened', uuid('129'), {
291
291
  format: this.Formats.UINT32,
292
- perms: [this.Perms.READ, this.Perms.NOTIFY]
292
+ perms: [this.Perms.PAIRED_READ, this.Perms.NOTIFY]
293
293
  }, 'Times Opened')
294
294
 
295
295
  this.createCharacteristicClass('ProgramCommand', uuid('12C'), {
296
296
  format: this.Formats.DATA,
297
- perms: [this.Perms.WRITE]
297
+ perms: [this.Perms.PAIRED_WRITE]
298
298
  }, 'Program Command')
299
299
 
300
300
  this.createCharacteristicClass('Duration', uuid('12D'), {
@@ -307,7 +307,7 @@ class EveHomeKitTypes extends homebridgeLib.CustomHomeKitTypes {
307
307
  1 * 60, 2 * 60, 3 * 60, 5 * 60, 10 * 60, 20 * 60, 30 * 60,
308
308
  1 * 3600, 2 * 3600, 3 * 3600, 5 * 3600, 10 * 3600, 12 * 3600, 15 * 3600
309
309
  ],
310
- perms: [this.Perms.READ, this.Perms.NOTIFY, this.Perms.WRITE],
310
+ perms: [this.Perms.PAIRED_READ, this.Perms.NOTIFY, this.Perms.PAIRED_WRITE],
311
311
  adminOnlyAccess: [this.Access.WRITE]
312
312
  })
313
313
  this.Characteristics.Duration.VALID_VALUES = [
@@ -321,12 +321,12 @@ class EveHomeKitTypes extends homebridgeLib.CustomHomeKitTypes {
321
321
  unit: this.Units.PERCENTAGE,
322
322
  minValue: 0,
323
323
  maxValue: 100,
324
- perms: [this.Perms.READ, this.Perms.NOTIFY]
324
+ perms: [this.Perms.PAIRED_READ, this.Perms.NOTIFY]
325
325
  }, 'Valve Position')
326
326
 
327
327
  this.createCharacteristicClass('ProgramData', uuid('12F'), {
328
328
  format: this.Formats.DATA,
329
- perms: [this.Perms.READ, this.Perms.NOTIFY]
329
+ perms: [this.Perms.PAIRED_READ, this.Perms.NOTIFY]
330
330
  }, 'Program Data')
331
331
 
332
332
  this.createCharacteristicClass('Elevation', uuid('130'), {
@@ -335,13 +335,13 @@ class EveHomeKitTypes extends homebridgeLib.CustomHomeKitTypes {
335
335
  minValue: -450,
336
336
  maxValue: 9000,
337
337
  minStep: 1,
338
- perms: [this.Perms.READ, this.Perms.NOTIFY, this.Perms.WRITE],
338
+ perms: [this.Perms.PAIRED_READ, this.Perms.NOTIFY, this.Perms.PAIRED_WRITE],
339
339
  adminOnlyAccess: [this.Access.WRITE]
340
340
  })
341
341
 
342
342
  this.createCharacteristicClass('ConfigData', uuid('131'), {
343
343
  format: this.Formats.DATA,
344
- perms: [this.Perms.READ, this.Perms.NOTIFY, this.Perms.HIDDEN]
344
+ perms: [this.Perms.PAIRED_READ, this.Perms.NOTIFY, this.Perms.HIDDEN]
345
345
  }, 'Config Data')
346
346
 
347
347
  this.createCharacteristicClass('WeatherTrend', uuid('136'), {
@@ -349,7 +349,7 @@ class EveHomeKitTypes extends homebridgeLib.CustomHomeKitTypes {
349
349
  minValue: 0,
350
350
  maxValue: 15,
351
351
  minStep: 1,
352
- perms: [this.Perms.READ, this.Perms.NOTIFY]
352
+ perms: [this.Perms.PAIRED_READ, this.Perms.NOTIFY]
353
353
  }, 'Weather Trend')
354
354
  this.Characteristics.WeatherTrend.BLANK = 0 // also: 2, 8, 10
355
355
  this.Characteristics.WeatherTrend.SUN = 1 // also: 9
@@ -360,7 +360,7 @@ class EveHomeKitTypes extends homebridgeLib.CustomHomeKitTypes {
360
360
  // On various Eve devices - presumably for firmware upgrade.
361
361
  this.createCharacteristicClass('Char158', uuid('158'), {
362
362
  format: this.Formats.DATA,
363
- perms: [this.Perms.READ, this.Perms.WRITE, this.Perms.HIDDEN]
363
+ perms: [this.Perms.PAIRED_READ, this.Perms.PAIRED_WRITE, this.Perms.HIDDEN]
364
364
  }, 'Eve 158')
365
365
 
366
366
  // =========================================================================
@@ -374,7 +374,7 @@ class EveHomeKitTypes extends homebridgeLib.CustomHomeKitTypes {
374
374
  unit: this.Units.PERCENTAGE,
375
375
  minValue: 0,
376
376
  maxValue: 100,
377
- perms: [this.Perms.READ, this.Perms.NOTIFY]
377
+ perms: [this.Perms.PAIRED_READ, this.Perms.NOTIFY]
378
378
  }
379
379
  )
380
380
 
@@ -384,7 +384,7 @@ class EveHomeKitTypes extends homebridgeLib.CustomHomeKitTypes {
384
384
  unit: 'mired',
385
385
  minValue: 153,
386
386
  maxValue: 500,
387
- perms: [this.Perms.READ, this.Perms.NOTIFY, this.Perms.WRITE]
387
+ perms: [this.Perms.PAIRED_READ, this.Perms.NOTIFY, this.Perms.PAIRED_WRITE]
388
388
  }, 'Color Temperature'
389
389
  )
390
390
 
@@ -394,14 +394,14 @@ class EveHomeKitTypes extends homebridgeLib.CustomHomeKitTypes {
394
394
  unit: 'K',
395
395
  minValue: 2000, // ct: 500
396
396
  maxValue: 6536, // ct: 153
397
- perms: [this.Perms.READ, this.Perms.NOTIFY, this.Perms.WRITE]
397
+ perms: [this.Perms.PAIRED_READ, this.Perms.NOTIFY, this.Perms.PAIRED_WRITE]
398
398
  }, 'Color Temperature'
399
399
  )
400
400
 
401
401
  this.createCharacteristicClass(
402
402
  'Condition', 'CD65A9AB-85AD-494A-B2BD-2F380084134D', {
403
403
  format: this.Formats.STRING,
404
- perms: [this.Perms.READ, this.Perms.NOTIFY]
404
+ perms: [this.Perms.PAIRED_READ, this.Perms.NOTIFY]
405
405
  }
406
406
  )
407
407
 
@@ -409,7 +409,7 @@ class EveHomeKitTypes extends homebridgeLib.CustomHomeKitTypes {
409
409
  'ConditionCategory', 'CD65A9AB-85AD-494A-B2BD-2F380084134C', {
410
410
  format: this.Formats.UINT16,
411
411
  mavValue: 999,
412
- perms: [this.Perms.READ, this.Perms.NOTIFY]
412
+ perms: [this.Perms.PAIRED_READ, this.Perms.NOTIFY]
413
413
  }, 'Condition Category'
414
414
  )
415
415
 
@@ -420,14 +420,14 @@ class EveHomeKitTypes extends homebridgeLib.CustomHomeKitTypes {
420
420
  minValue: -40,
421
421
  maxValue: 100,
422
422
  minStep: 0.1,
423
- perms: [this.Perms.READ, this.Perms.NOTIFY]
423
+ perms: [this.Perms.PAIRED_READ, this.Perms.NOTIFY]
424
424
  }, 'Current Temperature'
425
425
  )
426
426
 
427
427
  this.createCharacteristicClass(
428
428
  'Day', '57F1D4B2-0E7E-4307-95B5-808750E2C1C7', {
429
429
  format: this.Formats.STRING,
430
- perms: [this.Perms.READ, this.Perms.NOTIFY]
430
+ perms: [this.Perms.PAIRED_READ, this.Perms.NOTIFY]
431
431
  }
432
432
  )
433
433
 
@@ -438,7 +438,7 @@ class EveHomeKitTypes extends homebridgeLib.CustomHomeKitTypes {
438
438
  minValue: -40,
439
439
  maxValue: 100,
440
440
  minStep: 0.1,
441
- perms: [this.Perms.READ, this.Perms.NOTIFY]
441
+ perms: [this.Perms.PAIRED_READ, this.Perms.NOTIFY]
442
442
  }, 'Dew Point'
443
443
  )
444
444
 
@@ -449,7 +449,7 @@ class EveHomeKitTypes extends homebridgeLib.CustomHomeKitTypes {
449
449
  minValue: 0,
450
450
  maxValue: 150,
451
451
  minStep: 0.1,
452
- perms: [this.Perms.READ, this.Perms.NOTIFY]
452
+ perms: [this.Perms.PAIRED_READ, this.Perms.NOTIFY]
453
453
  }, 'Maximum Wind Speed'
454
454
  )
455
455
 
@@ -460,14 +460,14 @@ class EveHomeKitTypes extends homebridgeLib.CustomHomeKitTypes {
460
460
  minValue: -40,
461
461
  maxValue: 100,
462
462
  minStep: 0.1,
463
- perms: [this.Perms.READ, this.Perms.NOTIFY]
463
+ perms: [this.Perms.PAIRED_READ, this.Perms.NOTIFY]
464
464
  }, 'Minimum Temperature'
465
465
  )
466
466
 
467
467
  this.createCharacteristicClass(
468
468
  'ObservationTime', '234FD9F1-1D33-4128-B622-D052F0C402AF', {
469
469
  format: this.Formats.STRING,
470
- perms: [this.Perms.READ, this.Perms.NOTIFY]
470
+ perms: [this.Perms.PAIRED_READ, this.Perms.NOTIFY]
471
471
  }, 'Observation Time'
472
472
  )
473
473
 
@@ -477,14 +477,14 @@ class EveHomeKitTypes extends homebridgeLib.CustomHomeKitTypes {
477
477
  unit: 'DU',
478
478
  minValue: 0,
479
479
  maxValue: 500,
480
- perms: [this.Perms.READ, this.Perms.NOTIFY]
480
+ perms: [this.Perms.PAIRED_READ, this.Perms.NOTIFY]
481
481
  }
482
482
  )
483
483
 
484
484
  this.createCharacteristicClass(
485
485
  'Rain', 'F14EB1AD-E000-4EF4-A54F-0CF07B2E7BE7', {
486
486
  format: this.Formats.BOOL,
487
- perms: [this.Perms.READ, this.Perms.NOTIFY]
487
+ perms: [this.Perms.PAIRED_READ, this.Perms.NOTIFY]
488
488
  }
489
489
  )
490
490
 
@@ -494,7 +494,7 @@ class EveHomeKitTypes extends homebridgeLib.CustomHomeKitTypes {
494
494
  unit: 'mm',
495
495
  minValue: 0,
496
496
  maxValue: 200,
497
- perms: [this.Perms.READ, this.Perms.NOTIFY]
497
+ perms: [this.Perms.PAIRED_READ, this.Perms.NOTIFY]
498
498
  }, 'Rain Last Hour'
499
499
  )
500
500
 
@@ -504,7 +504,7 @@ class EveHomeKitTypes extends homebridgeLib.CustomHomeKitTypes {
504
504
  unit: 'mm',
505
505
  minValue: 0,
506
506
  maxValue: 2000,
507
- perms: [this.Perms.READ, this.Perms.NOTIFY]
507
+ perms: [this.Perms.PAIRED_READ, this.Perms.NOTIFY]
508
508
  }, 'Total Rain'
509
509
  )
510
510
 
@@ -514,14 +514,14 @@ class EveHomeKitTypes extends homebridgeLib.CustomHomeKitTypes {
514
514
  unit: this.Units.PERCENTAGE,
515
515
  minValue: 0,
516
516
  maxValue: 100,
517
- perms: [this.Perms.READ, this.Perms.NOTIFY]
517
+ perms: [this.Perms.PAIRED_READ, this.Perms.NOTIFY]
518
518
  }, 'Rain Probabiliy'
519
519
  )
520
520
 
521
521
  this.createCharacteristicClass(
522
522
  'Snow', 'F14EB1AD-E000-4CE6-BD0E-384F9EC4D5DD', {
523
523
  format: this.Formats.BOOL,
524
- perms: [this.Perms.READ, this.Perms.NOTIFY]
524
+ perms: [this.Perms.PAIRED_READ, this.Perms.NOTIFY]
525
525
  }
526
526
  )
527
527
 
@@ -530,7 +530,7 @@ class EveHomeKitTypes extends homebridgeLib.CustomHomeKitTypes {
530
530
  format: this.Formats.UINT8,
531
531
  minValue: 0,
532
532
  maxValue: 10,
533
- perms: [this.Perms.READ, this.Perms.NOTIFY]
533
+ perms: [this.Perms.PAIRED_READ, this.Perms.NOTIFY]
534
534
  }, 'UV Index'
535
535
  )
536
536
 
@@ -540,14 +540,14 @@ class EveHomeKitTypes extends homebridgeLib.CustomHomeKitTypes {
540
540
  minValue: 0,
541
541
  maxValue: 100,
542
542
  unit: 'km',
543
- perms: [this.Perms.READ, this.Perms.NOTIFY]
543
+ perms: [this.Perms.PAIRED_READ, this.Perms.NOTIFY]
544
544
  }
545
545
  )
546
546
 
547
547
  this.createCharacteristicClass(
548
548
  'WindDirection', '46F1284C-1912-421B-82F5-EB75008B167E', {
549
549
  format: this.Formats.STRING,
550
- perms: [this.Perms.READ, this.Perms.NOTIFY]
550
+ perms: [this.Perms.PAIRED_READ, this.Perms.NOTIFY]
551
551
  }, 'Wind Direction'
552
552
  )
553
553
 
@@ -558,7 +558,7 @@ class EveHomeKitTypes extends homebridgeLib.CustomHomeKitTypes {
558
558
  minValue: 0,
559
559
  maxValue: 150,
560
560
  minStep: 0.1,
561
- perms: [this.Perms.READ, this.Perms.NOTIFY]
561
+ perms: [this.Perms.PAIRED_READ, this.Perms.NOTIFY]
562
562
  }, 'Wind Speed'
563
563
  )
564
564
 
@@ -577,6 +577,7 @@ class EveHomeKitTypes extends homebridgeLib.CustomHomeKitTypes {
577
577
  * @property {Service} Thermostat - Used by: Eve Thermo.
578
578
  * @property {Service} Weather - Used by: Eve Weather.
579
579
  */
580
+
580
581
  this.createServiceClass('Weather', uuid('001'), [
581
582
  this.Characteristics.CurrentTemperature
582
583
  ], [
@@ -585,10 +586,10 @@ class EveHomeKitTypes extends homebridgeLib.CustomHomeKitTypes {
585
586
  ])
586
587
 
587
588
  this.createServiceClass('History', uuid('007'), [
588
- this.Characteristics.HistoryRequest, // 11C
589
- this.Characteristics.SetTime, // 121
590
589
  this.Characteristics.HistoryStatus, // 116
591
- this.Characteristics.HistoryEntries // 117
590
+ this.Characteristics.HistoryEntries, // 117
591
+ this.Characteristics.HistoryRequest, // 11C
592
+ this.Characteristics.SetTime // 121
592
593
  ], [
593
594
  this.Characteristics.ResetTotal // 112
594
595
  // this.Characteristics.ConfigCommand, // 11D
@@ -597,6 +598,15 @@ class EveHomeKitTypes extends homebridgeLib.CustomHomeKitTypes {
597
598
  // this.Characteristics.Char158, // presumably for firmware upgrade
598
599
  ])
599
600
 
601
+ this.createServiceClass('Consumption', uuid('008'), [
602
+ this.Characteristics.Voltage, // 10A
603
+ this.Characteristics.TotalConsumption, // 10C
604
+ this.Characteristics.CurrentConsumption, // 10D
605
+ this.Characteristics.ElectricCurrent, // 126
606
+ this.hapCharacteristics.StatusFault,
607
+ this.hapCharacteristics.LockPhysicalControls
608
+ ])
609
+
600
610
  this.createServiceClass('AirPressureSensor', uuid('00A'), [
601
611
  this.Characteristics.AirPressure,
602
612
  this.Characteristics.Elevation
package/lib/HttpClient.js CHANGED
@@ -1,7 +1,7 @@
1
1
  // homebridge-lib/lib/HttpClient.js
2
2
  //
3
3
  // Library for Homebridge plugins.
4
- // Copyright © 2018-2022 Erik Baauw. All rights reserved.
4
+ // Copyright © 2018-2023 Erik Baauw. All rights reserved.
5
5
 
6
6
  'use strict'
7
7
 
@@ -1,7 +1,7 @@
1
1
  // homebridge-lib/lib/JsonFormatter.js
2
2
  //
3
3
  // Library for Homebridge plugins.
4
- // Copyright © 2018-2022 Erik Baauw. All rights reserved.
4
+ // Copyright © 2018-2023 Erik Baauw. All rights reserved.
5
5
 
6
6
  'use strict'
7
7