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

Airplay volume changes not updated in MA frontend #2823

Open Geweldich opened 2 weeks ago

Geweldich commented 2 weeks ago

What version of Music Assistant has the issue?

2.2.2

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

none

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

The problem

When using Airplay (and perhaps other providers) the volume in MA/the MA frontend is not changed when the volume is changed externally (by a different application/controller/remote).

In my situation: when changing the volume in HA or the Devialet app, both immediately show the changed volume. In MA the volume doesn't change (even after waiting quite a long time).

How to reproduce

  1. Use HA or a different external method to change the volume of the device.

Music Providers

Not relevant (happens with all)

Player Providers

Airplay.

Full log output

No response

Additional information

No response

What version of Home Assistant Core are your running

2024.8.3

What type of installation are you running?

Home Assistant OS

On what type of hardware are you running?

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

marcelveldt commented 2 weeks ago

Music Assistant is an AirPlay 1 (RAOP) streamer, not AirPlay 2. This means that only while streaming (and if the device implements it well), volume changes will be sent from the device to MA. When MA is not streaming to an Airplay device, nothing will happen.

Geweldich commented 2 weeks ago

I don’t completely understand. I am playing music from MA to a Devialet Phantom II. The Devialet app and Devialet HA integration both recognize each others volume changes and the volume changes done by MA. If I’m not mistaken volume changes can also be seen and done on Apple devices in the network.

OzGav commented 2 weeks ago

@Geweldich I believe what Marcel is saying is that those Devialet devices are probably using Airplay 2. MA only supports Airplay 1 which means that volume changes are only sent to MA when MA is streaming music to the device.

marcelveldt commented 2 weeks ago

Better said; if you are streaming audio from MA to a device using Airplay and you change the volume on the device itself, it SHOULD report back its new volume to MA - I have tested this with many devices and it works correctly but I know some device manufacturers have been lazy and didn't fully implement the full AirPlay spec and just limited to AirPlay 2 for metadata/control and AirPlay 1 audio only.

Now I do remember us fixing a bug a few weeks ago in this regard and I'm not sure if this already made it to the stable release. So I'd suggest to wait for the next 2.2.3 release to be sure.

OzGav commented 1 week ago

2.2.3 has been released. Please confirm this has been fixed.

Geweldich commented 1 week ago

The situation has not changed for the Devialet Phantom II in my office. I noticed that when using uPNP volume changes do get detected and when using other AirPlay devices, volume changes do get reported back uniformly. So I guess Devialet cut some corners?

marcelveldt commented 3 days ago

I am afraid so but what you can do is the following;

In the settings for the airplay provider, set the log level to debug. Now start playing something to the player. Control the volume from the device itself a couple of times Now download the full logfile from MA settings --> core modules and attach the file here

Maybe the device is sending some undocumented DACP command.

Geweldich commented 22 hours ago

I will be back home tomorrow. I’ll get back to you.