Core: Philips Hue changed to unavailable

Created on 18 Sep 2018  ·  95Comments  ·  Source: home-assistant/core

Home Assistant release with the issue:

Last working Home Assistant release (if known):
unsure.. but upgraded to 0.78 and issue still persists.

Operating environment (Hass.io/Docker/Windows/etc.):

Docker running on Mint.
Component/platform:

Description of problem:
Philips Hue hub becomes unavailable when it is actually online and responsive. Therefore all lights switch to "changed to unavailable". Then switch back to the previous state.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

hue:
  bridges:
    - host: 192.168.0.11
      allow_unreachable: true
      allow_hue_groups: true


tried both to false.. same problem

Traceback (if applicable):


Additional information:
thread on the forum
https://community.home-assistant.io/t/philips-hue-changed-to-unavailable/

errors from the logs
2018-09-18 12:46:01 ERROR (MainThread) [homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11
2018-09-18 12:46:06 INFO (MainThread) [homeassistant.components.light.hue] Reconnected to bridge 192.168.0.11

All custom components were removed, all additions components were removed and it still happened. Sometimes every 5-10 minutes.

hue

Most helpful comment

I've opened a PR to add the logging to the Hue component. You will be able to configure the logger component to show these logs in the next release:

logger:
  logs:
    homeassistant.components.light.hue: debug

All 95 comments

Home Assistant release with the issue: 77.x

Last working Home Assistant release (if known):
Cannot remember for sure, but sometime in the 60's, it's been several months.

Operating environment (Hass.io/Docker/Windows/etc.):
HA in python VENV, ubuntu 16.04

Component/platform:
Hue intergration

Description of problem:
I have 10 hue lights, and every 1-3 hours, some of them change to unavailable. Not always the same lights, changed to unavailable for 1-3 minutes and back on. Does not seem to be tied to any specific automation, script or HA control. Lights will switch to unavailable in the middle of the day when no one is home. I have noticed that usually when one light is unavailble, if I try to use HA to control other HA lights, they change to unavailable as well. This leads me to beleive that it's the hub that's unavailable, and the lights just have not updated thier status. While they are "unavailable" i'm able to control them via Alexa (natively, I don'd expose them with HA to alexa), or the Hue App itself. I saw that if HA thinks the Hub is unavailable it will set lights to unavalable, so I moved the my hub so it is plugged into the router directly, the same place where my HA server is plugged into, just in case it was an issue with switches, etc. It did not make any difference.

I saw that if HA thinks the Hub is unavailable it will set lights to unavailable

It's exactly that that is causing the issue here, hence my link to the https://community.home-assistant.io/t/philips-hue-changed-to-unavailable/65556/19?u=mariusthvdb change in setup.

Though that change might have its use, it seems to cause the unavailability of all light while in fact they are not. ( In my setup, the hub isnt even unavailable, at east not visible in the frontend.) A very unfortunate side-effect, which I hope can be reverted?

schermafbeelding 2018-09-17 om 14 43 43

Adding to that, they are not only marked as unavailable, but the state machine also sees them as unavailable making logic based on timed attributes (last_changed) and state useless/ impossible.

I've also been having the same problem for the last couple of months.

I'm running HA via Docker on an Intel NUC.

I started a fresh Docker container of HA and after adding my Hue bridge have been gradually adding other things to it. It was all fine until I added automations that turned on Hue lights. It then stared showing the Hue lights as unavailable again.

Hoping the problem can be found, and this can be fixed soon.

well, purely coincidental I seem to have stumbled on a 100% related event:

whenever I click on an entity to display a more info card, and see the loading state history, my Hue lights go Unavailable. No exception..(well almost..)

never noticed this before, and kept searching the issue cause in automations and (python)-scripts related to the lights.

of course the lights go Unavailable all the time, also when not clicking this more-info, but the system probably does things internally that are related to this.

info:I have set the history and recorder to record only a few components (in fact because of this Hue issue and trying to prevent as much timing related and processor heavy events from happening).

omt: I noticed the above happening when clicking 2 sensors of the Rest platform. Rest sensors seem to cause more timing issues than other components in my setup. It could therefor also be related this component, which is now subject of further checking here. I specifically made these sensors to replace the CC hue.py which is not supported by HA and we are instructed to unload when issues arise.

Of course I have done that, but apparently regular Rest sensors might be causing the same irregularities.

" It was all fine until I added automations that turned on Hue lights. It then stared showing the Hue lights as unavailable again."

Even with my automations removed 100% it still happens to me.

well. Ive just installed a brand new Hassos version and let discovery add the Hue . No automations yet, nothing else of any significance.
Hue is constantly switching in the backend:

schermafbeelding 2018-09-23 om 12 46 16
schermafbeelding 2018-09-23 om 12 46 31

That can't be right, proof:

schermafbeelding 2018-09-23 om 12 51 06

The lights though shouldn't have to be shown as Unavailable because of this, making the whole integration useless. Which it is, cause we cant reach the lights when Unavailable (while they fact are just fine) and automations become unreliable or impossible.

Hope we hear from the dev's soon and be able to debug this further, and solve..

Mine are now showing as unavailable again, even with all Hue related automations removed.

I'm giving up on (trying to use) Hue lights in Home Assistant for now. I'll just use HomeKit apps/automations until this is fixed.

Added a suggestion for a possible mitigation in the forum thread mentioned above, if anyone wants to try it out.

I've been unable to repro this issue.

I suggest someone that has this issue to start adding some timestamps to see if it's really waiting 4 seconds.

https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/light/hue.py#L167

Change this to:

    from datetime import datetime
    try:
        start = datetime.now()
        _LOGGER.info("Updating start: %s (is_group: %s)", start.isoformat(), is_group)
        with async_timeout.timeout(4):
            await api.update()
        _LOGGER.info("Updating done in %s (is_group: %s)", start-datetime.now(), is_group)
    except (asyncio.TimeoutError, aiohue.AiohueException):
        _LOGGER.exception("failed to update in time")

This will start logging some timestamps.

where would I change that on a docker install please?

Create file in config custom_components/light/hue.py and copy the contents of the light/hue.py file of your release. Note that you will have to remove these files when your'e done testing to avoid having your platform go out of sync with rest of Hue component.

Is there any way a Hassio install can do this too, in an effort to assist? Or Hassos for that matter?

I made the changes and the hue wouldn't start. Can someone provide the full code please? I am on the latest version of HA

I've opened a PR to add the logging to the Hue component. You will be able to configure the logger component to show these logs in the next release:

logger:
  logs:
    homeassistant.components.light.hue: debug

This logic is now live in the beta and will be part of 0.80.

thanks, and no idea what I should be expecting, but this is 1 minute of the log, now on HA 0.80.0b0:

2018-10-08 14:45:01 DEBUG (MainThread) [homeassistant.components.light.hue] Finished group request in 0.029 seconds
2018-10-08 14:45:01 DEBUG (MainThread) [homeassistant.components.light.hue] Finished light request in 0.048 seconds
2018-10-08 14:45:07 DEBUG (MainThread) [homeassistant.components.light.hue] Finished light request in 0.163 seconds
2018-10-08 14:45:07 DEBUG (MainThread) [homeassistant.components.light.hue] Finished group request in 0.181 seconds
2018-10-08 14:45:13 DEBUG (MainThread) [homeassistant.components.light.hue] Finished group request in 0.054 seconds
2018-10-08 14:45:13 DEBUG (MainThread) [homeassistant.components.light.hue] Finished light request in 0.071 seconds
2018-10-08 14:45:19 DEBUG (MainThread) [homeassistant.components.light.hue] Finished group request in 0.243 seconds
2018-10-08 14:45:19 DEBUG (MainThread) [homeassistant.components.light.hue] Finished light request in 0.251 seconds
2018-10-08 14:45:25 DEBUG (MainThread) [homeassistant.components.light.hue] Finished group request in 0.198 seconds
2018-10-08 14:45:25 DEBUG (MainThread) [homeassistant.components.light.hue] Finished light request in 0.237 seconds
2018-10-08 14:45:31 DEBUG (MainThread) [homeassistant.components.light.hue] Finished group request in 0.314 seconds
2018-10-08 14:45:31 DEBUG (MainThread) [homeassistant.components.light.hue] Finished light request in 0.331 seconds
2018-10-08 14:45:36 DEBUG (MainThread) [homeassistant.components.light.hue] Finished light request in 0.202 seconds
2018-10-08 14:45:36 DEBUG (MainThread) [homeassistant.components.light.hue] Finished group request in 0.215 seconds
2018-10-08 14:45:42 DEBUG (MainThread) [homeassistant.components.light.hue] Finished light request in 0.056 seconds
2018-10-08 14:45:42 DEBUG (MainThread) [homeassistant.components.light.hue] Finished group request in 0.088 seconds
2018-10-08 14:45:48 DEBUG (MainThread) [homeassistant.components.light.hue] Finished light request in 0.031 seconds
2018-10-08 14:45:48 DEBUG (MainThread) [homeassistant.components.light.hue] Finished group request in 0.097 seconds
2018-10-08 14:45:54 DEBUG (MainThread) [homeassistant.components.light.hue] Finished group request in 0.177 seconds
2018-10-08 14:45:54 DEBUG (MainThread) [homeassistant.components.light.hue] Finished light request in 0.183 seconds
2018-10-08 14:46:00 DEBUG (MainThread) [homeassistant.components.light.hue] Finished group request in 0.224 seconds
2018-10-08 14:46:00 DEBUG (MainThread) [homeassistant.components.light.hue] Finished light request in 0.244 seconds

this goes on forever, with several longer values in between:

2018-10-08 15:29:12 DEBUG (MainThread) [homeassistant.components.light.hue] Finished group request in 3.921 seconds
2018-10-08 15:29:12 DEBUG (MainThread) [homeassistant.components.light.hue] Finished light request in 3.931 seconds

fyi, ive disabled all automations that listen to the lights, and no custom component hue.py is active.
hope this helps, please let us know if we can anything else to give you more info.

since homeassistant.log is different from what i see in the dev-info panel, this might be relevant too, just as frequent, though I have no clue if this is truly related:

Unable to remove unknown listener <function async_track_point_in_utc_time.<locals>.point_in_time_listener at 0x6ddd2d20>
3:37 PM core.py (WARNING)
Unable to remove unknown listener <function async_track_point_in_utc_time.<locals>.point_in_time_listener at 0x6ddabe88>
3:37 PM core.py (WARNING)
Unable to remove unknown listener <function async_track_point_in_utc_time.<locals>.point_in_time_listener at 0x6d73a7c8>
3:37 PM core.py (WARNING)
Unable to remove unknown listener <function async_track_point_in_utc_time.<locals>.point_in_time_listener at 0x6e33a030>
3:37 PM core.py (WARNING)
Unable to remove unknown listener <function async_track_point_in_utc_time.<locals>.point_in_time_listener at 0x6e2f42b8>
3:37 PM core.py (WARNING)
Unable to remove unknown listener <function async_track_point_in_utc_time.<locals>.point_in_time_listener at 0x6ddd28a0>
3:36 PM core.py (WARNING)
Unable to remove unknown listener <function async_track_point_in_utc_time.<locals>.point_in_time_listener at 0x6d714108>
3:36 PM core.py (WARNING)
Unable to remove unknown listener <function async_track_point_in_utc_time.<locals>.point_in_time_listener at 0x6d955b70>
3:36 PM core.py (WARNING)

Yeah, these are the response times that I expect. As you can see, it never takes more than 0.5 seconds to finish a request. It goes to unavailable if it takes over 4 seconds.

Ok thanks, give it some time ;-)
Almost got that already , but, indeed no Unavailable seen yet.

bingo:

2018-10-08 17:26:08 DEBUG (MainThread) [homeassistant.components.light.hue] Failed to fetch group: 
2018-10-08 17:26:08 ERROR (MainThread) [homeassistant.components.light.hue] Unable to reach bridge 192.168.1.212 ()
2018-10-08 17:26:08 DEBUG (MainThread) [homeassistant.components.light.hue] Finished group request in 4.674 seconds
2018-10-08 17:26:08 DEBUG (MainThread) [homeassistant.components.light.hue] Failed to fetch light: 
2018-10-08 17:26:08 DEBUG (MainThread) [homeassistant.components.light.hue] Finished light request in 4.676 seconds
2018-10-08 18:38:07 DEBUG (MainThread) [homeassistant.components.light.hue] Failed to fetch light: 
2018-10-08 18:38:07 ERROR (MainThread) [homeassistant.components.light.hue] Unable to reach bridge 192.168.1.212 ()
2018-10-08 18:38:07 DEBUG (MainThread) [homeassistant.components.light.hue] Finished light request in 4.388 seconds
2018-10-08 18:38:07 DEBUG (MainThread) [homeassistant.components.light.hue] Failed to fetch group: 
2018-10-08 18:38:07 DEBUG (MainThread) [homeassistant.components.light.hue] Finished group request in 4.409 seconds
2018-10-08 18:38:11 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting
2018-10-08 18:38:15 DEBUG (MainThread) [homeassistant.components.light.hue] Finished group request in 0.148 seconds
2018-10-08 18:38:15 INFO (MainThread) [homeassistant.components.light.hue] Reconnected to bridge 192.168.1.212
018-10-08 19:14:58 DEBUG (MainThread) [homeassistant.components.light.hue] Failed to fetch group: 
2018-10-08 19:14:58 ERROR (MainThread) [homeassistant.components.light.hue] Unable to reach bridge 192.168.1.212 ()
2018-10-08 19:14:58 DEBUG (MainThread) [homeassistant.components.light.hue] Finished group request in 4.252 seconds
2018-10-08 19:14:58 DEBUG (MainThread) [homeassistant.components.light.hue] Failed to fetch light: 
2018-10-08 19:14:58 DEBUG (MainThread) [homeassistant.components.light.hue] Finished light request in 4.254 seconds
2018-10-08 19:15:07 DEBUG (MainThread) [homeassistant.components.light.hue] Finished group request in 1.924 seconds
2018-10-08 19:15:07 INFO (MainThread) [homeassistant.components.light.hue] Reconnected to bridge 192.168.1.212

