-
Notifications
You must be signed in to change notification settings - Fork 8
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
Error "Updating huesyncbox media_player took longer than the scheduled update interval 0:00:02" #24
Comments
The I could make the poll interval longer again (it was lowered from 10 to 2 in the last update), but it would take longer for the integration to get in sync with the status of the box, which is a problem when building automations around it. Seeing that line would only mean that the status of the integration will lag behind with ~2 seconds. So as long is it is not occurring around the time that the status of the box changes and your automation triggers it should not be an issue. That being said, could you post your automation (the yaml) so I can try to reproduce it. I would expect request errors to the box to be logged by HA since it is an Exception, but maybe that is not (always?) the case, I would need to examine that in more detail.
|
Hi, thanks for your answer. I can do that, when I am back home. But I think the poll is correct every time. The automation triggers but the part which is not running is the action part of the automation. This is not working like every third time when using my Apple TV. The automation looks like this:
media_player.wozi = sync box I put a second trigger with a delay of 10 seconds as a workaround (to send the action a second time after 10 seconds if the first send did not went thru), that seems to work yesterday. As I said before I think the action does not arrive at the sync box every time for me. |
Any news on a permanent fix for this? |
I get this issue a lot, It can be approximately every 30 seconds for periods, and then stops doing it for a while, then comes back again! It doesn't stop it working but it makes my log file somewhat busy! Completely understand that it could very well be down to local network conditions (I have a lot of equipment on my network!) but would it be possible to add an option in a future version to change the poll interval if we want to? That way we can adjust it to something that works for us. I have no issue waiting 5-10 seconds for my lights to start syncing or change modes, but others may want it quicker. An option for the user to change this might be a way to solve this. Thanks for the great component though, I was sending rest commands manually before and it was very hit and miss, this works so much better!! |
Ow, sorry for the late reply. I somehow missed the 20 sept response. @sparsons99 Since I am using the standard I am planning to do some work on the integration during the upcoming holidays and will take a look at this. However it would really help to get some logging of the traffic to the syncbox so if one of you could temporarily enable the logging by adding the section below to
|
@mvdwetering thank you for the suggestions, will have a look at those. Happy to test the logging. Will try it now and let you know what happens. Probably won't take long in my case! As an example, this is what I see frequently in my log file: 2021-12-14 19:54:52 WARNING (MainThread) [homeassistant.components.media_player] Updating huesyncbox media_player took longer than the scheduled update interval 0:00:02 Not sure if that is entirely useful, although odd that it is exactly 30 seconds each time! |
Ok, so I enabled logging and got this: 2021-12-14 20:49:29 DEBUG (MainThread) [aiohuesyncbox.huesyncbox] get, https://_192.168.86.47:443/api/v1, None Sorry if the formatting isn't great! I had a look through and don't think any of the above info is particularly sensitive, but if you think it isn't best posted in here, then by all means take a copy and let me know and I'll delete the post! |
Me again! Just as a further update, I amended the poll interval to 5 seconds last night and I haven't had a single issue since. Appreciate that may not work for everyone, but potentially waiting 3 seconds longer for my lights to start syncing is not really an issue for me! |
@sparsons99 What is your setting for that? Can you post it here. I have the same issue |
@florie1706 to be honest I just amended the config\custom_components\huesyncbox\media_player.py file as I couldn't find an easy way to do it. Line 62 - This isn't the best way to do it as any updates to the component will overwrite this setting, but I did it mainly just to test it, and it's a very quick tweak to redo after an update if needed! |
Thanks, that is what I needed for testing ;) |
I am cleaning up old issues and see that this was still open. Since it is very old I will post a summary of the current state and close it. In the just released v2.1.0 errors are only logged when multiple consecutive requests fail, so that should reduce the logspam. And last, if someone still wants to change the interval I would suggest to do it the official way by disabling the "Enable polling for updates" option in the System Options of the integration. Then create an automation that triggers the updates on an interval to your liking. Basically like descibed here for the Ping integration but choose an entity from this integration (just one, not all, they will update together on every update) |
Describe the bug
Somtimes when I use my automation (if hue syncbox is idle and tv is on then do hue syncbox sync_on) it does trigger but does not start the sync. In my log i have this
Expected behavior
Send a sucessfull sync_on to the box
Environment
Official docker image
The text was updated successfully, but these errors were encountered: