core: Sonos Speakers not found anymore
The problem
I have my sonos configured via the UI without manual Network configuration. Since the Update to 2021.7 my 2 speakers are not found anymore.
What is version of Home Assistant Core has the issue?
2021.7
What was the last working version of Home Assistant Core?
2021.6.6
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Sonos
Link to integration documentation on our website
https://www.home-assistant.io/integrations/sonos/
Example YAML snippet
Configured vie UI
Anything in the logs that might be useful for us?
I tried to add the Speakers manual in the configuration:
sonos:
media_player:
hosts:
- 192.168.5.91
- 192.168.5.92
With this the speakers could be found again, but working not good. The Cover pictures are not shown anymore and the Players don't recognize what is playing now. All the logs appeared at the same time.
I found this in the log:
Error requesting favorites from <SoCo object at ip 192.168.5.91>: HTTPConnectionPool(host='192.168.5.91', port=1400): Max retries exceeded with url: /MediaServer/ContentDirectory/Control (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f0331d4c520>: Failed to establish a new connection: [Errno 113] Host is unreachable'))
And that:
Sonos Schlafzimmer cannot reach [None], falling back to polling, functionality may be limited
And that:
Exception in async_seen when dispatching 'sonos_seen-RINCON_542A1B624C4E01400': () Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 169, in _new_conn conn = connection.create_connection( File "/usr/local/lib/python3.9/site-packages/urllib3/util/connection.py", line 96, in create_connection raise err File "/usr/local/lib/python3.9/site-packages/urllib3/util/connection.py", line 86, in create_connection sock.connect(sa) OSError: [Errno 113] Host is unreachable During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 699, in urlopen httplib_response = self._make_request( File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 394, in _make_request conn.request(method, url, **httplib_request_kw) File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 234, in request super(HTTPConnection, self).request(method, url, body=body, headers=headers) File "/usr/local/lib/python3.9/http/client.py", line 1253, in request self._send_request(method, url, body, headers, encode_chunked) File "/usr/local/lib/python3.9/http/client.py", line 1299, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/usr/local/lib/python3.9/http/client.py", line 1248, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/local/lib/python3.9/http/client.py", line 1008, in _send_output self.send(msg) File "/usr/local/lib/python3.9/http/client.py", line 948, in send self.connect() File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 200, in connect conn = self._new_conn() File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 181, in _new_conn raise NewConnectionError( urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f032f388100>: Failed to establish a new connection: [Errno 113] Host is unreachable During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/requests/adapters.py", line 439, in send resp = conn.urlopen( File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 755, in urlopen retries = retries.increment( File "/usr/local/lib/python3.9/site-packages/urllib3/util/retry.py", line 574, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='192.168.5.91', port=1400): Max retries exceeded with url: /MediaRenderer/AVTransport/Control (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f032f388100>: Failed to establish a new connection: [Errno 113] Host is unreachable')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/sonos/speaker.py", line 484, in async_seen done = await self.async_subscribe() File "/usr/src/homeassistant/homeassistant/components/sonos/speaker.py", line 319, in async_subscribe await self.hass.async_add_executor_job(self.set_basic_info) File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run result = self.fn(*self.args, **self.kwargs) File "/usr/src/homeassistant/homeassistant/components/sonos/speaker.py", line 271, in set_basic_info self.media.play_mode = self.soco.play_mode File "/usr/local/lib/python3.9/site-packages/pysonos/core.py", line 443, in play_mode result = self.avTransport.GetTransportSettings( File "/usr/local/lib/python3.9/site-packages/pysonos/services.py", line 207, in _dispatcher return self.send_command(action, *args, **kwargs) File "/usr/local/lib/python3.9/site-packages/pysonos/services.py", line 479, in send_command response = requests.post( File "/usr/local/lib/python3.9/site-packages/requests/api.py", line 119, in post return request('post', url, data=data, json=json, **kwargs) File "/usr/local/lib/python3.9/site-packages/requests/api.py", line 61, in request return session.request(method=method, url=url, **kwargs) File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 542, in request resp = self.send(prep, **send_kwargs) File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 655, in send r = adapter.send(request, **kwargs) File "/usr/local/lib/python3.9/site-packages/requests/adapters.py", line 516, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPConnectionPool(host='192.168.5.91', port=1400): Max retries exceeded with url: /MediaRenderer/AVTransport/Control (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f032f388100>: Failed to establish a new connection: [Errno 113] Host is unreachable'))
And that:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/sonos/speaker.py", line 379, in async_resubscribe
await self.async_unseen()
File "/usr/src/homeassistant/homeassistant/components/sonos/speaker.py", line 509, in async_unseen
self.hass.data[DATA_SONOS].ssdp_known.remove(self.soco.uid)
KeyError: 'RINCON_542A1B624C4E01400'
And that:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 969, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs) # type: ignore # noqa
File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1056, in create_connection
raise exceptions[0]
File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1041, in create_connection
sock = await self._connect_sock(
File "/usr/local/lib/python3.9/asyncio/base_events.py", line 955, in _connect_sock
await self.sock_connect(sock, address)
File "/usr/local/lib/python3.9/asyncio/selector_events.py", line 502, in sock_connect
return await fut
File "/usr/local/lib/python3.9/asyncio/selector_events.py", line 537, in _sock_connect_cb
raise OSError(err, f'Connect call failed {address}')
OSError: [Errno 113] Connect call failed ('192.168.5.91', 1400)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/pysonos/events_asyncio.py", line 417, in renew
return await super().renew(requested_timeout, is_autorenew)
File "/usr/local/lib/python3.9/site-packages/pysonos/events_asyncio.py", line 495, in _async_make_request
response = await self.event_listener.session.request(
File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 520, in _request
conn = await self._connector.connect(
File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 535, in connect
proto = await self._create_connection(req, traces, timeout)
File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 892, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 1051, in _create_direct_connection
raise last_exc
File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 1020, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 975, in _wrap_create_connection
raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 192.168.5.91:1400 ssl:default [Connect call failed ('192.168.5.91', 1400)]
Additional information
No response
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 56 (25 by maintainers)
Yeah, I switched the connect off when I wired in the play one. I’ll have a go at switching it back on without the ethernet to do some more experimenting.
That is the goal
I also have this problem since upgrading. I only run one network in the house, no separate subnets or anything if that is what you are referring to.
I have not made any network changes to cause this problem.
@frenck why you closed this issue? in the other issue @jjlawren told me to open a new one, because it seems not to be the same. I also tried the mentioned steps from the other issue, but without success.
So i have only one network interface. before it was working without manual setup. now its working only with manual setup and with a lot of error logs.
Please have a closer look at it.