-
Notifications
You must be signed in to change notification settings - Fork 482
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rest api incorrectly reports light is turned off after setting bri=0 #1111
Comments
I have found the same. Also the API returns an error if you try to manipulate 'bri' in the 'off' state. |
Did some sniffing how the Hue bridge handles
When While not intuitive, this behaviour makes total sense to me, except when turning the light off with a Interesting: when EDIT |
I also noticed that when sending the following body to
If you remove the on attribute or set bri to 2 instead, then it works correctly and the light is not switched off. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@Thomas-Vos, Hue lights turn off when receiving a Move to Level (with On/Off) (1, t). From the ZCL spec (section 3.10.2.4.5):
I suppose Hue treats 1 as the minimum allowed level, even though The Hue bridge handles @manup I've been meaning to refactor We could whitelist the different light types and/or manufacturers and adapt the logic accordingly (as is done for We definitely need to apply In pseudo code (with whitelisting):
or without whitelisting:
|
Yes this might turn out really tricky, albeit possible my main concern here would be poor scaling. With the ever crowing network sizes > 100, unicast messages won't be perceived well. I think we should explore the groupcast path first.
I like that approach, with careful timing to not trigger the IKEA transition time bug this could actually work well. The extra messages should be fine and compared to dozens of unicast messages, they don't look too bad. Since this is a sequence of group casts, this screams to be implemented as a simple state machine within the related group scope. |
Definitely - I sure as hell didn't mean to issue unicast messages for each member light when PUTting a group
Cool. I'll have a go at that, then.
As long as the first command(s) are sent with a transitiontime of 0, we should be OK.
Not sure I like the complexity of that. I haven't sniffed in detail how the Hue bridge handles bodies of
or
For IKEA lights, we should either use a For a next PUT, maybe we could issue a Stop command to actively cancel any running transitions. Haven't tried that, though, so I don't yet know if the IKEA lights would accept that. We should also test how the IKEA light deals with colour transitions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
When I set bri=0 state, the state on=false is set. But the light itself is still on at minimal brightness. Like so:
$ PUT /lights/47/state '{ "on": true, "bri": 255, "transitiontime": 0 }' && GET /lights/47 | jq .
$ PUT /lights/47/state '{ "bri": 0, "transitiontime": 40 }' && GET /lights/47 | jq .
The behavior is the same regardless if I specify the transitiontime or not on the bri=0 state update.
The text was updated successfully, but these errors were encountered: