Spotify streaming to chromecast

Heyo
So I know there are a bunch of different threads about spotify but belive me I have been searching for ages and hav not found an answer.
What I want to achieve is I want to press a button or a trigger or whatever (not really important) and the my chromecast should turn on and play a spotify playlist.

Now my question(s) :

  1. Is this at all possible provided that I do not use spotify connect ?
  2. How do I get it working with spotify connect
  3. How do I get it working without spotify connenct

What I have tried so far:

  1. Playing spotify on my phone and try to change the source to the chromecast
  2. Setting up Mopidy, connect it to spotify then change the source of Mopidy to the chromecast.

Any ideas ?
Cheers

1 Like

Did you ever solve this? I am trying to do the exact same thing. There is a dedicated spotify component now, but it is really not usable at the moment due to some error spamming and the spotify connect implementation being … funky …

However I just learned about Mopidy, but haven’t tried it yet - how did you get along with it?

Hey man
Yeah I ended up building a Pi music Box (i.e. putting this on a Pi)
Then you can connect your Spotify premium account to it and add the music box as a Music Player Daemon in Home Assistant.
After that you have to remote control it. This isn’t really a problem however you need to find the spotify url or whatever it’s called for the song or playlist you want to remote control. (B.c. you need to somehow tell MPD what you want to play => use the strange spotify url thingies)

I can give you more detailed instructions tomorrow if you need them, because currently I’m not at home.
Cheers

Hi again. I’m am a little uncertain as to how you get the music from your Pi Box over to a chromecast?

HA -> Pi Box -> Chromecast?
or
HA -> Pi Box -> HA -> Chromecast?

Im asking because I’m in the process of setting up Mopidy, but it does not seem like there is any Chromecast support (or ever will be)

Did you ever get this working? Any implementation details you can share?

I believe it is currently not possible.
For anyone thinking about implementing such a system I think it would be easiest to instead of using the Chromecast as a output device use a Linux box (e.g. raspberry pi), put Pi music Box on top of it. You can than remote control the pi music box from home assistant (see the pi music box documentation how this can be used in HA).

So basically you would simply have.
HA —(sends command to play some playlist )–> Pi Box —(via AUX cable connected to some speakers)—> Enjoy the sound

This worked for me and it’s also rather cheap to implement. It is however an additional step and rather cumbersome to build it. In the end, however it works.

In theory, would it work if we had a first-class Spotify player on the local network (that could see the Chromecasts and choose them as “Playing On” destinations)? My understanding is this player would need to be scriptable, as it would need to initiate the Chromecast player selection (acting on instructions from HA). Does anyone know if such a player exists? Android virtualized in a VM? Android tablet + Tasker? CLI Spotify client…?

I have confronted the similar issue about how to play Spotify music on Chromecast. Currently, I found a solution which will help you download Spotify playlist and convert Spotify to MP3. After that, I can listen to Spotify songs on Chromecast easily. For more detailed information please refer to cast Spotify to Chromecast.

Yes its possible. Best way that i can think of would be the Google Assistant SDK running in HA. However, google decided to not allow media playback if your running this not from a google hardware like Google Home. Currently i use a notification service to trigger a tablet that in turn will trigger google assistant (on that tablet) to start playing music on my google chromecast devices.

1 Like

Great solution! Nice work!

In general, there are two ways of Chromecast Spotify. As Spotify and Chromecast work well together well, you can directly connect Spotify to Chromecast from Android / iOS or tablets with your Spotify Connect.
If you don’t have a Spotify Premium, you can convert Spotify files to Chromecast compatible files with the help of Spotify Downloader for Windows. And then cast Spotify to Chromecast via Chrome.