Spotify to Chromecast not working

Hi All,

I’ve got the following simple script to cast spotify playlist to my chromecast. This same chromecast works with streaming radio, but not for spotify.

spotify:
    alias: Play Spotify on Chromecast Audio
    sequence:
      - service: media_player.play_media
        data_template:
          entity_id: media_player.woonkamer_audio
          media_content_id: spotify:user:111133427:playlist:6fq24kYOoWcLRamoTn3Lt4
          media_content_type: playlist

I read quite a lot the stream is lost when sending to chromecast. I think I am having the same issue. Any help is welcome

So what does your log say?

Or perhaps you are thinking everyone but you has a crystal ball?

I wish I would have a crystall ball. As you probably notice novice level HA, so help is welcome. Log shows that stream is started, chromcast is switched on but nothing happens, it seems that the stream is not send properly (not sure how to check that). I’ve read more issues regarding that, but don’t know where to go from here

I have tried this in development tools:

{
  "media_content_type": "playlist", "media_content_id": "spotify:user:111133427:playlist:6fq24kYOoWcLRamoTn3Lt4", "entity_id": "media_player.woonkamer_audio"
}

and what I noticed is that the chromecast is initiated, cast starts and immediately stops. Haven’t found any errors until now.

My log doesn’t say anything about this unfortunately.

This is what I try:

image

The link seems to work fine, but nothing happens

There’s a fairly recent issue relating to how spotify handles external requests for playlists. Lots of discussion about how the mopidy kids are dealing with it here: https://github.com/mopidy/mopidy-spotify/pull/188

Obviously, the fact that the pull above is for Mopidy, not HA, isn’t particularly helpful but the issue is the same - Spotify’s external access through libspotify is just not maintained and is probably being intentionally broken.

I imagine if you changed your json to request a track instead of a playlist (ie change the type to music and the id to a specific track) it would work fine…

When it comes to playing Spotify to Chromecast, if you meet Spotify to Chromecast not working issue, you can try another way to do it. Just use Spotify Downloader to download Spotify songs as local files and upload them to Google Play Music to mirror Spotify to Chromecast. Or just use Chrome to do it with ease.

Yea I would suggest you give it a try with the Spotify Music Converter. That’s how I get my Spotify playlist to Chromecast.