SpotifyPlus Integration

@Sofa_Surfer
UPDATE - hold off on this, as Spotify has made some unexpected changes (again!) that is affecting functionality. I have created GitHub Repository Issue # 112 that will provide updates as more details are uncovered.

The Could not select source. Not found message indicates it cannot find the specified device id. Adding the SP_DC and SP_KEY values should have made things better, not worse.

Questions / Thoughts

  1. What version of the SpotifyPlus Card do you have installed? Changes were made with v1.0.49 (2025/04/24) that use the device id instead of the device name to transfer playback. I’m wondering if the LinkPlay changes the device id when the player goes into idle state.

  2. What version of the SpotifyPlus Integration do you have installed?

  3. Regarding Sonos, did you follow the steps in the OAuth2 Token for TokenType=Authorization_Code Devices wiki guide? This is only required for Sonos device re-activation when it has went into idle mode.

  4. If you are using the SpotifyPlus Card, do you have the deviceDefaultId option set in the card configuration? If so, what is the value for that option?

  5. As for the LinkPlay issue, I would need a SmartInspect Trace to figure out the issue with that since I don’t have a LinkPlay device to test with. Check out the Tracing HA Integration Components wiki doc for how to set that up. Once you have it setup and the smartinspect.cfg installed, restart HA and run your tests up to the failure point. You can then send me the trace file via a DM message - do not attach the trace file to this community forum post, as it contains sensitive information.

As of 2025/05/07, it appears Spotify (the company) has disabled the ability to utilize the Spotify Web Player Cookie Credentials (e.g. SP_DC and SP_KEY) authorization token when sending commands to their Spotify Web API.

Expect limited / broken functionality in the integration until (IF?!) this gets resolved.

I have created GitHub Repository Issue # 112 that will provide updates as more details are uncovered.

And thanks again to @Spotify for pulling the rug out from under us!

This is disappointing, in that Spotify continues to limit functionality for its Premium content subscribers. Home Assistant users are not trying to steal company data or train AI models; we are simply trying to play our music and control our devices via home automation routines.

2 Likes

I can’t believe that today I updated my config and on the same day Spotify make a big change… Is it my fault?? :rofl:

@Sofa_Surfer
LOL. Nope, not your fault - just Spotify being Spotify, and making changes without informing anyone.

2 Likes

shot dummy question, so does this integration same like spotcast?
i dont know the exact different, sorry for that stupid question

@stephanschleichstr13
Yes, it will re-activate Google Chromecast devices and much more than Spotcast. But it appears Spotify made some unannounced changes yesterday that has broken functionality. Per the post earlier …

As of 2025/05/07, it appears Spotify (the company) has disabled the ability to utilize the Spotify Web Player Cookie Credentials (e.g. SP_DC and SP_KEY) authorization token when sending commands to their Spotify Web API.

Expect limited / broken functionality in the integration until (IF?!) this gets resolved.

I have created GitHub Repository Issue # 112 that will provide updates as more details are uncovered.

1 Like
action: spotifyplus.player_media_play_context
metadata: {}
data:
  entity_id: media_player.spotifyplus_xxxxxxxx
  context_uri: >-
    https://open.spotify.com/playlist/4ufyQwaLq1MR49KvGRCNAo?si=Qz9AzKoDTUm4uMWxxxxxxxxxxxx
  device_id: Camera Linda
enabled: true

Thanks for the info, this action of my script is also linked to this Spotify problem.
Until the day before yesterday it worked, so I ask.:sweat_smile:

@Diegocampy
Is the device_id: Camera Linda a Google Chromecast device? If so, then it will no longer work due to the Spotify changes.

I tested the following with my Bose and Sonos devices and it worked fine:

action: spotifyplus.player_media_play_context
data:
  entity_id: media_player.spotifyplus_todd_l
  context_uri: >-
    https://open.spotify.com/playlist/4ufyQwaLq1MR49KvGRCNAo?si=Qz9AzKoDTUm4uMWxxxxxxxxxxxx
  device_id: Bose-ST10-1
1 Like

