homebridge-deconz 0.0.27 → 0.1.1
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.
- package/config.schema.json +0 -7
- package/lib/Deconz/Resource.js +27 -4
- package/lib/DeconzAccessory/AirPurifier.js +0 -2
- package/lib/DeconzAccessory/Gateway.js +298 -149
- package/lib/DeconzAccessory/Light.js +27 -37
- package/lib/DeconzAccessory/Sensor.js +91 -1
- package/lib/DeconzAccessory/Thermostat.js +1 -3
- package/lib/DeconzAccessory/WarningDevice.js +0 -8
- package/lib/DeconzAccessory/WindowCovering.js +0 -2
- package/lib/DeconzAccessory/index.js +123 -13
- package/lib/DeconzPlatform.js +12 -20
- package/lib/DeconzService/AirPressure.js +1 -1
- package/lib/DeconzService/AirPurifier.js +2 -2
- package/lib/DeconzService/AirQuality.js +1 -1
- package/lib/DeconzService/Alarm.js +1 -1
- package/lib/DeconzService/Battery.js +19 -9
- package/lib/DeconzService/Button.js +1 -0
- package/lib/DeconzService/CarbonMonoxide.js +1 -1
- package/lib/DeconzService/Consumption.js +3 -1
- package/lib/DeconzService/Contact.js +1 -25
- package/lib/DeconzService/Daylight.js +22 -19
- package/lib/DeconzService/Flag.js +1 -1
- package/lib/DeconzService/Gateway.js +48 -0
- package/lib/DeconzService/Humidity.js +1 -1
- package/lib/DeconzService/Leak.js +1 -1
- package/lib/DeconzService/Light.js +111 -86
- package/lib/DeconzService/LightLevel.js +3 -3
- package/lib/DeconzService/Motion.js +3 -9
- package/lib/DeconzService/Power.js +2 -1
- package/lib/DeconzService/Status.js +1 -1
- package/lib/DeconzService/Switch.js +1 -1
- package/lib/DeconzService/WindowCovering.js +14 -4
- package/lib/DeconzService/index.js +11 -12
- package/package.json +6 -6
- package/lib/DeconzAccessory/Contact.js +0 -53
- package/lib/DeconzAccessory/Motion.js +0 -53
- package/lib/DeconzAccessory/Temperature.js +0 -61
- package/lib/DeconzService/DeviceSettings.js +0 -65
- package/lib/DeconzService/GatewaySettings.js +0 -176
package/config.schema.json
CHANGED
@@ -14,13 +14,6 @@
|
|
14
14
|
"required": true,
|
15
15
|
"default": "deCONZ"
|
16
16
|
},
|
17
|
-
"brightnessAdjustment": {
|
18
|
-
"description": "Adjustment factor for brightness for adaptive lighting. Default: 100.",
|
19
|
-
"type": "integer",
|
20
|
-
"placeholder": 100,
|
21
|
-
"minimum": 10,
|
22
|
-
"maximum": 100
|
23
|
-
},
|
24
17
|
"forceHttp": {
|
25
18
|
"description": "Use plain http instead of https.",
|
26
19
|
"type": "boolean"
|
package/lib/Deconz/Resource.js
CHANGED
@@ -21,6 +21,7 @@ const sensorsPrios = [
|
|
21
21
|
'Power',
|
22
22
|
'Consumption',
|
23
23
|
'Temperature',
|
24
|
+
'LightLevel',
|
24
25
|
'Motion',
|
25
26
|
'OpenClose',
|
26
27
|
'AirPurifier',
|
@@ -231,6 +232,27 @@ class Resource {
|
|
231
232
|
alert: body.state.alert !== undefined,
|
232
233
|
colorLoop: body.state.effect !== undefined
|
233
234
|
}
|
235
|
+
if (body.capabilities != null) {
|
236
|
+
const cap = body.capabilities
|
237
|
+
if (cap.color != null) {
|
238
|
+
if (cap.color.ct != null) {
|
239
|
+
this.capabilities.ctMax = cap.color.ct.max
|
240
|
+
this.capabilities.ctMin = cap.color.ct.min
|
241
|
+
}
|
242
|
+
if (cap.color.effects != null && cap.color.effects.length > 2) {
|
243
|
+
this.capabilities.effects = cap.color.effects.slice(2).map((effect) => {
|
244
|
+
return effect[0].toUpperCase() + effect.slice(1)
|
245
|
+
})
|
246
|
+
}
|
247
|
+
if (cap.color.xy != null) {
|
248
|
+
this.capabilities.gamut = {
|
249
|
+
r: cap.color.xy.red,
|
250
|
+
g: cap.color.xy.green,
|
251
|
+
b: cap.color.xy.blue
|
252
|
+
}
|
253
|
+
}
|
254
|
+
}
|
255
|
+
}
|
234
256
|
break
|
235
257
|
}
|
236
258
|
case 'WarningDevice':
|
@@ -487,14 +509,15 @@ class Resource {
|
|
487
509
|
}
|
488
510
|
break
|
489
511
|
case 'Philips':
|
490
|
-
case 'Signify Netherlands B.V.':
|
512
|
+
case 'Signify Netherlands B.V.':
|
491
513
|
// See: http://www.developers.meethue.com/documentation/supported-lights
|
492
514
|
this.manufacturer = 'Signify Netherlands B.V.'
|
493
515
|
this.capabilities.breathe = true
|
494
516
|
this.capabilities.computesXy = true
|
495
|
-
|
496
|
-
|
497
|
-
|
517
|
+
if (this.body.capabilities == null) {
|
518
|
+
const gamut = hueGamutTypeByModel[this.model] || 'C'
|
519
|
+
this.capabilities.gamut = hueGamutType[gamut]
|
520
|
+
}
|
498
521
|
break
|
499
522
|
default:
|
500
523
|
break
|