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.31k stars 48 forks source link

Not able to group multiple players #2798

Open timbeckss opened 3 weeks ago

timbeckss commented 3 weeks ago

What version of Music Assistant has the issue?

2.2.2

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

2024.8.1

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

The problem

When I try to group multiple HEOS Speakers (2+), which are integrated through the Home Assistant plugin, I only get a group of two. If I select a third one the other one gets kicked out of the group. It doesn't throw any errors in the log.

Music Assistant – Home Assistant und 15 weitere Seiten - Persönlich – Microsoft_ Edge 2024-08-24 00-52-35

Using the grouping feature of the devices that are imported through Airplay works fine. In the HEOS App you can see, that grouping the Airplay devices doesn't actually create a room but plays synced streams on each devices.

How to reproduce

  1. Integrate the speakers through Home Assistant Media Player Plugin
  2. Try to group more than two speakers

Music Providers

Not working:

  1. Home Assistant Media Player

Working:

  1. AirPlay

Player Providers

Not working:

  1. Spotify
  2. Soundcloud

Full log output

home-assistant_mass_2024-08-23T22-58-48.571Z.log

Additional information

No response

What version of Home Assistant Core are your running

2024.8.2

What type of installation are you running?

Home Assistant OS

On what type of hardware are you running?

Alternative

OzGav commented 3 weeks ago

Why do you want to group HA media players if you can group the Airplay ones?

timbeckss commented 3 weeks ago

For me Airplay has a way bigger delay and some random sound dropouts from time to time.

OzGav commented 3 weeks ago

We will be more interested in that than trying to fix a universal group of HA players but this will get looked at eventually

marcelveldt commented 3 weeks ago

For me Airplay has a way bigger delay and some random sound dropouts from time to time.

Airplay has a bit of delay at stream-start (1.5 to 2 seconds) but should then be buttery smooth. Do you still have those dropouts in the last release ?

As for the grouping of the HEOS speakers, what happens if the stream is already playing and you group them in Home Assistant ? Does that work ?

timbeckss commented 2 weeks ago

Airplay has a bit of delay at stream-start (1.5 to 2 seconds) but should then be buttery smooth. Do you still have those dropouts in the last release ?

Yes in a 3 minute song i have like 3 to 5 one second dropouts. Sometimes it's worse.

As for the grouping of the HEOS speakers, what happens if the stream is already playing and you group them in Home Assistant ? Does that work ?

If the music plays on one speaker and I use an automation to group them: yes that works. The players get grouped correctly and the music continues without stopping.

marcelveldt commented 2 weeks ago

Yes in a 3 minute song i have like 3 to 5 one second dropouts. Sometimes it's worse.

Sounds like buffer issue - Airplay sends lossless PCM or ALAC by default so its a bit demanding on bandwidth, while sending audio to HEOS with HA will send mp3 compressed audio by default. Did you leave compression on in the Airplay settings ?

If the music plays on one speaker and I use an automation to group them: yes that works. The players get grouped correctly and the music continues without stopping.

OK, thanks. I'll review the implementation between MA and HA then

timbeckss commented 2 weeks ago

Thanks for your time and effort!

Sounds like buffer issue - Airplay sends lossless PCM or ALAC by default so its a bit demanding on bandwidth, while sending audio to HEOS with HA will send mp3 compressed audio by default. Did you leave compression on in the Airplay settings ?

I'm not sure whre to do that. Is it a MA setting or inside the heos app?

OzGav commented 2 weeks ago

In the MA settings for the player

OzGav commented 1 week ago

@timbeckss please provide some further information regarding the effect of changing the compression setting

timbeckss commented 1 week ago

Sorry for the delay.

The audio compression is still turned on. The dropouts happen on any device (Home 150 & AVR Receiver) no matter whether they are connected through WIFI or Cable. It doesn't matter whether they are grouped or not.

dunxd commented 1 week ago

Having some airplay dropout issues and found this.

Did you leave compression on in the Airplay settings ?

Is this question also a suggestion that dropouts are less likely if compression is enabled or disabled? Or is it just a question?

BTW I have compression enabled and getting dropouts. They may be caused by a patchy WiFi signal where the speaker is located.

OzGav commented 1 week ago

If the dropouts are due to network congestion then compression ON should help