core: Hue unable to reach bridge

Home Assistant release with the issue: 0.92.2

Last working Home Assistant release (if known): Unknown

Operating environment (Hass.io/Docker/Windows/etc.): Running Docker on Synology Nas DS718+

Component/platform: https://www.home-assistant.io/components/hue/

Description of problem: Losing connection with the Hue bridge

Traceback (if applicable): Short version below, full version

2019-05-07 03:02:19 ERROR (MainThread) [homeassistant.components.hue.sensor_base] Unable to reach bridge 192.168.178.5 ()
2019-05-07 04:29:58 ERROR (MainThread) [homeassistant.components.hue.light] Unable to reach bridge 192.168.178.5 ()
2019-05-07 05:00:25 ERROR (MainThread) [homeassistant.components.hue.light] Unable to reach bridge 192.168.178.5 ()
2019-05-07 21:29:02 ERROR (MainThread) [homeassistant.components.hue.sensor_base] Unable to reach bridge 192.168.178.5 ()
2019-05-08 03:02:31 ERROR (MainThread) [homeassistant.components.hue.sensor_base] Unable to reach bridge 192.168.178.5 ()
2019-05-08 03:15:34 ERROR (MainThread) [homeassistant.components.hue.light] Unable to reach bridge 192.168.178.5 ()
2019-05-08 03:28:57 ERROR (MainThread) [homeassistant.components.hue.light] Unable to reach bridge 192.168.178.5 ()
2019-05-08 03:58:03 ERROR (MainThread) [homeassistant.components.hue.sensor_base] Unable to reach bridge 192.168.178.5 ()
2019-05-08 04:19:29 ERROR (MainThread) [homeassistant.components.hue.light] Unable to reach bridge 192.168.178.5 ()
2019-05-08 04:49:40 ERROR (MainThread) [homeassistant.components.hue.light] Unable to reach bridge 192.168.178.5 ()
2019-05-09 03:02:32 ERROR (MainThread) [homeassistant.components.hue.light] Unable to reach bridge 192.168.178.5 ()
2019-05-09 03:20:41 ERROR (MainThread) [homeassistant.components.hue.sensor_base] Unable to reach bridge 192.168.178.5 ()
2019-05-09 03:39:03 ERROR (MainThread) [homeassistant.components.hue.light] Unable to reach bridge 192.168.178.5 ()
2019-05-09 04:12:09 ERROR (MainThread) [homeassistant.components.hue.light] Unable to reach bridge 192.168.178.5 ()
2019-05-09 05:08:20 ERROR (MainThread) [homeassistant.components.hue.light] Unable to reach bridge 192.168.178.5 ()
2019-05-09 16:38:05 ERROR (MainThread) [homeassistant.components.hue.sensor_base] Unable to reach bridge 192.168.178.5 ()
2019-05-09 20:38:51 ERROR (MainThread) [homeassistant.components.hue.light] Unable to reach bridge 192.168.178.5 ()
2019-05-10 03:02:01 ERROR (MainThread) [homeassistant.components.hue.light] Unable to reach bridge 192.168.178.5 ()
2019-05-10 03:12:54 ERROR (MainThread) [homeassistant.components.hue.light] Unable to reach bridge 192.168.178.5 ()
2019-05-10 03:16:13 ERROR (MainThread) [homeassistant.components.hue.sensor_base] Unable to reach bridge 192.168.178.5 ()
2019-05-10 04:01:27 ERROR (MainThread) [homeassistant.components.hue.light] Unable to reach bridge 192.168.178.5 ()
2019-05-10 04:29:25 ERROR (MainThread) [homeassistant.components.hue.sensor_base] Unable to reach bridge 192.168.178.5 ()
2019-05-10 05:03:02 ERROR (MainThread) [homeassistant.components.hue.light] Unable to reach bridge 192.168.178.5 ()
2019-05-10 05:28:03 ERROR (MainThread) [homeassistant.components.hue.sensor_base] Unable to reach bridge 192.168.178.5 ()

Additional information: Hue bridge V2, firmware 1931140050.

Currently using:

  • 20x GU10 Ambiance White
  • 2x E27 Color
  • 1x E14 Ambiance White
  • 3x Niko FOU wall switches
  • 1x Hue Dimmer switch

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 7
  • Comments: 91 (19 by maintainers)

Most upvoted comments

We have merged a fix that should limit the parallel requests that we make to Hue, which could fix this.

