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
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ā.