IoT VLAN / SONOS issues

I currently have a VLAN setup for my IoT devices, which includes my raspberry pi running HA (hassbian). I’ve recently set this up (within the last few weeks) and imediatly had issues with my SONOS players not liking being on a different VLAN than their controller (iphones). Easy fix was to move the SONOS back to my normal VLAN, however this caused issues with HA not being able to discover them. I created some rules in my firewall (Ubiquiti USG), and was able to get it working, atleast it seems to be working. My problem now is I’m getting SONOS related errors in my HA log.

Does anyone have a similar setup? Any help is appreciated.

Right now, I am using the original SONOS bridge, wired into my main switch. I have 5 players, and the bridge, so I have 6 IP addresses. They all have static IP addresses, and those IP addresses are listed in my HA Sonos conifg.

My SONOS bridge is at 192.168.1.200. One of my sonos player names is “HiFi” as you will see in the error below. This is actually a SONOS connect plugged into an old Marrantz 2245. The rest of my SONOS players are Play 1s and don’t seem to be having any issues. All of the players are functioning properly and I can control them from HA and any associated automations are working fine.

The errors are:

 File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/media_player/sonos.py", line 338, in update
    self._player.get_sonos_favorites()['favorites']
  File "/home/homeassistant/.homeassistant/deps/soco/core.py", line 1369, in get_sonos_favorites
    return self.__get_favorites(SONOS_FAVORITES, start, max_items)
  File "/home/homeassistant/.homeassistant/deps/soco/core.py", line 1391, in __get_favorites
    ('SortCriteria', '')
  File "/home/homeassistant/.homeassistant/deps/soco/services.py", line 181, in _dispatcher
    return self.send_command(action, *args, **kwargs)
  File "/home/homeassistant/.homeassistant/deps/soco/services.py", line 415, in send_command
    response.raise_for_status()
  File "/srv/homeassistant/lib/python3.4/site-packages/requests/models.py", line 909, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 405 Client Error: Method Not Allowed for url: http://192.168.1.200:1400/MediaServer/ContentDirectory/Control
17-03-31 12:46:53 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.4/asyncio/tasks.py", line 237, in _step
    result = next(coro)
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/helpers/entity.py", line 204, in async_update_ha_state
    "No entity id specified for entity {}".format(self.name))
homeassistant.exceptions.NoEntitySpecifiedError: No entity id specified for entity HiFi
17-03-31 12:46:53 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.4/asyncio/tasks.py", line 237, in _step
    result = next(coro)
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/helpers/entity.py", line 204, in async_update_ha_state
    "No entity id specified for entity {}".format(self.name))
homeassistant.exceptions.NoEntitySpecifiedError: No entity id specified for entity HiFi
17-03-31 12:46:53 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.4/asyncio/tasks.py", line 237, in _step
    result = next(coro)
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/helpers/entity.py", line 204, in async_update_ha_state
    "No entity id specified for entity {}".format(self.name))
homeassistant.exceptions.NoEntitySpecifiedError: No entity id specified for entity HiFi
17-03-31 12:52:00 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting
1 Like

I do not use SONOS, but I do have a dedicated IoT VLAN. My setup was to add the vlan to the Raspberry Pi, so now Raspberry Pi has the regular access to the network over eth0, and a vlan interface to the IoT vlan eth0.2. I’m using wired connection.

Discovering a Chromecast would also lead to issues, because it relies on broadcasts which don’t survive the hop to a different subnet. Logitec Squeezeserver might have issues too.

Kirichkov’s solution is probably the best way to go. Of course, it kinda breaks the encapsulation of VLAN’s (breaking into the raspi gives you access to both networks), but I think it’s still better than the alternative. Since every VLAN is an interface with separate IP, you can easily restrict the services to specific networks.
e.g bind ssh access to the mgmt-vlan and home-assistant to the “home” vlan (on the http component in the configuration)

I’m setting up VLANs right now. I intend to add the raspi to multiple VLANs too. (how to setup vlan on Rasperry Pi).

Did ya’ll ever solve this? I am having the same problem due to the different subnets.

I have followed the instructions here but this isnt working either: https://www.home-assistant.io/integrations/sonos#advanced-use