2018-10-08 19:25:29 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting
2018-10-08 19:25:32 DEBUG (MainThread) [homeassistant.components.light.hue] Failed to fetch group: 
2018-10-08 19:25:32 ERROR (MainThread) [homeassistant.components.light.hue] Unable to reach bridge 192.168.1.212 ()
2018-10-08 19:25:32 DEBUG (MainThread) [homeassistant.components.light.hue] Finished group request in 4.812 seconds
2018-10-08 19:25:32 DEBUG (MainThread) [homeassistant.components.light.hue] Failed to fetch light: 
2018-10-08 19:25:32 DEBUG (MainThread) [homeassistant.components.light.hue] Finished light request in 4.813 seconds
2018-10-08 19:25:36 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting
2018-10-08 19:25:46 DEBUG (MainThread) [homeassistant.components.light.hue] Failed to fetch group: 
2018-10-08 19:25:46 DEBUG (MainThread) [homeassistant.components.light.hue] Finished group request in 4.395 seconds
2018-10-08 19:25:46 DEBUG (MainThread) [homeassistant.components.light.hue] Failed to fetch light: 
2018-10-08 19:25:46 DEBUG (MainThread) [homeassistant.components.light.hue] Finished light request in 4.470 seconds
2018-10-08 19:25:50 DEBUG (MainThread) [homeassistant.components.light.hue] Finished group request in 0.265 seconds
2018-10-08 19:25:50 INFO (MainThread) [homeassistant.components.light.hue] Reconnected to bridge 192.168.1.212

summarized last 2 hours:

2018-10-08 17:26:08 DEBUG (MainThread) [homeassistant.components.light.hue] Failed to fetch group: 
2018-10-08 17:26:08 DEBUG (MainThread) [homeassistant.components.light.hue] Failed to fetch light: 
2018-10-08 17:59:31 DEBUG (MainThread) [homeassistant.components.light.hue] Failed to fetch light: 
2018-10-08 17:59:31 DEBUG (MainThread) [homeassistant.components.light.hue] Failed to fetch group: 
2018-10-08 18:00:33 DEBUG (MainThread) [homeassistant.components.light.hue] Failed to fetch light: 
2018-10-08 18:00:34 DEBUG (MainThread) [homeassistant.components.light.hue] Failed to fetch group: 
2018-10-08 18:01:05 DEBUG (MainThread) [homeassistant.components.light.hue] Failed to fetch light: 
2018-10-08 18:01:05 DEBUG (MainThread) [homeassistant.components.light.hue] Failed to fetch group: 
2018-10-08 18:38:07 DEBUG (MainThread) [homeassistant.components.light.hue] Failed to fetch light: 
2018-10-08 18:38:07 DEBUG (MainThread) [homeassistant.components.light.hue] Failed to fetch group: 
2018-10-08 19:14:58 DEBUG (MainThread) [homeassistant.components.light.hue] Failed to fetch group: 
2018-10-08 19:14:58 DEBUG (MainThread) [homeassistant.components.light.hue] Failed to fetch light: 
2018-10-08 19:25:32 DEBUG (MainThread) [homeassistant.components.light.hue] Failed to fetch group: 
2018-10-08 19:25:32 DEBUG (MainThread) [homeassistant.components.light.hue] Failed to fetch light: 
2018-10-08 19:25:46 DEBUG (MainThread) [homeassistant.components.light.hue] Failed to fetch group: 
2018-10-08 19:25:46 DEBUG (MainThread) [homeassistant.components.light.hue] Failed to fetch light:

would this suffice for now?
seems if it would be 5 seconds, none of these errors would be happening

2018-10-08 22:23:46 DEBUG (MainThread) [homeassistant.components.light.hue] Failed to fetch group: 
2018-10-08 22:23:46 ERROR (MainThread) [homeassistant.components.light.hue] Unable to reach bridge 192.168.1.212 ()
2018-10-08 22:23:46 DEBUG (MainThread) [homeassistant.components.light.hue] Finished group request in 5.611 seconds
2018-10-08 22:23:46 DEBUG (MainThread) [homeassistant.components.light.hue] Failed to fetch light: 
2018-10-08 22:23:46 DEBUG (MainThread) [homeassistant.components.light.hue] Finished light request in 5.649 seconds...

I have a second HA instance running using the same Hue hub, and can positively say this Hub is available, as are the lights, even when the other HA instance says its not
It could be this HA is occupied doing something else, getting out of its out of sync issue. But that shouldn't throw the lights to show Unavailable though, they simply aren't...

Of course we need to find out why this is happening, but how? Will the debugging if this component ever give other output than above? btw I've also set homeassistant.components.hue on debug level.

my second system has been quiet and lights have shown available for the last 5 hours, since is last restart. Had to edit a file just now, and needed to load that from the HAserver, et voila, the lights turned unavailable on that instance...

somehow this Hue component's implementation is very sensitive, and I can't stop wondering what the difference between this and the Tradfri component is. The latter hasn't ever displayed as unavailable, no matter what. And lights are always switchable. No matter the timing got out of sync or these Hue errors. I run them side by side in an overall control panel, and can see perfectly when the hue lights go unavailable and come back lateran, while the Tradri lights nicely stayed put and in their correct state.

Tradfri has a complete different implementation. It pushes changes to us instead of us having to fetch it every 5 seconds.

Timer out of sync is a big red flag that something on your system is doing I/O and holding up the event loop. Are you running any custom components?

On dev-info page, you can find a list of all loaded integrations, could you copy paste that ?

You can also DM it to me on Discord if you feel uncomfortable putting it in public.

On dev-info page, you can find a list of all loaded integrations, could you copy paste that ?

you mean this?:

schermafbeelding 2018-10-08 om 22 54 22

sure, please let me know how to dm you on Discord.

Tradfri has a complete different implementation. It pushes changes to us instead of us having to fetch it every 5 seconds.

Are you saying we should hop over to Philips hue team and ask them to enable their system to push changes? Worth a shot, seems an active lot.
Their App is very very responsive, and never fails. Does that work according to the same principle? If the system pushes to the App, it might as well push to HA too ;-)

Yeah that page. To DM me on Discord, find me in the HA chat, click on my name… 😉

Ok thanks, DM sent, hope this helps.

Yeah that page. To DM me on Discord, find me in the HA chat, click on my name… 😉

I am getting this even more consistently after the upgrade to 0.81.2. Anything I can do to help dubug?

+1 so bad in my 081.2 setup now the lights most of the time wont even show up. Horrible lag in the system. If they show up, they only do so for a very short time, more than a few minutes hasn't happened... and this is the end result:

lights:
schermafbeelding 2018-11-02 om 09 48 05

groups:
schermafbeelding 2018-11-02 om 09 45 30

lights have been gone for more than an hour... only restart will give it another chance.

No other errors than before to report though, (besides:

2018-11-02 00:09:12 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /discovery request
2018-11-02 00:09:12 ERROR (MainThread) [homeassistant.components.hassio.discovery] Can't read discover info: 

)
but that was already there before: https://github.com/home-assistant/home-assistant/issues/17266

