Closed donnib closed 5 years ago
You shouldn't specify any other attributes (except transitiontime
) when setting "on": false
. Normally, the gateway returns an error 201 parameter, /lights/1/bri, is not modifiable. Device is set to off.
when you try and change an attribute while the light is off. It looks like the combined request first sends a command to turn the lights off, and then a command to change the brightness, causing the light to ignore (or counter?) the first command.
Note the difference between notifications caused by sending commands to the lights vs notifications as result from attribute reporting by the light. All lights support bri
values from 1 of 254 and the Ikea tunable whites support ct
values from 153 to 454. When sending a command with an out-of-range value, you first get an event for the value sent, then one for the actual value of the light.
Well i don't see in the documentation an explnation from this besides this the api does not give me an error for doing this. I see in the doc that bri is 1-255 and not 254 and ct 150-500 but that is different for some lights ? How does one know the supported values ?
No matter what the behavior i believe it's not handled correctly. Btw lights support this somehow. If you set a light like this it will not get into the problem above but it will set the bri to 0 on off no matter what you set it to then it will set it to 1 which somehow also weird.
In ZigBee Light Link (ZLL) brightness values 0 and 255 are special, 255 will be clamped to 254, value 0 doesn't exist but is used when command Move to Level (with on/off)
is send. Lights will then always report bri
1, which is correct within the ZLL standard.
If you wan't to turn of lights or groups use either {"on":false}
or { "on": false, "bri": 0, "transitiontime": xxx}
. Only the first one will preserve the current brightness value the second one allows to slowly fade down but will set the brightness to 1.
Closing the oldest issues for know to tidy up the tracker and duplicates in newer issues.
State of group before doing anything :
Issue command
{"on": true,"bri":255, "ct":500}
Events:
State of group :
Issue command :
{"on": false,"bri":255, "ct":500}
Events:
All lights should be off now but they are not. Here is the state of group now :
Same goes for one light 2 (just an example the others have same state):
This may be related to : https://github.com/dresden-elektronik/deconz-rest-plugin/issues/76