Cannot discover Sonos Speakers

I have a Sonos Playbar and 2 Play:1s that are configured as surround sound. I have tried to add these to my Home Assistant config but I receive the error below. I do not have autodiscovery enabled so I also have the configuration below. Any ideas why this is not working?

sonos:
media_player:
#hosts:
#- 10.0.0.52
#- 10.0.0.53
#- 10.0.0.54
interface_addr: 10.0.0.54

2018-08-23 23:23:07 ERROR (MainThread) [homeassistant.core] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/media_player/sonos.py”, line 190, in _setup_platform
interface_addr=config.get(CONF_INTERFACE_ADDR))
File “/usr/local/lib/python3.6/site-packages/soco/discovery.py”, line 99, in discover
_sockets.append(create_socket(interface_addr))
File “/usr/local/lib/python3.6/site-packages/soco/discovery.py”, line 77, in create_socket
socket.inet_aton(interface_addr))
OSError: [Errno 99] Address not available

What version of Home Assistant are you on?

There was a number of releases (0.73 or 0.74) where the manual configuration was broken. That was fixed in 0.75 I believe.

That said, interface_addr has to be the address of the interface on your system running Home Assistant, not the address of one of the Sonos speakers.

I am on the latest version as of today 0.79. I just updated my config to have the interface_address be the HA IP and it now says

2018-09-29 01:54:53 WARNING (SyncWorker_2) [homeassistant.components.media_player.sonos] No Sonos speakers found

All you should need to do is:

  1. Remove any reference to sonos:
  2. Let the integration configure it

I removed all of the Sonos references and used the integration configuration and while it is trying to enable it says “Aborted: No Sonos devices found on the network” and never configures it. I am wondering if this is because I am running hass.io that is a docker container in the background and for some reason it does not have network_mode: host set. I found other discussions where it says the sonos speakers must be on the same subnet as Home Assistant and that a Docker container could have a different internal IP.

Sonos works on Hass.io.

These cases usually end up with the reporter having some advanced network configuration that he forgot to tell about, like a local firewall.

Hi together,
was there any solution in the meantime? I am facing the same issue since a few days. However, my Sonos speaker worked before. I even had it included in some automations and scripts without problems.
Then out of the nowhere Home Assistant can not find the speaker any more…
I did not change anything with my network configuration.
I used the auto recovery in the beginning and tried the integration configuration, but it did not find the speaker.
I tested it with the Docker containers 0.83.2 and 0.84.6. Same behavior with both versions.
Any ideas?
Greets Xargon

1 Like

Still having issues? I just unplugged my speaker and plugged it back in and now it cannot be found. Very annoying.

Hi @M-D
in my case the configuration.yaml lost the Sonos configuration. I don’t know how this could happen, but after I re-configured it, it worked again. Check out the advanced config:


Greets Xargon

Thanks.

Interestingly mine just appeared again one day. Luckily I don’t move my speakers a lot.

I have the same issue mine are impossible to be discovered. Its been almost a year. Im running 111.4.