even stripped down the full instance to be as stand alone as possible. Integration doesn’t feel platinum at all, even if the error is caused by something else in the setup and Hue not connecting is only the messenger....

One thing to notice and maybe a clue : it’s much worse on the new Hassos / Rpi3b+ set, which is a much slower setup to begin with, than (on) the Hassio/Rpi3b.

only true thing that gives the setup some air, and keeps the Hue system on for a longer time is to disable the built-in Mosquitto broker. Which is a pain of course, since half of my system relies on that.

Still even that doesn't prevent the error messages in the setup

2018-11-02 10:00:33 ERROR (MainThread) [homeassistant.components.hue] Error connecting to the Hue bridge at 192.168.1.212
2018-11-02 10:00:33 ERROR (MainThread) [homeassistant.components.hue] Error connecting to the Hue bridge at 192.168.1.212. Retrying in 16 seconds

What is your CPU usage?

main Rpi3b+:

schermafbeelding 2018-11-02 om 13 55 58

schermafbeelding 2018-11-02 om 13 56 12

can now positively report that killing the mqtt on my Pi enables the Hue lights almost without hiccups. Ive moved the Mqtt broker to a second en brand new install on another Pi, have the main setup read that Mqtt stream, and immediately the lights are gone again on the second (Mqtt) Rpi3b:

schermafbeelding 2018-11-02 om 13 59 21

without Mqtt:

schermafbeelding 2018-11-02 om 14 09 35

so Mqtt on he same instance or on a dedicated instance doesnt make a lot of difference. must we conclude it is not as much the broker, but the instance subscribing to the mqtt events?

What MQTT broker and how is it installed?

mosquitto add-on

{
"plain": true,
"plain_websockets": true,
"ssl": true,
"ssl_websockets": true,
"anonymous": false,
"logins": [
{
"username": "username",
"password": "password"
}
],
"customize": {
"active": false,
"folder": "mosquitto"
},
"certfile": "fullchain.pem",
"keyfile": "privkey.pem"
}

tested if web sockets settings true/false make any difference (not explained in the docs) but no difference so it seems

do you have a lot of traffic on MQTT?

well, I guess, it is a constant stream of my energy meters and attached switches.

Are you using MQTT state stream ?

no, this is the mqtt setting:

broker: !secret mqtt_base_url
port: 1883
username: !secret mqtt_username
password: !secret mqtt_password

and of mqtt_base_url is pointing to the dedicated Hassio instance with the mosquitto broker.

updated to 0.81.4, but no relieve:

2018-11-03 18:54:53 ERROR (MainThread) [homeassistant.components.hue] Error connecting to the Hue bridge at 192.168.1.212
2018-11-03 18:54:53 ERROR (MainThread) [homeassistant.components.hue] Error connecting to the Hue bridge at 192.168.1.212. Retrying in 4 seconds
2018-11-03 18:55:16 ERROR (MainThread) [homeassistant.components.hue] Error connecting to the Hue bridge at 192.168.1.212
2018-11-03 18:55:16 ERROR (MainThread) [homeassistant.components.hue] Error connecting to the Hue bridge at 192.168.1.212. Retrying in 8 seconds
2018-11-03 18:55:23 INFO (MainThread) [homeassistant.setup] Setting up apple_tv
2018-11-03 18:55:23 INFO (MainThread) [homeassistant.setup] Setup of domain apple_tv took 0.0 seconds.
2018-11-03 18:55:44 ERROR (MainThread) [homeassistant.components.hue] Error connecting to the Hue bridge at 192.168.1.212
2018-11-03 18:55:44 ERROR (MainThread) [homeassistant.components.hue] Error connecting to the Hue bridge at 192.168.1.212. Retrying in 16 seconds
2018-11-03 18:55:53 INFO (MainThread) [homeassistant.setup] Setting up remote
2018-11-03 18:55:53 INFO (MainThread) [homeassistant.setup] Setup of domain remote took 0.0 seconds.
2018-11-03 18:56:38 ERROR (MainThread) [homeassistant.components.hue] Error connecting to the Hue bridge at 192.168.1.212
2018-11-03 18:56:38 ERROR (MainThread) [homeassistant.components.hue] Error connecting to the Hue bridge at 192.168.1.212. Retrying in 32 seconds
2018-11-03 18:57:28 ERROR (MainThread) [homeassistant.components.hue] Error connecting to the Hue bridge at 192.168.1.212
2018-11-03 18:57:28 ERROR (MainThread) [homeassistant.components.hue] Error connecting to the Hue bridge at 192.168.1.212. Retrying in 64 seconds
2018-11-03 18:58:53 ERROR (MainThread) [homeassistant.components.hue] Error connecting to the Hue bridge at 192.168.1.212
2018-11-03 18:58:53 ERROR (MainThread) [homeassistant.components.hue] Error connecting to the Hue bridge at 192.168.1.212. Retrying in 128 seconds
2018-11-03 19:01:10 ERROR (MainThread) [homeassistant.components.hue] Error connecting to the Hue bridge at 192.168.1.212
2018-11-03 19:01:10 ERROR (MainThread) [homeassistant.components.hue] Error connecting to the Hue bridge at 192.168.1.212. Retrying in 256 seconds
2018-11-03 19:05:37 ERROR (MainThread) [homeassistant.components.hue] Error connecting to the Hue bridge at 192.168.1.212
2018-11-03 19:05:37 ERROR (MainThread) [homeassistant.components.hue] Error connecting to the Hue bridge at 192.168.1.212. Retrying in 512 seconds

only thing that stops this, is stop subscribing to the mqtt brokers events. Which is not an option....
As stated above, moving the broker to a dedicated Pi and subscribe to that doesn't help.

This behavior has really deteriorated since 0.81.1 so please have a look what was changed that could cause this. Standalone the Hue works fine, but it is seriously hampered by other integrations, of which I now have at least identified one. Which is great, cause it points in a direction for a solution I hope.

What do you mean with "mqtt brokers events" ?

Can you enable the Hue debug logging for more info.

sorry for the delay, but I have been busy trying to rebuild and carefully document. Ready for some reporting back now.

about the brokers events: What I meant was that I have the Mosquitto addon installed, and disabling that made all lights available, practically without issues. So I searched in that direction.
Meanwhile I am on 0.81.6, (also have Mqtt configured via integration now, on both systems, still version 2) and have rebuilt the 2 systems from scratch, with remarkable results. It seems that the mqtt binary_sensors of this format:

- platform: mqtt
  name: 'Netwerk Auditorium state bin'
  state_topic: 'redacted_mac_address/powerswitch-zwave/id/state'
  payload_on: 'on'
  payload_off: 'off'
  qos: 0
  device_class: plug

caused the issues of the Hue lights being unavailable at random and frequent times. I've completely taken these out (some 20 of them) and this has made my main system (without the broker, subscribing to mqtt events from the hub system) show the Hue lights permanently (1 condition excluded) and the Hub system, on which the broker resides (and which has Bluetooth enabled), show the lights better than before, albeit not as permanent as the main system yet.

