Hello
I’m running HA behind a reverse-proxy (Traefik). HA is attached to a docker bridge network (not host). It’s working fine. I managed to get it to discover my Sonos speaker. However, I am unable to stream audio files from HA.
I can control the speaker from HA.
How can I diagnose this? What port, protocol and type of traffic would HA be using to stream the audio to the speaker?
Although the doc is not consistent (it speaks of host but then provides an example without)…see below… I have tried many integrations with/out ‘host’ and mostly ‘host’ resolved the issues. One can ofcourse trace all the ports and all but the question would be ‘why-not-host’ … likely dozens of people are against but also HA recommends host. try it?
I’m using the Sonos integration. I can stream audio using upnp from an app on my phone but not from HA. The file has been manually uploaded to HA via the UI and is under Media.
I also tried Music Assistant. I added my Navidrome installation as a source using the Subsonic API and I can see the music as well as the Sonos but when I hit play nothing happens. No error messages in the log for neither HA nor MA
Hi guys. I could not get the Sonos to play anything from neither HA nor MA using all sorts of settings including macvlan for MA to no avail. Kept getting an error
Failed to perform the action media_player/play_media. Error calling SonosMediaPlayerEntity._play_media on media_player.symfonisk_01: UPnP Error 701 received: Transition not available from
I gave up and returned the Sonos.
I looked at trying to pair my HA running on RPi 5 to pair with a BT speaker and use that. That was even harder than getting the Sonos to work.
Did you only use macvlan for MA?
OR
Macvlan for MA and HA?
File is on HA server and ultimately that is what it will connect to.
Sorry but it occur to me that HA will pass the “local network” address to device for reteieving file. You needed to ensure Sonos or any device can access the file.
Normally there is some log that will show you where exactly Sonos is failing. My guess is it cannot reach network address provided and the log would show that.
Ultimately you return Sonos so I only put this for anyone who may have similar problem.
I put the MA on the macvlan and connected it directly to my Navidrome instance to stream data directly from its macvlan LAN address in the 192.168.x.x range and I still got the same 701 error from the Sonos.
It’s a huge disappointment as all the searches I made seemed to indicate a problem with the Sonos not being able to play the file somehow.
Here’s the issue raised by someone on Github albeit under HA but it’s the exact same error that I’m getting from both HA and MA even when MA was connected to the macvlan.
That error usually indicates that the speaker is unable access the URL to play the media. If you are using the Sonos Integration, turn on debug logging and the integration will log the URL that is being sent to the speaker to play. From that we can determine what the problem is. It’s likely a network configuration issue.
I really liked my IKEA Symfonisk speaker and wanted to give it another go so I bought them again and actually managed to get it to work albeit with Music Assistant.
Would it be OK to post the solution here despite it being for Music Assistant and not strictly Home Assistant? I am using the Music Assistant integration to music playback on the Symfonisk.
I went back to basis and removed Traefik and the IoT network out of the equation to see if it would work with Music Assistant.
It worked brilliantly.
Then it was a case of trial and error to see what does and doesn’t work behind Traefik. The solution was to add a new entrypoint to Traefik and have a router associating the Music Assistant container labels.
I also set up an mdns repeater container to forward mdns traffic to the MA docker bridge.
mDNS Bridge:
# Service used to bridge mdns between LAN and docker bridge
mdns:
image: yuxzhu/mdns-reflector:latest
restart: unless-stopped
hostname: mdns
network_mode: host
command: mdns-reflector -fnl info -- eth0 br-e5250e7ab921
In Music Assistant, I configured the Streaming server to use 8098 (default) and to advertise the host IP i.e 192.168.1.10 (not the container IP)
I also moved the Symfonisk to my IoT subnet and used avahic-daemon in my router to forward mDNS traffic between them and then allowed the Symfonisk IP to access the Music Assistant host IP on the following ports: