PhilipsHue / PhilipsHueSDK-iOS-OSX

The Software Development Kit for Philips Hue on iOS and OS X (beta)
579 stars 169 forks source link

Shorter heartbeat or push #7

Closed twam closed 10 years ago

twam commented 11 years ago

It would be nice the have the a shorter period for the heartbeat pulls of the cache.

Maybe it is even possible to have something like a push-mechanism, where the HTTP connection to the bridge stays open and it get's notified by the bridge if something changes. I guess therefor something in the bridge firmware has to be changed, but it still might be a good idea :)

ghost commented 11 years ago

I need this as well. I'm interested in triggering things by changes to light states. I'd like to change the state of unswitched lights when a switched light is turned on. For example, I have one hue bulb electrically connected to a wall switch, and in the same room, I have two floor lamps plugged into standard (unswitched) outlets. I want all three to turn on when the wall switch is activated. Unless I have a high-frequency heartbeat monitoring the bridge, or get notified on light changes, this isn't really possible.

jhvdb87 commented 10 years ago

Push mechanism is not going to be supported, at least on the short term, in the bridge. However, in v1.1.1beta you can configure a shorter heartbeat interval.

twam commented 10 years ago

Nevertheless push would be interresting to prohibit the bridge from throttling because many simultanious devices poll very often.

If not a real push mechanismn, this could be implemented as a long polling.