The 1 condition I refer to which still causes Hue lights to show unavailable, is a front-end issue.

2018-11-12 22:56:32 ERROR (MainThread) [frontend.js.latest.201810264] :0:0 Script error.

Whenever a customization fails, eg not being able to read a state while the customization needs that state, the system errors out with the frontend error and system log write/service called. This causes the lights to become unavailable, or, worse, at startup not to show at all.

I've set debug, but this doesn't give much more info than before: lights being unavailable if it takes longer than 4 seconds:

2018-11-13 10:48:41 DEBUG (MainThread) [homeassistant.components.light.hue] Finished group request in 2.914 seconds
2018-11-13 10:48:41 DEBUG (MainThread) [homeassistant.components.light.hue] Finished light request in 2.987 seconds
2018-11-13 10:49:28 DEBUG (MainThread) [homeassistant.components.light.hue] Failed to fetch light: 
2018-11-13 10:49:28 ERROR (MainThread) [homeassistant.components.light.hue] Unable to reach bridge 192.168.1.212 ()
2018-11-13 10:49:28 DEBUG (MainThread) [homeassistant.components.light.hue] Finished light request in 12.661 seconds
2018-11-13 10:49:28 DEBUG (MainThread) [homeassistant.components.light.hue] Failed to fetch group: 
2018-11-13 10:49:28 DEBUG (MainThread) [homeassistant.components.light.hue] Finished group request in 12.666 seconds
2018-11-13 10:50:11 ERROR (MainThread) [frontend.js.latest.201810264] :0:0 Script error.
2018-11-13 10:50:42 DEBUG (MainThread) [homeassistant.components.light.hue] Failed to fetch light: 
2018-11-13 10:50:42 DEBUG (MainThread) [homeassistant.components.light.hue] Finished light request in 8.762 seconds
2018-11-13 10:50:42 DEBUG (MainThread) [homeassistant.components.light.hue] Failed to fetch group: 
2018-11-13 10:50:42 DEBUG (MainThread) [homeassistant.components.light.hue] Finished group request in 8.763 seconds
2018-11-13 10:51:25 DEBUG (MainThread) [homeassistant.components.light.hue] Failed to fetch group: 
2018-11-13 10:51:25 DEBUG (MainThread) [homeassistant.components.light.hue] Finished group request in 7.414 seconds
2018-11-13 10:51:25 DEBUG (MainThread) [homeassistant.components.light.hue] Failed to fetch light: 
2018-11-13 10:51:25 DEBUG (MainThread) [homeassistant.components.light.hue] Finished light request in 7.416 seconds
2018-11-13 10:51:35 ERROR (MainThread) [frontend.js.latest.201810264] :0:0 Script error.
2018-11-13 10:51:58 ERROR (MainThread) [homeassistant.components.camera.generic] Timeout getting camera image
2018-11-13 10:51:58 ERROR (MainThread) [homeassistant.components.camera.generic] Timeout getting camera image
2018-11-13 10:52:14 DEBUG (MainThread) [homeassistant.components.light.hue] Failed to fetch light: 
2018-11-13 10:52:14 DEBUG (MainThread) [homeassistant.components.light.hue] Finished light request in 11.763 seconds
2018-11-13 10:52:14 DEBUG (MainThread) [homeassistant.components.light.hue] Failed to fetch group: 
2018-11-13 10:52:14 DEBUG (MainThread) [homeassistant.components.light.hue] Finished group request in 11.793 seconds
2018-11-13 10:52:53 DEBUG (MainThread) [homeassistant.components.light.hue] Failed to fetch group: 
2018-11-13 10:52:53 DEBUG (MainThread) [homeassistant.components.light.hue] Finished group request in 5.371 seconds
2018-11-13 10:52:53 DEBUG (MainThread) [homeassistant.components.light.hue] Failed to fetch light: 
2018-11-13 10:52:53 DEBUG (MainThread) [homeassistant.components.light.hue] Finished light request in 5.367 seconds
2018-11-13 10:52:57 ERROR (MainThread) [frontend.js.latest.201810264] :0:0 Script error.
2018-11-13 10:53:23 DEBUG (MainThread) [homeassistant.components.light.hue] Failed to fetch light: 
2018-11-13 10:53:23 DEBUG (MainThread) [homeassistant.components.light.hue] Finished light request in 7.180 seconds
2018-11-13 10:53:23 DEBUG (MainThread) [homeassistant.components.light.hue] Failed to fetch group: 
2018-11-13 10:53:23 DEBUG (MainThread) [homeassistant.components.light.hue] Finished group request in 7.190 seconds

1 Hue related error always remains in the startup log:

2018-11-09 10:55:06 ERROR (MainThread) [homeassistant.components.hue] Error connecting to the Hue bridge at 192.168.1.212
2018-11-09 10:55:06 ERROR (MainThread) [homeassistant.components.hue] Error connecting to the Hue bridge at 192.168.1.212. Retrying in 2 seconds

No matter how dismantled the system is, this always happens on startup without exception.

I'm struggling with this too. I have enabled debugging in configuration.yaml, but don't see any messages in the System Log under Hassio's system tab. Is this where I would expect to see them?

I'm on Hassio version 0.81.1.

you need to enable logger: in configuration.yaml, and add this

logs:
  homeassistant.components.light.hue: debug

see:https://www.home-assistant.io/components/logger/

restart, and then check home-assistant.log for entries about hue like:

2018-11-13 14:53:55 DEBUG (MainThread) [homeassistant.components.light.hue] Finished group request in 0.237 seconds

Ah, rookie mistake. I had:

logger:
  default: error
  logs:
    homeassistant.components.light.hue: debug

Thinking that I would get errors by default and debug for Hue, but I guess it doesn't work that way (surely it should?). Once I removed the default and restarted, I started seeing the logs.

I finally got the logging turned on for the hue lights. I am running 81.6. I am not running MQTT, just straight up HA on Ubuntu in a VENV. I'm not seeing anything specific, other than hue is updating every 6 seconds. Not sure if that's supposed to happen that often. Anyway, Last night 2:31-2:33am, several lights went unavailable. No automations running at that time. Here is the log, but again, looks pretty uneventful.