Oh wow, they did it again. I can only imagine how frustrating it must be for you as a dev trying to work around this kind of sudden changes.

Last year, I spent hundreds of hours building my dream features with your awesome integration like smart playlists based on specific tracks, which actually introduced me to new music instead of just recycling what I already knew. For about a week, everything worked perfectly and it genuinely reignited my love for music. Then they pulled the “track recommendations” feature, and just a few days later, introduced a song radio feature that’s honestly a huge step backwards. It’s incredibly frustrating, especially knowing what’s technically possible :confused:

Anyway, has anyone had better luck with services like Qobuz or Tidal in this regard? Do they support more flexible or automated playback options? Or is it time to go back to collecting MP3s like we used to?

2 Likes

Not really a Chromecast, but a Google Home Mini. I think that was the meaning😔. it was the most useful thing for me to start my daughter’s lullaby in the sleep linda script obviously the same action done with Spotcast does not work for the same reason even a script up in my bose doesn’t work, I still have to investigate what the reason is for that. Thanks as always

@Diegocampy
Yes, Google Home Mini uses the Google Cast technology to initiate Spotify play on the device. As you stated, it is also affected by this Spotify change.

1 Like

Might not be a fix for everyone, but if you own a Chromecast with Google TV (or the new TV streamer propably) and used that to start casting to (which is now broken afaik), you can install the Spotify app on it. That does work as a device to transfer to and will start playing music on the Chromecast. Guess because it uses the Spotify Connect protocol instead of Google Cast. You will have 2 devices with the same name (but different ID) in Spotify as a result in some cases, which shouldn’t be a problem anymore in the latest version :slight_smile:

1 Like

FYI - just released a new version of the SpotifyPlus integration.

Be sure to check out the SpotifyPlus Card Dashboard as well.

As previously mentioned …
As of 2025/05/07, Spotify (the company) disabled the ability to utilize the Spotify Web Player Cookie Credentials (e.g. SP_DC and SP_KEY ) authorization token when sending commands to their Spotify Web API.

I was able to restore the ability re-activate Google Chromecast devices, but it requires some (fairly) advanced configuration (running a Python script, and modifying a JSON formatted file). Follow the steps in the Spotify Desktop Player Authentication Configuration guide to enable this functionality. Note for Sonos users - this is the same script / modification that you ran for your Sonos setup. If you have Chromecasts, you should not have to run it again.

Wish I had better news, but I’m at the mercy of the Spotify Developers on this one.

[ 1.0.123 ] - 2025/05/12

  • Restored ability to activate Google Chromecast devices from idle / sleep state. Follow the steps in the Spotify Desktop Player Authentication Configuration guide to enable this functionality.
  • Removed Spotify Web Player credentials from integration configuration options. These credentials were disabled by Spotify for use with the spotify Web API on 2025/05/07.
  • Removed extra state attribute sp_user_has_web_player_credentials.
  • Updated underlying spotifywebapipython package requirement to version 1.0.207.
1 Like

thanks for your great work. Your notification with this post reaches me before hacs realizes that there is an update. I will definitely try the script, because it was the most important thing for me, to be able to launch specific measures in Google Home. I am surprised that something so trivial is not natively integrated. Luckily you are here!

1 Like

My inexperience forced me to use a lot of time, but thanks to the help of GPT chat to ask for confirmation on the passages unknown to me, I succeeded and everything works. Thank you

1 Like

Hi @thlucas,

I just wanted to extend a heartfelt thank you!

Spotcast had stopped working a few days ago, and that meant no more musical wake-up calls for my daughters. After spending countless hours testing, troubleshooting, and experimenting, I finally came across your integration—and it made all the difference.

As a daddy, this means the world to me. Thank you so much for your work!

2 Likes

I also went from Spotcast to SpotifyPlus and with the help of Chat GPT and a bottle of Red Wine after some initial struggles with Homebrew (somehow it installed the Intel and not the A
RM version) I succeeded.

Im happy to have the ability back to play music on my chromecast devices. At the same time I‘m worried about the direction Spotify is heading to.

Thank you so much for your work.

Rene

1 Like