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.21k stars 44 forks source link

Music Assistant doesn't show a song is paused on the frontend #2454

Closed Ay1tsMe closed 2 weeks ago

Ay1tsMe commented 2 weeks ago

What version of Music Assistant has the issue?

2.0.4

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

2024.5.1

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

The problem

Music Assistant's frontend is slow when it comes to updating information from a player. For example, if I pause a track, it pauses straight away on the player but on the frontend UI it still shows that the song is playing. I can't press play again either after this happens. I've also experienced behaviour where I will play an album and the first song from the album will start playing but the frontend UI shows that the second song is playing and that the first song has already been played. Sometimes this fixes after about 1 minute to show the correct playing with the timestamp.

How to reproduce

  1. Play any song or radio
  2. Press pause
  3. Music then pauses but doesn't show that its paused on the frontend.

Music Providers

  1. Spotify
  2. Local and Remote shares
  3. RadioBrowser

Player Providers

  1. Home Assistant Media Player

Full log output

log.txt

Additional information

All my media_player entites that are coming from home assistant are Sonos speakers that have been added to HA through the Sonos integration. Maybe this is the issue, show I remove the Sonos integration from HA and use the Music Assistant one instead?

Also I'm using flow mode because speakers would only play 1 track and then stop if trying to play a queue of songs.

What version of Home Assistant Core are your running

2024.5.1

What type of installation are you running?

Home Assistant OS

On what type of hardware are you running?

Raspberry Pi

OzGav commented 2 weeks ago

Please only report one issue per report.

It is not clear how you are pausing the player if not through the MA UI

marcelveldt commented 2 weeks ago

You should always prefer the MA native player providers over the HA media players. The HA mediaplayers are a last resort if no native player is available in MA but they lack features and often have bugs regarding playback.

Ay1tsMe commented 2 weeks ago

Please only report one issue per report.

It is not clear how you are pausing the player if not through the MA UI

I am pausing it both through the MA UI and through home assistant media player card and they both give the same behaviour

Ay1tsMe commented 2 weeks ago

You should always prefer the MA native player providers over the HA media players. The HA mediaplayers are a last resort if no native player is available in MA but they lack features and often have bugs regarding playback.

I will try the Sonos providor then and see if it resolves any issues.

Ay1tsMe commented 2 weeks ago

Using MA Sonos providor has fixed both play/pause and the skipping track issue.