2018-11-15 02:31:58 DEBUG (MainThread) [homeassistant.components.light.hue] Finished light request in 0.052 seconds
2018-11-15 02:32:04 DEBUG (MainThread) [homeassistant.components.light.hue] Finished light request in 0.022 seconds
2018-11-15 02:32:04 DEBUG (MainThread) [homeassistant.components.light.hue] Finished group request in 0.037 seconds
2018-11-15 02:32:10 DEBUG (MainThread) [homeassistant.components.light.hue] Finished group request in 0.023 seconds
2018-11-15 02:32:10 DEBUG (MainThread) [homeassistant.components.light.hue] Finished light request in 0.042 seconds
2018-11-15 02:32:16 DEBUG (MainThread) [homeassistant.components.light.hue] Finished group request in 0.017 seconds
2018-11-15 02:32:16 DEBUG (MainThread) [homeassistant.components.light.hue] Finished light request in 0.052 seconds
2018-11-15 02:32:22 DEBUG (MainThread) [homeassistant.components.light.hue] Finished group request in 0.018 seconds
2018-11-15 02:32:22 DEBUG (MainThread) [homeassistant.components.light.hue] Finished light request in 0.055 seconds
2018-11-15 02:32:28 DEBUG (MainThread) [homeassistant.components.light.hue] Finished light request in 0.036 seconds
2018-11-15 02:32:28 DEBUG (MainThread) [homeassistant.components.light.hue] Finished group request in 0.051 seconds
2018-11-15 02:32:34 DEBUG (MainThread) [homeassistant.components.light.hue] Finished group request in 0.031 seconds
2018-11-15 02:32:34 DEBUG (MainThread) [homeassistant.components.light.hue] Finished light request in 0.052 seconds
2018-11-15 02:32:40 DEBUG (MainThread) [homeassistant.components.light.hue] Finished group request in 0.018 seconds
2018-11-15 02:32:40 DEBUG (MainThread) [homeassistant.components.light.hue] Finished light request in 0.053 seconds
2018-11-15 02:32:46 DEBUG (MainThread) [homeassistant.components.light.hue] Finished group request in 0.017 seconds
2018-11-15 02:32:46 DEBUG (MainThread) [homeassistant.components.light.hue] Finished light request in 0.038 seconds
2018-11-15 02:32:52 DEBUG (MainThread) [homeassistant.components.light.hue] Finished light request in 0.025 seconds
2018-11-15 02:32:52 DEBUG (MainThread) [homeassistant.components.light.hue] Finished group request in 0.052 seconds
2018-11-15 02:32:58 DEBUG (MainThread) [homeassistant.components.light.hue] Finished light request in 0.039 seconds
2018-11-15 02:32:58 DEBUG (MainThread) [homeassistant.components.light.hue] Finished group request in 0.054 seconds
2018-11-15 02:33:04 DEBUG (MainThread) [homeassistant.components.light.hue] Finished light request in 0.036 seconds
2018-11-15 02:33:04 DEBUG (MainThread) [homeassistant.components.light.hue] Finished group request in 0.051 seconds
2018-11-15 02:33:10 DEBUG (MainThread) [homeassistant.components.light.hue] Finished light request in 0.036 seconds
2018-11-15 02:33:10 DEBUG (MainThread) [homeassistant.components.light.hue] Finished group request in 0.051 seconds
2018-11-15 02:33:16 DEBUG (MainThread) [homeassistant.components.light.hue] Finished light request in 0.040 seconds
2018-11-15 02:33:16 DEBUG (MainThread) [homeassistant.components.light.hue] Finished group request in 0.053 seconds
2018-11-15 02:33:22 DEBUG (MainThread) [homeassistant.components.light.hue] Finished light request in 0.037 seconds
2018-11-15 02:33:22 DEBUG (MainThread) [homeassistant.components.light.hue] Finished group request in 0.052 seconds
2018-11-15 02:33:28 DEBUG (MainThread) [homeassistant.components.light.hue] Finished light request in 0.022 seconds
2018-11-15 02:33:28 DEBUG (MainThread) [homeassistant.components.light.hue] Finished group request in 0.035 seconds

So I'm getting the same sort of thing with logging - no errors and they all finish within 4 seconds, but still the lights are going unavailable. It tends to happen in clusters - all good for a few hours, then available/unavailable every couple minutes for about 5 minutes. Nothing unusual happening at the same time. Any suggestions on where to go from here?

Anything happening on your system (outside HASS) during those 5 minutes? Maybe a backup service? Docker update?

No, I log everything and nothing significant is happening. I moved the Hue hub to see if it was a problem with interference, but no obvious change. There are a number of people with the same issue, so there must be some commonality.

I have a v1 bridge (the round one) and no other zigbee hubs/devices. I have Lifx lights and tp-link switches with no similar problems. I have various other devices (Apple TV, Harmony Hub, etc) and have not had similar problems. I do have connectivity drop-out issues with two old smart switches since moving to mesh wifi, but the Hue problems pre-dated this.

I just installed Hass.io today and I have the same problem. Here are the steps to reproduce my Hue problem.

  1. Open Hue android app.
  2. All lights show available.
  3. Open hassio.local in a tab on a different device
  4. Wait
  5. Hue android app shows more and more lights becoming unavailable.

All my lights are connected through the Philips Hue hub. Could aggressive polling by Hass.io be the cause?

Ok, next step:

further testing shows that also binary_sensor ping causes instability in the Hue platform. Had already rebuilt one system and left these sensors (for my 6 household phones) out with remarkable results. No more Unavailable for the lights.

My secondary system, which holds the mosquitto broker, and was broken down to a minimal setup with mostly sensors and devices, still had frequent Unavailable Hue lights. It also still had the binary_sensors ping.
Although I don't want to miss these, I've taken them out now on the second system too. Havent seen an incorrect Unavailable yet since...

Must conclude that binary_sensors cause Hue lights (and groups) to go Unavailable intermittently. How can this be amended, so we can use the binary_sensors without issue?

second:
sometimes a light shows unavailable , when the Hue group the light belongs to shows nicely.
The group can be switched, which in fact does turn the light on, and makes it available again, showing in all its glory.

Hope this helps in further analyzing the issues at hand.

I don't have any binary_sensor Pings, but I do have quite a few binary sensors, many are templates, some are cameras motion/line crossing, etc.

For people reporting problems, can you please report how many lights you have connected to your bridge?

I might have found the issue with Home Assistant not runnnig the updates in parallel. Would love some testing, add PARALLEL_UPDATES = 0 to your light/hue.py file and see if that resolves it. It's not it, it's already defaulting to 0.

@balloob I have 19 lights connected to the Hue hub.

I'm running HA via Docker, where/how do I access light/hue.py?

14 for me and I'm also in a docker..

I have 6 lights and also 3 motion sensors on my hue hub, which might be increasing the load as I'm using rest sensors to poll the state. (PR #15121 for native sensor support died out a while ago)

Running via hassio on a rasp3

Sounds like this might not be the issue after all, but I have 5 light strips, 5 color bulbs, and 2 white bulbs. I also have 2 dimmer control switches.

17 lights of various types (lights strips, white, white ambiance, white&color ambiance, hue-go)
2 dimmer switches, 1 switch, 8 motion sensors
1 hub.
2 Hassio instances on a Pi3b and Pi3b+

Also having this problem, 0.83.2, docker on Ubuntu. Two bulbs, one motion sensor, one led strip. Static IP on the Hue hub, still log filling up with lines of hue unavailable.

Same thing - static IP on the hue, 0.84.3 hassio on RPi

Same thing - only one hue light, 0.84.3 hassio on RPi. Dynamic IP over DHCP. Connection state including IP has not changed since 48 days.

So I recently upgraded my RPI3 to Hassio 0.84.5 and noticed a few glitches with my hue lights. When I've checked I am also impacted by this. I was confident it was only since the 0.84.5 upgrade, however looking back through device history I now see I've been affected for some time without knowing about it. Removed MQTT and ping binary sensors but still suffering the issue.

