-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Document the possibility to force an update of the "alive" state #107
Comments
I don't know if there's better method, but this work fine. I used warmth because it doesn't noticeably influence the bulb state if it is powered on. Changing brightness would turn on the bulb, if if is powered on and in OFF state on the gateway. In my tests, the true alive status was determined after 6 seconds. The loop runs to 10 seconds to make sure. I also tried just changing the warmth once, but then it would take full 10 seconds to get the true status. |
Did you check the gateway updates (observeDevice) for turned-off bulbs? Do those come and include the correct color temperature (the one you just set)? If yes, this could be a way to bail out of the check loop early if the bulb is alive. |
Yes, that could be an interesting idea! At what endpoint can I get the gateway updates? 15011/15012? |
Basically you have set the observe option for the specific endpoint you are interested in, eg devices/deviceID |
Is it really needed to change a value for a device to receive an update? The warmth, for instance won't work with a non-white spectrum light. And from what I understood the gateway will also respond with a new alive value after it receives an update for a bulb in which no properties have been changed. Am I correct in assuming that if a lightOperation was sent to a device that contains no changes, that this update is not sent? And if so, maybe implement a force update option? |
You can also use the brightness for no-spectrum lights (with the downside that turned-off bulbs may be turned on) or color/hex/sat for RGB lights. |
That would be awesome! :) |
You were right, setting the brightness for no-spectrum lights turns them on, so that is not an option. I then tried it by changing the transitionTime ( using operateLigh() ) and all though the command (seems) tor work ok, it does not trigger any callbacks. So I guess it is safe to say that at the moment for no-spectrum lights there is no way to determine the "alive" state by forcing an update. ( unless switching the light on when it is off is not a problem of course :) ) |
See: #106 (comment)
The text was updated successfully, but these errors were encountered: