Please help me understand how HA can interact with Spotify

Pleae bear with me, I seem to be missing the basics of what is possible. Please help me connect the missing dots.

Step 01:
I have installed the spotify connect add-on and have selected a USB connected DAC as the output.
I can now open the spotify app on my phone, select the HA instance as target and play music. It all works.

Step 02:
I installed the spotify integration, added a media player card to my dashboard and can now see what is playing, I can control the player by adjusting the colume, selecting another output source, pause and play the music. Works perfectly.

Step 03:
I can go to my HA dashboard, select “media” in the menu on the left side, select the spotify media player and browse spotify media, i.e. play playlists. Perfect.

Problems:

  1. If I stop playback, after a while the spotify media player becomes idle and after that moment, my HA instance seems to be unable to do anythign with it.
  2. when going to media, I cannot select the spotify media player anymore and cannot browse through spotify media
  3. I cannot start playing anything via spotify from HA itself, I always need to start playing music from my phone or spotify.com directly and target my HA instance before being able to control playback from within HA
  4. Even if I switch the output back to my phone, the developer tools still show this media_player.spotify_01 as I named it as playing, which kinda makes sense as its playing on my phone but I still don’t fully grasp the concept. i.e. how can I create an automation in HA which starts palying a song or playlist from spotify via the HA spotify add-on at a particular time as an alarm if I can’t change the media player from idle to on or playing?

What you have described are the limitations of the built-in HA Spotify integration.

You might want to check out my SpotifyPlus integration, which is a direct replacement for the HA Spotify integration. It can be installed via HACS, or manually. You can also keep the HA Spotify integration installed, if you want to compare them side-by-side.

Your USB connected DAC should be recognized, if it’s a Spotify Connect enabled device (if the HA Spotify integration recognizes it, then SpotifyPlus should as well). Note that Google Chromecast devices are not supported by SpotifyPlus.

Quick Example - Transfer playback to the “Office” Spotify Connect Player device name.

service: spotifyplus.player_transfer_playback
data:
  entity_id: media_player.spotifyplus_john_s
  device_id: "Office"
  play: true

More Information Links

Hope it helps!

1 Like

Thanks for picking up on my call for help :slight_smile:
I will read the links you provided and check out your integration.

Just to clarify one thing, the USB DAC is being perfectly recognized by HA as a sound output, here is how the spotify connect add-on uses it:

I am going to give it a try and report back here.

Thanks for pointing me to your integration, as you know, all worked very well :slight_smile:

1 Like