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

Home assistant player with spotify can not be controlled (Works with HA Spotify connection) #2975

Open distante opened 1 month ago

distante commented 1 month ago

What version of Music Assistant has the issue?

2.2.5

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

2024.9.1

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

The problem

While on MA, trying to play a song into a HA provided player does not work. It just starts and stops what was already on the queue (from another service)

Also, if Spotify did not had that player as target before (from the Spotify app), MA does nothing.

Example Right now: HA Home assistant integration:

image

Music Assistant:

image

How to reproduce

Add a Medion device to Home assistant, add it as a player on MA.

Music Providers

Spotify

Player Providers

Home Assistant

Full log output

music-assistant 28.09.log

Additional information

The player is the same as the one on this issue https://github.com/music-assistant/hass-music-assistant/issues/2939. A Mediom Player (Frontier Silicon)

What version of Home Assistant Core are your running

2024.9.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)

OzGav commented 1 month ago

Sorry I am not 100% sure what you are describing above but it sounds like you expect MA and some other software to work together? If so that is not the case. MA works independently of any other software that may be able to play to a device. If this is not what you are asking about then please try and describe the issue again.

distante commented 1 month ago

Hi, sorry if I did not describe it correctly.

My expectation is that after adding a player (from Home assistant provider), I should be able to send Spotify music from using Music Assistant to the player and control it.

Currently I can only click Play/pause when the player is already running already, but each song I "send" is not picked up by the player.

I just put an screenshot of the other Spotify integration to show how there is a discrepancy between what the player is really playing and what Music Assistant is showing.

OzGav commented 1 month ago

What other player types have you tried? Provide all of the information requested from the troubleshooting page of the docs

distante commented 1 month ago

I have done everything I though could affect from the player config, disable TTS, normalization etc, On the music server I also disabled volumen normalization and almost all special settings like cross fade and so on.

I have tried changed all the HTTP profiles and nothing worked.

If you point me out to where I can see more logs I would gladly do it. I setup up the player and providers as log level but I do not see anything helpful.

OzGav commented 1 month ago

Have you confirmed it is only HA player providers that are affected? Have you tried different HA entities?

distante commented 1 month ago

Sadly I just have that one player so I can not test another ones.

But when I provided the same radio with the DNLa provider it also failed.

OzGav commented 1 month ago

If you install the snapcast provider then you can stream to a browser. Why do you mention radio in your previous reply as your original report was about Spotify?

distante commented 1 month ago

Hello again,

Sorry I meant "Radio" as in the Hardware, this Medion one, maybe it is not the correct english word (we use it a lot in Spanish).

I tried with the Snapcast provider and it works correctly there. I can send and control music from Spotify without any issues.

OzGav commented 1 month ago

Sorry to say but fixing HA player providers is low priority. This will stay here for now though.

distante commented 1 month ago

OK understood. Although when I add the player directly also doesn't work.

OzGav commented 1 month ago

If it is a native players then review the docs for assistance then the open and closed issues. If nothing helps then open an issue.

distante commented 1 month ago

The other issue was #2939

OzGav commented 1 month ago

Yeah unfortunately you are using the two most problematic player providers due to their poor standardisation

OzGav commented 3 weeks ago

Just coming back to this one. Have you tried the different HTTP profiles in the advanced settings?

image

distante commented 3 weeks ago

Hello. Yes, I tried it.

OzGav commented 3 weeks ago

So just confirm that you POWER ON the player and then select a track and PLAY NOW and nothing happens? What HA integration have you used to gain access to this device?

edit: Do you see the track appear in the queue in the MA UI?

distante commented 3 weeks ago

when I do that, nothing happens in the player but I see the track in the MA UI as if it was playing.

In HA I am using the Spotify integration it self. One thing I found out in this days, is that calling set source on the HA integration via script does not work due a missing API call. I do not know if that is related https://github.com/home-assistant/core/issues/129122

OzGav commented 3 weeks ago

Have you tried disabling the HA Spotify integration? If Spotify is getting calls from both then that could be the problem.

edit: Disable the Spotify integration, restart HA, restart MA and then see what happens

distante commented 3 weeks ago

That I had not tried, But I tried the Spotify integration itself after MA did not work, there is when I found out it was a MA issue and not something with my account.

OzGav commented 3 weeks ago

OK you can also add the Snapcast provider and try streaming to a browser tab. https://music-assistant.io/player-support/snapcast/

distante commented 3 weeks ago

Snapcast works as expected.

I also notice now that after I was listening into snapcast, I would Play and Stop the music on the other player, but never change or select a song, It just plays what is already there.

OzGav commented 3 weeks ago

I see I have asked this before actually. Sorry too many issues to be across. So yes definately a player problem. What HA Integration is it?

Not sure what you meant in the last thing you wrote above.

distante commented 3 weeks ago

No problem.