I do not believe there is currently any support from receiving updates about a LIFX bulb that may have changed state via some other control mechanism. That is, the ability to write an application that can detect a bulb has been turned on or off via the mobile app or some other method (other than by polling).
Are there any plans to support this in the HTTP API at some point (via webhooks or some other means)? The ability to do so is crucial for building a great application that is responsive to the user.
Yup, its true. The only method to currently detect changes to a bulb is by some sort of polling.
There are plans, and there have been for quite some time. However the problem is more complex that it originally seems. There are complications in the firmware and the cloud infrastructure that make this a tough problem.
I’d be really interested in hearing why you need live updates to the state of the bulb. Users often only use one application at a time, so you can get away with ‘optimistic updates’ (assuming your state change worked unless something suggests it failed).
The AllJoyn lighting spec have events associated with it for when values change, so I wonder if you can use that protocol instead? (Unfortunately that means only the 800 bulb right now though)
I haven’t check if that event actually fires on the 800 bulb - would have to double check
Interesting, I will keep this in mind, thanks!
Open loop signaling is generally a bad practice. Just because I sent on “on” message doesn’t mean the bulb actually turned on. I may not be in the same room as the bulb.This is an example of a live control showing status
. I may have this switch mounted in multiple places - of course it’s not a switch but an app I can run on the smartphones mounted around my house.
Also algorithms may respond to the state such as a “keep the porch light on”.
@daniel_hall any update on that issue?
I dumped my thoughts on this a couple of years ago here: https://github.com/LIFX/lifx-protocol-docs/issues/22