music-assistant / hass-music-assistant

Turn your Home Assistant instance into a jukebox, hassle free streaming of your favorite media to Home Assistant media players.
Apache License 2.0
1.39k stars 51 forks source link

Airplay to Sonos Move 2 not working #3133

Closed jtonk closed 2 days ago

jtonk commented 2 weeks ago

What version of Music Assistant has the issue?

2.3.2

What version of the Home Assistant Integration have you got installed?

2024.11.0

Have you tried everything in the Troubleshooting FAQ and reviewed the Open and Closed Issues and Discussions to resolve this yourself?

The problem

Can't stream audio to Sonos Move 2 over airplay. It used to work, but suddently stopped working. I'm guessing Sonos updated the software because I didn't change my setup. However Airplay to the Sonos Move 2 via an iOS device works fine.

How to reproduce

select the Sonos Move 2 as the audio device in Music Assistant, play audio. No audio is playing (play button doesn't even change).

Music Providers

Spotify, Streaming Radio

Player Providers

Airplay doesn't work, not as a single device nor grouped. Speaker works fine with the Sonos player provider. I tried switching the setting for compression and encryption, nothing seems to work.

Full log output

music-assistant.log

Additional information

No response

What version of Home Assistant Core are your running

2024.10

What type of installation are you running?

Home Assistant Container

On what type of hardware are you running?

Generic x86-64 (e.g. Intel NUC)

marcelveldt commented 2 weeks ago

Sonos broke this in a recent fw update. It stopped working on the latest gen speakers only, so ERA and Move 2. Other speakers still seem to work fine.

For reference, what stopped working is Airplay 1 lossless RAOP streaming, which is what MA uses to stream audio to airplay targets. Now lets hope they bring it back but I'm afraid they simply dont care.

OzGav commented 2 weeks ago

@marcelveldt Should we then add a note in the docs and close this?

jtonk commented 2 weeks ago

@marcelveldt based on your comment I started looking on the sonos forum and found a topic where somebody had an issue with an Airplay password and combination with Homekit. I then realized I recently added the Sonos to Homekit (not sure why, because HA is so much better :). Removing the Sonos from Homekit solved the problem. Music Assistant and Airplay is now working again for the Sonos. Might be good to add to the docs that Apple Homekit might cause issues with Airplay streaming to Sonos devices.

on a slightly different topic. I'm not apple to control Music Assistant Airplay streams from iOS devices once they are innitiated through Music Assistant, is that a known issue?

marcelveldt commented 1 week ago

Removing the Sonos from Homekit solved the problem. Music Assistant and Airplay is now working again for the Sonos.

Ha cool discovery! Maybe some other folks could try that out to see if it resolved the issue.

I'm not apple to control Music Assistant Airplay streams from iOS devices once they are initiated through Music Assistant, is that a known issue?

That is a known limitation - iOS devices can only control Airplay 2 streams - MA uses the legacy RAOP (airplay 1) lossless audio streaming only towards devices.

jtonk commented 5 days ago

And it stopped working again, not sure why... It can't be HomeKit, as I suggested earlier 😟

marcelveldt commented 2 days ago

Sonos killed lossless AirPlay 1/RAOP streaming on newer models (ERA 100, ERA 300, Move 2, Roam 2, Arc Ultra) in a recent firmware update. There is nothing we can do about that, except maybe nagging Sonos.

marcelveldt commented 2 days ago

@OzGav can we maybe add a note to the docs ? I have already added a warning in the player settings and disable these airplay players by default nowadays. Other Sonos models still work fine