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.34k stars 50 forks source link

Airplay player cannot start music straight away, delay of up to 30+ seconds #3026

Open zecoj opened 6 days ago

zecoj commented 6 days ago

What version of Music Assistant has the issue?

2.3.0b29

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

2024.10.1

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

The problem

I have a mixture of 1x Denon Amplifier, Sonos speakers and 1x Bose Home Speaker 450. These all have Airplay capability so therefore that is being used for multiroom/whole house setup.

All players behave as expected when played individually or as a group. The Bose, however, takes a good half-a-minute or so time before it starts playing when first sent a queue. It is worth it to note that LMS does not exhibit this behaviour, it will play straight away (also using airplay). I've attached the log which will show from the timestamp of 2024-10-11 13:46:41.766, there's multiple attempts to start the playback but music will only start from around 2024-10-11 13:47:12.870 or so.

Please let me know if more info/log is required. I have tried remove/add/factory reset the Bose.

How to reproduce

Send a queue/play music to the Bose or an airplay group containing it.

Music Providers

Irrelevant, local or Jellyfin both shows the same issue.

Player Providers

Airplay

Full log output

music-assistant.log

Additional information

No response

What version of Home Assistant Core are your running

2024.10.1

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)

OzGav commented 4 days ago

Please resolve this problem first

2024-10-09 21:29:11.081 ERROR (MainThread) [music_assistant.helpers.process] Detected that you are running the (docker) container without permissive access rights. This will impact performance !

see the docs for an updated docker compose. Then look into this

2024-10-09 22:08:28.664 WARNING (MainThread) [music_assistant] Error loading provider(instance) Home Assistant: Cannot connect to host x.x.x.x:8123 ssl:default [Connect call failed ('x.x.x.x', 8123)] (will be retried later)

zecoj commented 4 days ago

music-assistant (1).log Thanks, all fixed, issue persists. Log attached.

OzGav commented 3 days ago

@marcelveldt Thoughts?

marcelveldt commented 1 day ago

I'll have to look into this. Currently swamped in other stuff

zecoj commented 1 day ago

Let me know if there's anything I can help with, like logs, packets capture, etc.