New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HUE spamming error LOG: Error fetching light data: #32380
Comments
This is also an issue on 105.5 (just reverted). IP Addresses removed for obvious reasons. 2020-03-01 17:51:00 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 576, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/components/hue/light.py", line 375, in async_turn_on
await self.bridge.async_request_call(self.light.set_action(**command))
File "/usr/src/homeassistant/homeassistant/components/hue/bridge.py", line 108, in async_request_call
return await coro
File "/usr/local/lib/python3.7/site-packages/aiohue/groups.py", line 80, in set_action
json=data)
File "/usr/local/lib/python3.7/site-packages/aiohue/bridge.py", line 78, in request
) from None
aiohue.errors.RequestError: Error requesting data from ###.###.###.###: [Errno 104] Connection reset by peer
2020-03-01 17:51:00 ERROR (MainThread) [homeassistant.components.hue.light] Error fetching light data:
2020-03-01 17:52:00 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 576, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/components/hue/light.py", line 375, in async_turn_on
await self.bridge.async_request_call(self.light.set_action(**command))
File "/usr/src/homeassistant/homeassistant/components/hue/bridge.py", line 108, in async_request_call
return await coro
File "/usr/local/lib/python3.7/site-packages/aiohue/groups.py", line 80, in set_action
json=data)
File "/usr/local/lib/python3.7/site-packages/aiohue/bridge.py", line 78, in request
) from None
aiohue.errors.RequestError: Error requesting data from ###.###.###.###: [Errno 104] Connection reset by peer
2020-03-01 17:52:00 ERROR (MainThread) [homeassistant.components.hue.light] Error fetching light data:
2020-03-01 17:53:52 ERROR (MainThread) [homeassistant.components.hue.light] Error fetching light data:
2020-03-01 17:54:00 ERROR (MainThread) [homeassistant.components.hue.light] Error fetching light data:
2020-03-01 17:55:00 ERROR (MainThread) [homeassistant.components.hue.light] Error fetching light data:
2020-03-01 17:55:00 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 576, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/components/hue/light.py", line 377, in async_turn_on
await self.bridge.async_request_call(self.light.set_state(**command))
File "/usr/src/homeassistant/homeassistant/components/hue/bridge.py", line 108, in async_request_call
return await coro
File "/usr/local/lib/python3.7/site-packages/aiohue/lights.py", line 117, in set_state
json=data)
File "/usr/local/lib/python3.7/site-packages/aiohue/bridge.py", line 78, in request
) from None
aiohue.errors.RequestError: Error requesting data from ###.###.###.###: [Errno 104] Connection reset by peer
2020-03-01 17:55:00 ERROR (MainThread) [homeassistant.components.hue.light] Error fetching light data: |
@badrobit that was fixed in 106. @Kugelfang666 please try without any Hue related custom component. |
HI. just chiming in to let you know on 106.5 this is still observed very frequently, and Hue light go unavailable beyond a workable situation..
|
Are you using the custom integration "Hue sensor advanced"? |
if you are referring to @robmarkcole 's Custom integration I have used that for ages, and every time I test the Hue integration in Hass.io, I take it out, because dev team wont/can't accept issues with this alive in the setup. It does seem to intensify this issue, so be sure to take it out for testing purposes. happening as we speak |
ao i just removed @robmarkcole custom integration from my setup to try it without. Unfortunately my setup heavily relies on this component since im using the hue dimmer switches all over to control non hue stuff via HA..... |
@Mariusthvdb you said in another issue that you use the Rest sensor to hit the Hue API too. Disable those too. Hue only supports a limited number of requests per second. The error shows up when the Hue hub is overwhelmed. |
I can confirm the issue also occurs without the custom integration. This makes sense since I was using the combination since months without any issues and they popped up just after the update to 0.106 without any change to my hue setup |
Correct, I have 1 rest sensor now that checks the lights for ‘reachable’ which is needed to distinguish lights being truly unavailable because of no power, or unavailable because of this issue. setting allow_unreachable: true shows these lights as on/off so we need a way to get the ‘reachable’ attribute in the HA state machine. Will take it out for testing also. |
@Kugelfang666 how many hue devices do you have ? |
Hue Bridge 1 Hue Bridge 2 |
For the record, the Hue custom integration is absolute trashing your Hue hubs. It doesn't leverage existing caches, it doesn't cache itself either across the different platforms and is just hammering your hubs non-stop. It doesn't just break Home Assistant, I bet a lot of other stuff communicating with Hue (like Harmony) is also hurting by it. |
ok, fair point, the only thing i don't understand is why the error popped out just after the update to 0.106. I'm always keeping a close eye on the error log and this is the first time I saw it. Also as I wrote earlier, I just uninstalled the custom component and removed the entries from config.yaml and after just 30 min the same error was in the log is there an easy way to diagnose which devices (on my network) or integrations from HA are polling my bridges? |
I just updated to the new version which has the lower polling rate (0.5) , I'll give it a spin and report back, gernerally speaking, having the hue dimmer switches available in HA as sensors for me is a major asset since I'm heavily using them to trigger automation, control devices... Hence, having a "proper" solution would be fantastic. |
I would get yourself a Conbee 2 stick. Instant sensors/remote updates instead of polling for changes. The Hue Hub API just isn't meant for this. |
sorry off topic: which I actually already have, unfortunately deCONZ had two limitations for me:
I was about to move my whole setup over but 1. and 2. were a deal breaker for me. Currently im using the iOS App iconnecthue to manage my hue bridge which actually allows for all these functions. |
Also with the reduced poll rate I still get the errors in my brige |
i have quite some command line switches in my setup to deactivate my hue motions sensors:
could it be that this is also hammering the bridge to check ists state? I'm just trying to diagnose if something else in my setup might also be contributing to this issue |
to try and take out the need for the custom integration (which holds a great deal of extra info than the current Core does), we can add some of these extra attributes to the core HA integration, hope this will be allowed. |
@Kugelfang666 that won't hit the server unless you're turning them on/off. However that value template is sourced from the hub… @Mariusthvdb you don't need an architecture issue, you need a developer to fix it. Remotes however will never work great, as it's a polling API so things will never be instant unless you hammer the hub, which we won't allow, as that's causing this issue to begin with. |
Thanks for the feedback. Is the value template regularly polled or just checked when the switch is operated? |
Value template is only evaluated when the |
ok thanks for pointing this out, the only thing I still don't understand is why this error just popped out with the latest HA update, I'm 100% positive at there was no such entry in the log. could it be that earlier it was not reported? |
Yes I understand that, and wouldn't want to do so. Thats why I had the Custom integration poll per second, not 0.1 second and that worked fine. Would you consider that too much still? If not, I think this would be just fine to have in core HA. |
that is perfectly in line whit what I saw. For me removing the custom integration also did not resolve the problem. |
cc @balloob, maybe those errors should be ignored most of the times, I just discovered how easy it is to generate them, and what is happening really:
IMHO we could totally ignore (or at least decrease the log level) these request errors in those situations, and only log 'real bridge disconnects' (> timeout without success). I imagine that A LOT of them would disappear. |
Requesting an update is not actually updating the data. |
@azogue wrote:
Yes, that would be something most of the HA community Hue users ask for, since a very long time indeed... just one of the many posts on the unavailability |
I know, but I was talking about checking if another call does the update request successfully while the current failed one gets the timeout exception. It is better to show it: #32751 |
I did find 1 card to cause definite trouble in the end. Not saying taking it out solves all errors, but having this on my test page along with some nifty Hue lights auto rendering:
causes these lights to constantly go unavailable. Not sure if it is the Lovelace page, or the backend causing timing issues or what have you, but still, for reference reporting it here:
didn't make a difference if I took out styling or not, is was the buienradar iframe gadget causing trouble. |
Just wanted to chime in, I'm having the same issue. It's quite annoying when my Hue integration is "Unavailable" quite often during a 24h period, example: I have one Hue v2 bridge and about 20 bulbs. No third party stuff, no other Philips products like blooms or strips or anything like that. These are the errors I'm seeing, in chronological order (oldest first). Log Details (ERROR)Logger:
Log Details (ERROR)Logger:
Log Details (ERROR)Logger:
|
Same issue on Home Assistant 0.108.3 Log Details (ERROR) Request failed 3 times, giving up. Log Details (ERROR) Timeout fetching light data Log Details (ERROR) Timeout fetching sensor data Logger: homeassistant.core Error doing job: Task exception was never retrieved The above exception was the direct cause of the following exception: Traceback (most recent call last): |
I was fighting this issue as well and did all kinds of troubleshooting. What I discovered was my Hue Hub was rebooting at regular intervals whenever it went offline in HA, which was about every hour. That meant it wasn't just HA that couldn't interact it was everything. After a lot of digging what I discovered was that because I had the Hue Hub on another VLAN and mDNS reflecting on it was causing the Hue Hub to get overwhelmed and crash. I use all ubiquiti networks unifi equipment and this seems to be a well reported issue that happens with the Hue Hub. Moving to the mDNS repeater over the mDNS reflector immediately resolved the issue. This probably won't help everyone, but it might help anyone with a similar setup. |
I also have Ubiquiti with VLANS and mdns. It's way more than I need and I'm still learning how to use it. Can you explain how you ..."Moving to the mDNS repeater over the mDNS reflector"? Thanks very much. |
This is a good forum post to get started. The short of it is you need to disable mDNS reflecting in the GUI and modify the config.gateway.json file on the controller. There is no GUI option for it and does not work on the Dream Machine line. |
I have a traditional single-mask LAN (192.168.0.*) and both my hub and the VM host that Home Assistant runs on are hard-wired (via the same switch) to the same router. If my Hue Hub is in fact rebooting... how/where would I be able to tell this information? |
Seeing that the |
so I fully removed the CC in my setup. Moving forward im using the newly released events for the hue buttons. Unfortunately I still keep getting a lot of these |
happy to report here, that apart from the issue at startup, the errors have completely gone.. did an update to 108.x, after which Hue became fully stable. What I also did was update the custom button card to version 3.3.0 +, which prevents updating all entities configured, and only updates changed entities. Lastly, and I haven't tested this 100%, was to exclude the light domain in recorder/history. All of this is with all Hue core sensors and lights (had sensors disabled before because they too became 'unavailable' all the time), and now even the Hue with events. Goes without saying I only report here without any CC installed. Can report that installing CC eventsensor by @azogue works very fine indeed, and does Not cause any harm. All in all, happy camper here. #fingerscrossed... |
thanks for this! I can confirm removing the light domain from the recorder seems to have solved the issue for me!! This for me seems to be the actual solution after removing CCs and so one did not work! |
Good to hear! It would be an issue of true importance though, since of course we should be able to record our lights. @balloob what would be your thoughts on this? |
hmmm after some initial euphony the error came back when I increased the polling interval, ill do some more systematic testing tomorrow |
Wait till beta 109 hits and make sure that you make sure that you don't get any errors from integrations that do I/O in the event loop. |
for me the problem seems to be gone with 0.109! I updated yesterday and ever since not a single entry occurred! |
updating the OS to 4.10 brought back the problem which before was entirely solved for me :-( |
which is that (awaiting your report before updating...)? |
Sry I don’t understand |
which is the problem that you say is brought back? |
Please do not continue discussions on closed issues but open a new issue instead. |
The problem
Since updating from 0.105.X to 0.106.1 my log becomes spammed with errors.
All hue related items become briefly unavailable in Lovelace and then come back. This is true for all devices on both my hue bridges and always happened simultaneously for both bridges.
Environment
Problem-relevant
configuration.yaml
Traceback/Error logs
Additional information
I also have the custom integration "Hue sensor advanced" running on my setup.
The text was updated successfully, but these errors were encountered: