Sonos Errors - help?


#1

For the last few weeks and various versions of HA I have been getting these errors swamp my logs… I have 2 sonos play. Any idea please?

2017-09-12 19:41:05 WARNING (MainThread) [homeassistant.components.media_player] Updating sonos media_player took longer than the scheduled update interval 0:00:10
2017-09-12 19:41:16 WARNING (MainThread) [homeassistant.components.media_player] Updating sonos media_player took longer than the scheduled update interval 0:00:10
2017-09-12 19:41:27 WARNING (MainThread) [homeassistant.components.media_player] Updating sonos media_player took longer than the scheduled update interval 0:00:10
2017-09-12 19:41:38 WARNING (MainThread) [homeassistant.components.media_player] Updating sonos media_player took longer than the scheduled update interval 0:00:10
2017-09-12 19:41:49 WARNING (MainThread) [homeassistant.components.media_player] Updating sonos media_player took longer than the scheduled update interval 0:00:10
2017-09-12 19:42:00 WARNING (MainThread) [homeassistant.components.media_player] Updating sonos media_player took longer than the scheduled update interval 0:00:100:

both on Static IPs

and config is

  - platform: sonos
    hosts:
      - 192.168.0.16
      - 192.168.0.24

Cheers
Mark


#2

That’s normal. My logs are full of that as well. In my experience sonos works somewhat okay but there are lots of errors in the logs. Not just those. I don’t think there is much interest from developers to fix it, most of the Sonos issues get closed for inactivity and never get resolved.

I haven’t tried getting it to work perfectly but considering there are better supported Sonos APIs I have considered switching to a nodejs http API I tried in the past and had positive results from.

Let us know how it goes.


#3

for some reason it was making HA run so slowly… So I turned off the offending Sonos and speed picked up again. I might even try to factory reset it and see what happens. I only want to use it for TTS as part of an alarm


#4

Yea. I’ve seen that too but I think only when I first start HASS. I don’t think I’ve notice it persist after that.


#5

I had 1 of my Sonos off for a week and didn’t once get this error in the logs. Yesterday I factory reset to Play 1 that caused the problem. It was fine till yesterday but today the logs are again full of this

2017-09-23 22:59:11 WARNING (MainThread) [homeassistant.components.media_player] Updating sonos media_player took longer than the scheduled update interval 0:00:10
2017-09-23 22:59:22 WARNING (MainThread) [homeassistant.components.media_player] Updating sonos media_player took longer than the scheduled update interval 0:00:10
2017-09-23 22:59:33 ERROR (MainThread) [homeassistant.helpers.entity] Update for media_player.dining_room fails
Traceback (most recent call last):
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/requests/packages/urllib3/connection.py", line 141, in _new_conn
    (self.host, self.port), self.timeout, **extra_kw)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/requests/packages/urllib3/util/connection.py", line 83, in create_connection
    raise err
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/requests/packages/urllib3/util/connection.py", line 73, in create_connection
    sock.connect(sa)
TimeoutError: [Errno 110] Connection timed out

Then constaly these afterwards

2017-09-24 08:14:05 WARNING (MainThread) [homeassistant.components.media_player] Updating sonos media_player took longer than the scheduled update interval 0:00:10
2017-09-24 08:14:16 WARNING (MainThread) [homeassistant.components.media_player] Updating sonos media_player took longer than the scheduled update interval 0:00:10
2017-09-24 08:14:27 WARNING (MainThread) [homeassistant.components.media_player] Updating sonos media_player took longer than the scheduled update interval 0:00:10
2017-09-24 08:14:38 WARNING (MainThread) [homeassistant.components.media_player] Updating sonos media_player took longer than the scheduled update interval 0:00:10
2017-09-24 08:14:49 WARNING (MainThread) [homeassistant.components.media_player] Updating sonos media_player took longer than the scheduled update interval 0:00:10
2017-09-24 08:15:00 WARNING (MainThread) [homeassistant.components.media_player] Updating sonos media_player took longer than the scheduled update interval 0:00:10
2017-09-24 08:15:11 WARNING (MainThread) [homeassistant.components.media_player] Updating sonos media_player took longer than the scheduled update interval 0:00:10
2017-09-24 08:15:22 WARNING (MainThread) [homeassistant.components.media_player] Updating sonos media_player took longer than the scheduled update interval 0:00:10
2017-09-24 08:15:33 WARNING (MainThread) [homeassistant.components.media_player] Updating sonos media_player took longer than the scheduled update interval 0:00:100:

#6

I can turn on the last stream to it, but I cannot turn it off… all works fine via the android app but not HA.


#7

I am also getting those errors every 11s:

[homeassistant.components.media_player] Updating sonos media_player took longer than the scheduled update interval 0:00:10

I am on 0.80.0 though.
Am I the only one experiencing that?

Thanks.


#8

The same is still happening on 0.85.0. I’ve seen many threads in the forums that deal with the same issue, but they are all unsolved yet.


#9

The Sonos integration was mostly rewritten about a year ago and now works quite well. If you still see problems, file a GitHub issue so we can investigate.


#10

Done: https://github.com/home-assistant/home-assistant/issues/22070