Getting push updates from the Hue bridge via HomeKit Controller

Just a heads-up that I wanted to share. Because the Hue API doesn’t support push updates, the Home Assistant Hue integration has to poll the bridge every 5 seconds for updated states/events. This means that Home Assistant won’t know about events like the motion sensor detecting motion for up to 5 seconds after it happens. Some custom integrations work around this limitation by making the scan interval shorter than 5 seconds. I’ve even seen one that polls the bridge every 0.5 seconds :scream:

However, there’s another solution to this.

As most of us probably know, the Hue bridge has HomeKit support… and the implementation that the bridge uses supports pushing state updates. This means if you connect the bridge to Home Assistant via HomeKit Controller you can get state updates pushed to Home Assistant. This includes lights, the motion sensor, and—hopefully soon since a PR for it was merged recently—button presses on the Hue remotes.

Now, there are pros and cons to this approach. It’s not a full-on replacement for the Hue integration, so if you do connect the bridge via HKC, you might want to keep the Hue integration set up. Connecting the bridge via HKC doesn’t bring in the Hue groups (rooms), and the friendly names of the lights also aren’t brought in (and the entity IDs are similarly generic), so you’ll have to figure out which light is which and rename them appropriately for initial setup. It also doesn’t appear to report when lights are unreachable like the Hue integration can (but it’s possible I just didn’t wait long enough during my testing). Finally, you can’t activate any scenes with HKC like you can with the Hue integration’s hue.hue_activate_scene service.

If you connect the bridge via the Hue integration and HKC, you’ll have duplicate entities for all of your Hue stuff, but you can disable any unwanted duplicate entities. Why Philips doesn’t support pushing updates with their own API is beyond me especially since their HomeKit implementation supports it.

Thank you @123 for reminding me of some of the cons after my response here.

2 Likes

Did you ever solve the issue with the HomeKit version of the lights not reporting their unreachable state? I use that to detect when they’ve been turned on at the wall and set them to the appropriate colour for that time of day. I was hoping HomeKit would speed up that process but without any reporting of unreachable bulbs it’s useless :frowning:.