Closed vanniktech closed 6 years ago
The bridge provides no api to long poll or subscribe to events. So, there's no way to detect when a light has changed values without continuously polling for its values.
Alright that's what I thought. However the hue android app is capable of that so maybe all they're doing internally is also just a simple poll.
The bridge can handle the polling. I can't find it anymore, but the official docs said the bridge can handle something like 5ops/s.
How are the Android Apps doing it though? When I turn off the light the app immediately notices the light change. I can't imagine that the Android App is pulling every second for each lamp the state.
Maybe they are polling group 0, which gets you the state for all lights. That can be feasibly done once per second.
Got the change to talk to one of the engineers. They do just poll it every second. Hence I'll close this issue.
I'd like to observe light bulb changes.
Instead of querying every X seconds and asking for the state of the light bulbs it would be cool if I could somehow register myself to light changes and observe changes.
So far I haven't found this in the README nor do I know whether the bridge itself supports something like this.