Same issue with pi3b+, new install hassio os 0.84.5, 3 light strips, 8 colour bulbs. Noticed as automations involving hue not working but other lights in same script ie. nanoleaf work.. Manually toggle of switch in hassio iOS app brings hue light on, no problem.

I migrated off of my pi3b onto a server i have running in the hopes that the problem was the processing power of the pi, but i'm still seeing lights becoming unavailable. Its usually the same bulb that errors but i've seen it happen to all of them.

rPi 3+, HA 0.83.2, 63 loaded components
I did have many many messages "could not reach bridge", after deleting the 1.5Gbyte database file and removing some non reachable lamps there were no more messages for ~6hours. But over time the messages did grow, while the database file was <150Mbyte.
12:03:36 up 20:17, 1 user, load average: 0.01, 0.11, 0.26

MacMini server, OS X 10.9.5, 7 HUE lights connected
I did install HA 0.84.6 on my MacMini (mid 2011, 2GHz i7) and only the Hue component, no Zwave, MQTT or other, 39 components loaded. After a day it start showing the "could not reach bridge" messages 20minutes apart. Expect computer power is no issue.

Further the HUE Beyond lamp with two lamp-engines is generating error messages every second or so, because of this II had to remove the lamp from the network..

I'm seeing this on 0.84.6 on an older machine, but it's got 32GB of RAM and 4 cores. I tried upping the timeout to 5 seconds and still saw this:

2019-01-01 18:57:51 DEBUG (MainThread) [homeassistant.components.light.hue] Failed to fetch light: 
2019-01-01 18:57:51 ERROR (MainThread) [homeassistant.components.light.hue] Unable to reach bridge 192.168.1.6 ()
2019-01-01 18:57:51 DEBUG (MainThread) [homeassistant.components.light.hue] Finished light request in 5.005 seconds

I suspect it might be the async_timeout package, so I'm going to try to run without it. I'm removing line 171 from the hue light component found here.

UPDATE:
Didn't work. Now it times out at 10 seconds. :cry:

please see https://community.home-assistant.io/t/hue-motion-sensors-remotes-custom-component/27176/614?u=mariusthvdb for what seems to be a solution (albeit upping the timeout in the components)
all errors and 'flapping' gone....

