Spotify in combination with chromecast

In short, if I understand this compnent correctly, it isn’t connected directly to Spotify, but rather tells a spotifyclient on a computer or phone what to do.

That spotify client provides a list of available devices to cast to and that list is the problem. Spotify only give home assistant access to the devices that are currently available, if thchromecast is turned of or connected to something else, it’s no longer available for home assistant.

Spotify has to solve this first as far as I can understand…

I don’t think that the component is interacting with spotify connect correctly. It simply deletes available sources at random when switching it seems.

I would recommend to try and play around with something like mobidy as an alternative. It seems a bit more complicated, but as far as I have understood it acts more like a dedicated player - nullefying the whole spotify connect debuggel. I will give it a try in the near future myself :slight_smile:

The component asks Spotify for a list of valid sources (devices) at a regular interval. It shows everything that Spotify says is available.

Thanks, just stumbled upon this and it made me understand how to select the source of a Spotify Connect device :slight_smile:

Your selection of a “random” playlist is also cool!

Interesting information!

It is working with my Phone and desktop when i leave the Spotify app/program on for a period of time.
Unfortunatly this isnt the case for my chromecasts. Hope there will be a way to solve this!

Hi,

When researching a possible solution, I stumbled upon this;


http://mkchromecast.com/

My thoughts are if we can install Spotify on a Pi we won’t be dependent on a computer or phone.
My knowledge of Raspbian and or linux are limited so I’m asking if you think this is feasible?

1 Like

Pretty interesting but it doesn’t look like there is an arm version, right?

I’ve found this on a dutch site, https://eltechs.com/product/exagear-desktop/ From what I understand it enables you to run almost any linux app on a Pi.

Not to beat a dead horse - more than I have already done - but it is simply not true that the spotify component sees what spotify sees in terms of devices. It sees some of the devices and for a limited period of time. This makes the component useless in effect, and nobody seems interested in hearing about it.

@JoramH Here you go.

I would recommend to try and play around with something like mobidy as an alternative. It seems a bit more complicated, but as far as I have understood it acts more like a dedicated player - nullefying the whole spotify connect debuggel. I will give it a try in the near future myself :slight_smile:

Haven’t have time to try it myself yet.

Thanks @GigabitGuy for your input, I guess I’ll have to try Mopidy. Seems like a fun quiet sunday project.

I don’t want to dredge up an old thread but I doubt it’s possible to fix this without having some sort of hook into the Chromecast (a local phone/tablet) reason being is that they are competing standards! (Connect and cast) cast is built as a “2nd screen” whereas connect is more of a streaming client…

…that being said, I have just set up the Spotify component and will investigate (2 casts vs. 1 dot, I need the casts to work!)

Hi,

I can see only my Echo’s as available SOURCE, although I have chromecast audio, chromecast and Google Home.

WHat to do to make those appear in SOURCE?

I have added the following script:

  spotifyweeklyshuffle:
alias: 'Spotify Playlist Mix der Woche zufällig abspielen'
sequence:
  - service: media_player.shuffle_set
    data: 
      entity_id: media_player.spotify
      shuffle: 'true'
  - service: media_player.play_media
    data_template:
      entity_id: media_player.wohnung
      media_content_id: 'spotify:user:spotify:playlist:37i9dQZEVXcKMHncdFiqQ5'
      media_content_type: 'playlist'

but the only thing I can hear on my Google Home Mini is a short “bling” sound and then nothing happens. If I change the media_content_id to a mp4 stream and media_content_type to audio/mp4 it works as it should.
What is the problem with a Spotify playlist here?

Hey guys,

Am I correct in understanding that seeing a Chromecast Audio from the Spotify Connect component is difficult?
I am/was thinking of buying one.

You mean it works with general music, or will it play the playlist?

It works also with Spotify as long as you are or have played something to a speaker recently.
After some time it seems that the possible sources are not visible anymore.
I don’t know how to find out about the alias numbers.

@chimpy Don’t buy a chromecast if you want to use it with HA and the Spotify Component.
I must stress that this is not having to do with Chromecast being bad on the Spotify App, they are great. This is however an issue with the HA Spotify component forgetting (especialy) chromecasts rather quick (even when they are clearly visible in the Spotify App.

@Peleke It some time since I did this, and due to the above mentions issues I dont use it myself, but take a look at this, it should work (if your chromecast is remembered by the component) Spotify Playlist Player

1 Like

Thanks, I think the problem for me is about the bad memory of chromecast players…

Guessing there’s still no way around this? I’ve managed to get it working on my Google Home but only when I am already playing spotify to the device.