Hue integration not working on startup

Hi,

My hue integration seems to sometimes fail at start up and so no lights are loaded. Here is a log of the start up on debug but it isn’t very helpful. This is happening quite often and I have to restart home assistant multiple times to get it up and running. E.g. this morning it finally worked on my third restart.

Bad log:

2019-11-28 07:12:26 INFO (MainThread) [homeassistant.setup] Setting up hue
2019-11-28 07:12:26 INFO (MainThread) [homeassistant.setup] Setup of domain hue took 0.0 seconds.
2019-11-28 07:12:48 ERROR (MainThread) [homeassistant.components.hue] Error connecting to the Hue bridge at 192.168.1.54
2019-11-28 07:12:48 WARNING (MainThread) [homeassistant.config_entries] Config entry for hue not ready yet. Retrying in 5 seconds.
2019-11-28 07:13:45 INFO (MainThread) [homeassistant.components.light] Setting up light.hue
2019-11-28 07:13:45 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.hue
2019-11-28 07:13:45 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.hue
2019-11-28 07:13:45 INFO (MainThread) [homeassistant.components.hue.sensor_base] Starting sensor polling loop with 5.0 second interval
2019-11-28 07:13:49 DEBUG (MainThread) [homeassistant.components.hue.sensor_base] Failed to fetch sensor: 
2019-11-28 07:13:49 ERROR (MainThread) [homeassistant.components.hue.sensor_base] Unable to reach bridge 192.168.1.54 ()
2019-11-28 07:13:49 DEBUG (MainThread) [homeassistant.components.hue.sensor_base] Finished sensor request in 4.408 seconds
2019-11-28 07:13:49 DEBUG (MainThread) [homeassistant.components.hue.light] Failed to fetch light: 
2019-11-28 07:13:49 DEBUG (MainThread) [homeassistant.components.hue.light] Finished light request in 4.357 seconds
2019-11-28 07:13:49 DEBUG (MainThread) [homeassistant.components.hue.light] Failed to fetch group: 
2019-11-28 07:13:49 DEBUG (MainThread) [homeassistant.components.hue.light] Finished group request in 4.359 seconds
2019-11-28 07:14:10 DEBUG (MainThread) [homeassistant.components.hue.sensor_base] Failed to fetch sensor: 
2019-11-28 07:14:10 DEBUG (MainThread) [homeassistant.components.hue.sensor_base] Finished sensor request in 8.143 seconds
2019-11-28 07:14:20 DEBUG (MainThread) [homeassistant.components.hue.sensor_base] Finished sensor request in 0.718 seconds
2019-11-28 07:14:20 INFO (MainThread) [homeassistant.components.hue.sensor_base] Reconnected to bridge 192.168.1.54
2019-11-28 07:14:26 DEBUG (MainThread) [homeassistant.components.hue.sensor_base] Finished sensor request in 0.031 seconds
2019-11-28 07:14:32 DEBUG (MainThread) [homeassistant.components.hue.sensor_base] Finished sensor request in 0.043 seconds

Good log:

2019-11-28 07:19:38 INFO (MainThread) [homeassistant.setup] Setting up hue
2019-11-28 07:19:38 INFO (MainThread) [homeassistant.setup] Setup of domain hue took 0.0 seconds.
2019-11-28 07:19:59 ERROR (MainThread) [homeassistant.components.hue] Error connecting to the Hue bridge at 192.168.1.54
2019-11-28 07:19:59 WARNING (MainThread) [homeassistant.config_entries] Config entry for hue not ready yet. Retrying in 5 seconds.
2019-11-28 07:20:51 INFO (MainThread) [homeassistant.components.light] Setting up light.hue
2019-11-28 07:20:51 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.hue
2019-11-28 07:20:51 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.hue
2019-11-28 07:20:51 INFO (MainThread) [homeassistant.components.hue.sensor_base] Starting sensor polling loop with 5.0 second interval
2019-11-28 07:20:55 DEBUG (MainThread) [homeassistant.components.hue.sensor_base] Finished sensor request in 3.274 seconds
2019-11-28 07:20:56 DEBUG (MainThread) [homeassistant.components.hue.light] Finished group request in 4.699 seconds
2019-11-28 07:20:57 DEBUG (MainThread) [homeassistant.components.hue.light] Finished light request in 5.223 seconds
2019-11-28 07:20:57 DEBUG (MainThread) [homeassistant.components.hue.light] Color gamut of Studio Front Left Down: None
2019-11-28 07:20:57 DEBUG (MainThread) [homeassistant.components.hue.light] Color gamut of Outside Light: GamutType(red=XYPoint(x=0.675, y=0.322), green=XYPoint(x=0.409, y=0.518), blue=XYPoint(x=0.167, y=0.04))
...<repeated for all lights>
2019-11-28 07:21:05 WARNING (MainThread) [homeassistant.components.light] Setup of platform hue is taking over 10 seconds.
2019-11-28 07:21:13 DEBUG (MainThread) [homeassistant.components.hue.sensor_base] Failed to fetch sensor: 
2019-11-28 07:21:13 ERROR (MainThread) [homeassistant.components.hue.sensor_base] Unable to reach bridge 192.168.1.54 ()
2019-11-28 07:21:13 DEBUG (MainThread) [homeassistant.components.hue.sensor_base] Finished sensor request in 6.063 seconds
2019-11-28 07:21:18 DEBUG (MainThread) [homeassistant.components.hue.light] Failed to fetch light: 
2019-11-28 07:21:18 DEBUG (MainThread) [homeassistant.components.hue.light] Finished light request in 4.101 seconds
2019-11-28 07:21:18 DEBUG (MainThread) [homeassistant.components.hue.light] Failed to fetch group: 
2019-11-28 07:21:18 DEBUG (MainThread) [homeassistant.components.hue.light] Finished group request in 4.084 seconds
2019-11-28 07:21:18 WARNING (MainThread) [homeassistant.components.light] Updating hue light took longer than the scheduled update interval 0:00:05
2019-11-28 07:21:20 DEBUG (MainThread) [homeassistant.components.hue.sensor_base] Finished sensor request in 0.141 seconds
2019-11-28 07:21:20 INFO (MainThread) [homeassistant.components.hue.sensor_base] Reconnected to bridge 192.168.1.54
2019-11-28 07:21:24 DEBUG (MainThread) [homeassistant.components.hue.light] Finished light request in 0.077 seconds
2019-11-28 07:21:24 DEBUG (MainThread) [homeassistant.components.hue.light] Finished group request in 0.077 seconds
2019-11-28 07:21:26 DEBUG (MainThread) [homeassistant.components.hue.sensor_base] Finished sensor request in 0.063 seconds
2019-11-28 07:21:30 DEBUG (MainThread) [homeassistant.components.hue.light] Finished light request in 0.085 seconds
2019-11-28 07:21:30 DEBUG (MainThread) [homeassistant.components.hue.light] Finished group request in 0.090 seconds

I’ve had the same issue for a while. I continue to have to reboot 3,4,5 times before it works…

I’m still getting this with 103.0

Is there really only two of us with this problem? It seems so unreliable I can’t believe it’s just us?

Had this issue too for ages. If you want to avoid restarting, just remove the hue integration and add again, on the Integrations page. Even better, get a conbee stick and get rid of the hue hub altogether, it works SO much better.

1 Like

Just saw this thread researching why I’m having the same issues. So there’s certainly more than two of you.