2019-01-03 21:02:08 ERROR (MainThread) [homeassistant.components.hue] Error connecting to the Hue bridge at xxx.xxx.xxx.xxx
2019-01-03 21:02:08 ERROR (MainThread) [homeassistant.components.hue] Error connecting to the Hue bridge at xxx.xxx.xxx.xxx. Retrying in 2 seconds
2019-01-03 21:02:09 WARNING (MainThread) [homeassistant.components.sensor] Platform hue not ready yet. Retrying in 30 seconds.
2019-01-03 21:02:31 WARNING (MainThread) [homeassistant.components.sensor.template] Could not render template Gang Wohnzimmer temperature, the state is unknown.
2019-01-03 21:02:31 WARNING (MainThread) [homeassistant.components.sensor.template] Could not render template Gang Wohnzimmer light level, the state is unknown.
2019-01-03 21:02:31 WARNING (MainThread) [homeassistant.components.sensor.template] Could not render template Kinderzimmer temperature, the state is unknown.
2019-01-03 21:02:31 WARNING (MainThread) [homeassistant.components.sensor.template] Could not render template Kinderzimmer light level, the state is unknown.
2019-01-03 21:02:31 WARNING (MainThread) [homeassistant.components.sensor.template] Could not render template Gang Klo temperature, the state is unknown.
2019-01-03 21:02:31 WARNING (MainThread) [homeassistant.components.sensor.template] Could not render template Gang Klo light level, the state is unknown.
But the sensors (e. g. temperature) seems fine!
Edit:
After a second restart all my lights were gone! Only the sensors remained.
After a third restart no errors were displayed in the log and the lights were back. Also the sensors have no issues anymore. So it seems to work now!
First 3 lines indicates that the Hass Hue component has failed to connect to the bridge, so the sensors component has backed off for 30 seconds. This is expected behaviour. I’ll might add the retry tho.
Looks like you have the same network issue @Mariusthvdb has. Do you use Hassio, RPi, and Wi-FI?
2019-01-03 21:35:53 ERROR (MainThread) [homeassistant.components.hue] Error connecting to the Hue bridge at 192.168.1.212
2019-01-03 21:35:54 ERROR (MainThread) [homeassistant.components.hue] Error connecting to the Hue bridge at 192.168.1.212. Retrying in 2 seconds
have disappeared completely following suggestions by @yottatsa testing his new async version of @robmarkcole 's CC for the Hue sensors!
Added to that, there’s no more lag after startup in initializing the sensors, And Lights, and they don’t randomly and frequently show unavailable any more. I have been testing and resetting HA for almost 9 months now, and this must be the biggest leap forward.
I know the HA founder doesn’t want an upped timeout in the Hue components, stating if that’s needed, something else is going on in the setup that needs fixing, not the Hue component. I respect that, but no other solution has been suggested…
this is what I did:
by dl ing the files from the Ha repository, adjusting these timeouts, and loading the files in the custom component folder.
The new component also took care of these messages:
all gone.
Summarizing:
no more hue sensor took longer errors
no more error connecting to the Hue bridge error
no more flapping hue lights
immediate initialization of the lights and sensors
big speedup in startup HA.
not sure yet, but my processor use has gone down significantly also
Just a quick question about breaking this CC to separate sensors for motion, lux and temperature.
I used to have manually configured REST sensors for motion, temperature and lux, but found like others that the motion was unreliable and also sometimes took 3 or 4 seconds to detect motion, by which time i was in the room and sitting down
Since using this CC, response has been excellent, more or less instant. I put this down to the one connection to the bridge as I just template the main component for the other sensors. Would making them separate sensors bring back the issue again?
I’m not a programmer, so I may have got the wrong end of the stick
Ah I get it. Basically the CC will do the templating for us.
Thanks for the component - it has transformed the response of my 4 motion sensors and keeps the wife happy as she doesn’t wave her arms around like an idiot when she walks into the room now
I have a RPi 2, Hass.io and LAN Connection.
The RPi is connected to a Switch in the basment and my hue hub (Second Generation) is connected to a Router in the first floor.
I have the same issues, as some described, that some lights went unavailable for some Time in Home Assistant, and came back later, but they were available in the Hue App all the Time!
I tried this today and I got more errors than ever. For example, I did not have the specific error saying “…took longer than the scheduled update interval 0:00:05…” before adding the custom components, but now the log is full of them.
not quite like that I am afraid, at least not quite yet.
The CC will automatically create the sensors for your sensors, with all the available attributes. But if you want these attributes as separate sensors, and for at least some attributes that is rather likely, you need to template them out .
I hope that we soon will have an option to set a configuration flag to have the CC do that for us, (hope @robmarkcole and @yottatsa read along ) and would like to suggest to be able to set a flag for all the attributes individually.
something like:
sensor:
- platform: hue
create_template:
temperature: true
lx: true
light_level: true
on: true
dark: false
daylight: false
on: true
and then have the component make sensors for these templates out of the main sensor:
sensor.main_motion_sensor should become a binary_sensor.main_motion_sensor
with template sensors:
sensor.main_motion_sensor #(is on or off, which is not the motion sensor sensing motion/clear, but the setting of it being switched on)
sensor.main_motion_sensor_temperature
sensor.main_motion_sensor_lx
sensor.main_motion_sensor_lightlevel
etc
etc
1 step further would be to have an automatic creation for a switch to switch these sensors on/off.
I have these for all my motion sensors and they work perfectly, and use them all the time in my scenes and automations.
Bridges are polled every 1 second or so. However, the Motion sensor itself only updates the light level to the Bridge only either once in a 5 minutes, or when the motion is detected https://youtu.be/i_GywKcwmKQ