I will get a fix in for 105 that should be able to recover from initial failed connections.

I recently added a hue bridge and see this issue with 0.103, RPi3+, Hassio

I’m not familiar with the code but taking a look at components/hue/light.py I think I see what might be wrong: If the 4 second timeout triggers the exception in async_update_items() the first time it runs, then will it ever run again? I think probably not since current.items will be empty so there is nothing to call async_schedule_update_ha_state() on and with no registered lights on this bridge yet no polling will happen either. Maybe there is some other way that async_update_items() will run again, but if not I think it would explain what we’re seeing.

I confirmed that simply bumping that timeout to 10 seconds worked around the issue for me in my environment. Doesn’t seem like that would be the most legit fix, but maybe that suggests a proper fix to someone more familiar with the async model here and can give folks a workaround in the mean time.

I have had this error in my log every day but only 5-10 of them. Now I see more than 100 in a day and it has started making things fail.

Something went worse in recent Home Assistant updates. I have rebooted by router, the Hue Bridge, I have replaced the Ethernet cable, moved to another switch port etc.

My Hue bridge has a hardcoded fixed IP address so it is not DHCP related. Both the bridge and the HA machine (a NUC) are using cabled Ethernet to the same switch. Ping time is 0.3 ms between them

I then tried to start a ping in a command line window. And at the same time watching the HA log. And I do not get any timeouts on the ping while I get the errors in the HA log. So it is not basic networking. It is HA that does not get a reply from the bridge.

Maybe we are too aggresive at polling the bridge or something times out too fast?

Or is it a recent update to the Hue itself that has made is unreliable and not at all the fault of HA? I just wonder.

hue: bridges: - host: 192.168.1.56 allow_unreachable: true

Seems to have done the trick

This too, is driving me crazy, The Hue bridge keeps going unreachable on 0.100.1 running in HTTPS

Something almost like API Request Flood Detection kicking in on the Hue side?

I agree though. These last updates have not been good for me. I actually had everything go offline and have just resolved to starting over with a brand new server and see if these problems remain after a fresh build.

On Sat, Sep 7, 2019 at 2:09 PM Kenneth Lavrsen notifications@github.com wrote:

I have had this error in my log every day but only 5-10 of them. Now I see more than 100 in a day and it has started making things fail.

Something went worse in recent Home Assistant updates. I have rebooted by router, the Hue Bridge, I have replaced the Ethernet cable, moved to another switch port etc.

My Hue bridge has a hardcoded fixed IP address so it is not DHCP related. Both the bridge and the HA machine (a NUC) are using cabled Ethernet to the same switch. Ping time is 0.3 ms between them

I then tried to start a ping in a command line window. And at the same time watching the HA log. And I do not get any timeouts on the ping while I get the errors in the HA log. So it is not basic networking. It is HA that does not get a reply from the bridge.

Maybe we are too aggresive at polling the bridge or something times out too fast?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/home-assistant/home-assistant/issues/23796?email_source=notifications&email_token=AEL4SXZ2KW475BJMA7IVB5TQIQJ7BA5CNFSM4HMBH6EKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6FCI6A#issuecomment-529147000, or mute the thread https://github.com/notifications/unsubscribe-auth/AEL4SX73A4PBMFTC466OUFLQIQJ7BANCNFSM4HMBH6EA .

After re-adding the hue component through the default home assistant integration (completely removed hue component configuration and integration first) my hue setup works as intended. No more error messages of home assistant being unable to reach the bridge (for two days now). I’m on home assistant 0.95.4.

Here’s a trick I use to get into the Components folder on HASSIO:

Okay… I found it, installed it and the console just works like a charm. I have been looking for something similar for a year. Finally I have full access to the file system on native Hass.io install. Amazing. I owe you a beer.

hue: bridges:

  • host: 192.168.1.56 allow_unreachable: true

I think something changed, too. I tried some time ago and nothing happened even if I put this on configuration.yaml. But now, in the 102 version of HA, it works! When I reboot or update HA, i find all my lights ok! Thanks

Like I mentioned earlier I have to leave the Hue entry completely OUT of configuration.yaml or HA won’t connect to my bridge. What I used to use (and would like to still use)

hue:
  bridges:
    - host: 192.168.1.10
      allow_unreachable: true 

If there’s another way to use allow_unreachable without the entry I’d love to hear it.