Mariusthvdb: Does not work for me.. :(

I upped the timeout a while back, it did not make a difference for me either. I don't get the messages about taking longer than X seconds, or hub disconnected though. I only am getting the hue light NAME is unavailable. and then usually back to available a few minutes later

@ptdalen

did you set the timeout in both files?

increasing the timeout in the homeassistant/components/light/hue.py from 4 to 10:

171:        with async_timeout.timeout(4):
And in the homeassistant/components/hue/bridge.py from 5 to 10:

164:        with async_timeout.timeout(5):

also, I use this setup, and do configure the Hue bridge ip for now as follows:

device_tracker:
  - platform: hue
sensor:
  - platform: hue
hue:
  bridges:
    - host: !secret hue_ip

using the CC version on @yottatsa s repo, which is an adapted version, or at least was, of the official CC by @robmarkcole .

I've been having the same problems, and updating the timeout didn't fix it. Since I'm also using the Node Red add-on, I tried the Hue component there, and it reports unavailable in sync with HA.

I tried a stand-alone NR, and it was also reporting unavailable in sync with HA. Then I noticed the Hue app was also reporting as unreachable at the same time. So I shut down the whole HA VM and watched the Hue app. And it still kept going unavailable every few minutes.

Note that while the Hue app was reporting a light as unavailable, I could still turn it on and off or change the colour via the app.

So why do we think this is a problem with HA?

@Mariusthvdb I had not made the changes in both locations. I just did. I'll keep an eye on it in HA and report back later.

I made the changes in both files. Changed to 10 and restarted HA. I've had 2 different hue bulbs go unavailable in the past 3-4 hours.

@ptdalen

Are these true unavailables, also in the Hue App ( lights do show unavailable now and then) or HA issues you think.
Is it as frequent as before or do you notice an improvement ?

It's a bit hard to track down to be honest. It's only been a few hours so I'm not sure if its less frequent quite yet. As far as if they are truly unavailble, thats the hard thing so see. 95% of the time it actually has no real effect on my so I dont notice.

By that I mean if the lights are off they stay off and if they are on they stay on. They go from unavailable back to available in logbook (or entity history) so quickly, that it usually does not cause an issue. Once in a while, I go to bed, and wake in the morning and find a light that did not turn off like it was supposed to, then checking the logs, I see that it happened to be unavailable at the time it was supposed to turn off. I almost never look at the lights in the Hue App, but if I happen to get lucky enough to catch one at the exact time its unavailable I defintiely will report back. I think this is exactly what has made it so hard to narrow down.

I think the issue with constant flapping or losing connection to the hub is not the exact same issue. Mine just seen to go unavailable off and on throughout the day and night. Almost like they go into a "sleep" mode. Sometime if I notice a light is unavailable, and I turn on/off another hue light, they come back immediately as available.

I think the difference is that other platforms send commands to the lights regardless of their availability. The Hue app and at least two add-ons for Node Red all report light unavailability at the same time as HA, but can send commands. And even though they report as unavailable, the commands to lights works. I haven't done any testing on commands to groups.

Therefore I think HA needs to be changed to send the commands even if it thinks they're unavailable. I was going to do a test until I realised (1) that the code is not implemented in something I can easily drop into custom_components and (2) I can't figure out where set_state is actually implemented to be able to change it.

About sending commands to alleged ‘unavailable’ lights:
I have all lights in the front end and all light groups (the Hue groups, not handmade ones):

Switching those groups always works.

Which at least proves the Hub , the group, and the light are available to the system and HA is incorrect in showing the light as unavailable.

Hue creates a group for even a single light so I’m not talking about a light group with many lights or the HA light group.

still feel this: https://github.com/home-assistant/home-assistant/pull/13109 started it all.. before that, the 'flapping' wasn't there, or at least not noticeable..

I wanted to follow up. After running for a few days with the timeouts set to 10 seconds for both files, I can say that I am still getting lights going unavailable. The lights that go unavailbe seem random (ie not alway the same lights). It might be less often, but not sure. Seems to be one light every 2-4 hours at the moment.

Still no sollution to this issue yet? Upgraded from 0.82.1 to 0.85.1 and now the bridge becomes unavailiable after a few hours. Really frustrating...

Yes, been seeing this issue the past few days. Very frustrating. Saving grace is that I have HomeKit as primary interface directly paired with the hub; downside is the my HA automations for hue are not working.

This is getting silly now.. it is almost every few minutes or seconds for me now

2019-01-22 06:29:58 ERROR (MainThread) [homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 06:35:09 ERROR (MainThread) [homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 06:38:21 ERROR (MainThread) [homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 06:39:13 ERROR (MainThread) [homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 06:40:18 ERROR (MainThread) [homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 06:52:44 ERROR (MainThread) [homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 06:54:25 ERROR (MainThread) [homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 06:55:00 ERROR (MainThread) [homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 06:58:18 ERROR (MainThread) [homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 06:58:29 ERROR (MainThread) [homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 07:03:11 ERROR (MainThread) [homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 07:03:53 ERROR (MainThread) [homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 07:06:21 ERROR (MainThread) [homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 07:09:23 ERROR (MainThread) [homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 07:11:50 ERROR (MainThread) [homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 07:12:14 ERROR (MainThread) [homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 07:13:43 ERROR (MainThread) [homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 07:14:47 ERROR (MainThread) [homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 07:15:51 ERROR (MainThread) [homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 07:16:54 ERROR (MainThread) [homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 07:19:17 ERROR (MainThread) [homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 07:19:53 ERROR (MainThread) [homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 07:20:11 ERROR (MainThread) [homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 07:24:15 ERROR (MainThread) [homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 07:26:14 ERROR (MainThread) [homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 07:27:55 ERROR (MainThread) [homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 07:28:42 ERROR (MainThread) [homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 07:33:30 ERROR (MainThread) [homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 07:37:18 ERROR (MainThread) [homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()

I tried to reset the bridge and it helped right away👍

tir. 22. jan. 2019 09.10 skrev markrennie71 notifications@github.com:

This is getting silly now.. it is almost every few minutes or seconds for
me now

2019-01-22 06:29:58 ERROR (MainThread)
[homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 06:35:09 ERROR (MainThread)
[homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 06:38:21 ERROR (MainThread)
[homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 06:39:13 ERROR (MainThread)
[homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 06:40:18 ERROR (MainThread)
[homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 06:52:44 ERROR (MainThread)
[homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 06:54:25 ERROR (MainThread)
[homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 06:55:00 ERROR (MainThread)
[homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 06:58:18 ERROR (MainThread)
[homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 06:58:29 ERROR (MainThread)
[homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 07:03:11 ERROR (MainThread)
[homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 07:03:53 ERROR (MainThread)
[homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 07:06:21 ERROR (MainThread)
[homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 07:09:23 ERROR (MainThread)
[homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 07:11:50 ERROR (MainThread)
[homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 07:12:14 ERROR (MainThread)
[homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 07:13:43 ERROR (MainThread)
[homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 07:14:47 ERROR (MainThread)
[homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 07:15:51 ERROR (MainThread)
[homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 07:16:54 ERROR (MainThread)
[homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 07:19:17 ERROR (MainThread)
[homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 07:19:53 ERROR (MainThread)
[homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 07:20:11 ERROR (MainThread)
[homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 07:24:15 ERROR (MainThread)
[homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 07:26:14 ERROR (MainThread)
[homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 07:27:55 ERROR (MainThread)
[homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 07:28:42 ERROR (MainThread)
[homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 07:33:30 ERROR (MainThread)
[homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()
2019-01-22 07:37:18 ERROR (MainThread)
[homeassistant.components.light.hue] Unable to reach bridge 192.168.0.11 ()


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/home-assistant/home-assistant/issues/16689#issuecomment-456306943,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AX0v1UUDfO_IJ2WqNVIWwBrx9Zx7KIHLks5vFseDgaJpZM4Wtz0E
.

Every time home assistant restarts my hue lights switch to unavailable. The only way I have found to fix this is to delete the integration and re-configure. I'm still using the original hub (the circular one) and am thinking about getting the latest version to hopefully get this fixed.

For those who are experiencing this, do you have the older hub as well or if this is still present with the version 2 hub?

I am using version 2 of the hub and still have issues.

I have tried absolutely everything to debug this fault without any success.

I'm not a programmer at all so this has been very frustrating. Everything is working well but I have random and repeated 'Unable to reach bridge' errors. in the logs.

I'm running HassOS 2.8, hass.io supervisor 145, Home Assistant 0.88.0 on a RPi 3+

I have tried all of the following over several weeks: -
Stripping out all components in configuration.yaml
Stripping out all add-ons
Deleting and re-configuring the hue component
Un-linking the bridge and re-linking from the hue app
Setting a static IP address and changing the IP address of the bridge

In addition I'm now getting intermittent comms errors to my tp-link switches.

This bug spoils an otherwise very good home automation system. Hoping the developers sort this soon.

I used to get those errors too.

My Raspberry PI with Hassio was behind a powerline adapter (TPLink).
Decided to move it closer to my router, and plugged it in to my bridge - never received any errors again so far and it's been almost a month now...

Might help some of you ?

Hub v2 here and all cat6 direct into routers and I have the problem still...

Hub v2 also. Just rearranged my network so I’m direct into router too. Thanks for the advice.

Running out of things to try after this.

Is anybody else with problems using monitor? The website warns of wifi interference and when I reconfigured mine to be on demand every 15 minutes, I can see almost all the changes to unavailable occur within 1 minute of a scan.

I removed discovery from my config and my hue lights come up in my interface more often than not now. Every once in a while a restart will make them unavailable.

I've done some investigation with my hue bridge. It turns out that it is a bit unreliable on the network level, and sometimes needs to do tcp retransmissions. I've done a packet capture and can see that it clearly takes longer; https://i.imgur.com/CVo3pR0.png

So it would be really good to be able to set a higher timeout to avoid things flicker to unavailable all the time.

I've done some investigation with my hue bridge. It turns out that it is a bit unreliable on the network level, and sometimes needs to do tcp retransmissions. I've done a packet capture and can see that it clearly takes longer; https://i.imgur.com/CVo3pR0.png

So it would be really good to be able to set a higher timeout to avoid things flicker to unavailable all the time.

I've been having progressively worse bridge connectivity issues as I've added Hue devices and tried pretty much all of the workarounds detailed in this ticket. This morning I updated my switch to disable auto negotiation for the port the bridge is on and have been error-free for the past few hours. I'm betting I either have a marginal bridge or the Hue kit doesn't always handle negotiation properly.

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

I know there's an active thread at #23796 but this one is older and it's still occurring on my 0.100.2 installation. I tried disabling discovery but that's not helping at all.

I have problems too: every time I restart my Raspberry Pi 4 (where ha is running on a docker) i get all my hue lights unavailable. The hue bridge is online, the movement sensor connected to the hue bridge are online, but all lights unavailable. The only thing i can do is to unlink and relink the hue integration (tapping on the hue switch physical button).

I'm seeing what I believe is this issue as well. I have hassio installed on a rpi3b+, basically a fresh install. Out of 4 reboots, 2 the hue lights disappeared and they show up as unavailable. Home Assistant version 0.101.3.

Happy to provide any logs / other information if helpful.

Experiencing similar issues. Running on a rpi4 in a Docker image.
First all hue lights show as unavailable and after a short time they show as available again in the UI. Never had this before.

I put this in that forum thread, but maybe it will help diagnose...

Upon boot the entire hue system was unavailable. The logs would say, 'hue system taking longer than 10 seconds'. I run everything on copper , no wifi used (I have WiFi, but the only things that connect to it are some phones and ESP32(s). Also no zigbee (other than Hue).

I rebooted many times over multiple days, tried many, many different possible fixes, none of which worked. What finally fixed it for me was:

discovery:
  ignore:
    - philips_hue
Was this page helpful?
0 / 5 - 0 ratings