-
Notifications
You must be signed in to change notification settings - Fork 76
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
Ability to determine there are no LIFX bulbs available #4
Comments
Another related issue: let's say I have 2 light bulbs connected (correctly detected by the library), and I turn one off. IIUC the library won't tell me that through the |
@yonilevy on the first issue: the exact way in which each specific app manages or responds to a LIFX discovery timeout may be quite different, so we've left it out of the SDK for now, but we may add it in the future. On the second issue: there is a |
@nsforge as you suggested, I check every second the reachability of all the lights. If you power on a bulb (with the wall switch), the SDK detects the new bulb immediately (when the bulb is connected to WiFi and blinks), but when I turn it off with the wall switch, then the reachability changes only after 28 seconds. |
Due to the way the LIFX network currently works, this is the best (and fastest) way to find out if a device is reachable or not. We may be able to improve the speed of this in the future, but it depends on a complex combination of network architecture, firmware and client code. Is there a specific reason you want LFXLight.reachability to trigger straight away? Do you have a specific feature that depends on it, or is it just that you'd like your UI to update instantaneously? |
@nsforge thank you for your fast answer! I use the reachability of the lights just for the UI (to let the user know how many lights are connected), so it's not that important, I just wanted to know if this is normal/expected |
I think it is necessary to have an event triggered when the reachability of an item changed. Polling the reachability of a light can impact battery life of devices. I currently have a timer checking every 20 seconds and this is sufficient for my needs; however, I would prefer an event via either a callback or message. |
I'm seeing the same as @LArquint when you turn a light off, it's 23 - 28 seconds before reachability is update to off. A problem I'm seeing is turning the light back on after it's removed, I can't seem to pick it up again. I tried looping though |
How does the refresh button work on the official LIFX app? |
There seems to be no way to determine there are no LIFX bulbs available in the network. Obviously this can't be done without a timeout, but would be nice if you could provide such functionality with your library as you'd probably choose a better minimum timeout than I would. Also it's a bit weird that the LIFX Browser demo app suffers from this behaviour (is stuck in "searching" forever).
The text was updated successfully, but these errors were encountered: