SpotifyPlus Integration

@Diegocampy
The SpotifyPlus setup should not have any impact on SpotCast; they are both using the same Spotify player token credentials (via the sp_dc and sp_key values), and both start the player in the same way.

With that said though, I have not tested that scenario; it could be that they are both competing for control of the same device maybe? I wouldn’t think so, as in the end it’s just a Spotify Connect endpoint that is being established.

Anyway - were you able to access your Chromecast devices and play Spotify on them via the SpotifyPlus integration?

1 Like

Hello,
Thank you Todd. Would love your help. I keep getting the following error when choosing “Home Assistant” as the source:

Yes, work fine thanks! Spotcast work (was a temporary error after restart)

1 Like

Hello, i have a question! The Integration recognizes my Chromecast Devices. Look here:

Like “Grupo Casa” and “Grupo Sala”.

How can i play Music with the Integration in a Chromecast Devices?

Thanks!!

@cediqqu
Follow the SpotifyPlus Device Configuration - Google Chromecast Device Support instructions to setup your token.

Then you just select the Chromecast device as your source and it should play.

It works perfekt! Thanks!!!

1 Like

@Bdotan01
Have you configured the SpotifyPlus librespot token file with your credentials.json file contents? Check out the SpotifySplus Config - librespot Device Support wiki document.

There are several examples in that document for the different components that utilize librespot (e.g. raspotify, spotifyd, etc).

Hi Todd. Thank you for replying.
I haven’t seen any mention of that in the SpotifyPlus installation instructions…
I am not very familiar with these things, but, I’ll try and understand what to do from the link.

God bless

1 Like

@thlucas
I finnaly succeeded in creating the credentials.jason file under the .storage folder. now it gives a different error:
Validation error: librespot authorization credentials file (/config/.storage/SpotifyWebApiPython_librespot_credentials.json) did not contain credentials for canonical loginid.

What should I do now? Before you ask - I did insert the client id, secret etc…
This is how the file looks:

image

Sorry to truble you

@Bdotan01
What you posted is not a valid librespot credentials.json file.

What librespot component are you using to host the Home Assistant Spotify Connect device? For example, are you using spotifyd? raspotify? Spotify Connect Addon? SpoCon?

You can use the librespot OAuth instructions to create a credentials.json file. The credentials.json file will look something like this:

[
  {
    "username": "31l77 [REDACTED] qke",
    "auth_type": 1,
    "auth_data": "QVFBOW [REDACTED] 1AydVY="
  }
]
1 Like

I have Spotify Connect installed

1 Like

@Bdotan01
The librespot OAuth instructions are the easiest way to generate the credentials.json file.

Another way is to use librespot-auth, which is more complicated but does work.
Check out the Spotify Connect AddOn librespot Support section of the wiki. It walks you through how to use the librespot-auth program. It requires a little bit of Unix knowledge though in order to build / execute the program.

1 Like

The only action I used in an automation with spotcast I have now managed to move it to Spotify plus like this:

action: spotifyplus.player_media_play_context
metadata: {}
data:
  entity_id: media_player.spotifyplus_xxxx
  context_uri: >-
    https://open.spotify.com/playlist/4ufyQwaLq1MR49KvGRCNAo?si=Qz9AzKoDTUm4uMW7hdTWkw&pi=dPN-U9FxTxS8q
  device_id: Camera Linda`

For now I have disabled spotcast, it seems to work all the same obviously. The next step will also be to disable spotify the official integration and use only spotify plus. Do you see any contraindications in this regard?

1 Like

@Diegocampy
The context_uri value needs to be a Spotify URI value, not a URL value like you have shown.

It should look like this:

context_uri: spotify:playlist:4ufyQwaLq1MR49KvGRCNAo

1 Like

@thlucas
I had this doubt, I tried it anyway and I saw that it works

@Diegocampy
Wow! You are absolutely correct, it does work.
Thank you for teaching ME something today. :smiley:

I never would have thought a URL would work, as it’s not documented in the Spotify Web API. I will make a note of that in the wiki documentation.

Thanks again!

1 Like

HI! I’m very sorry because I’ve been trying to configure the integration for months, but I just can’t. I have a premium spotify account, it’s set up and via spotcast I can play music on my devices. I would like more and this integration would be perfect. I’ve already tried putting it on and taking it off so many times but I just can’t figure out where I’m going wrong. All the sensors it creates for me return “no data” or “no recent…” etc. I can’t find the Service Options Form that is explained in the wiki. I also created a separate project on spotify developer but nothing. Could someone with a lot of patience help me? thank you very much

1 Like

@Mekki86
Are you sure you are talking about the SpotifyPlus Integration and not the spotify_plus integration (note the “_” underscore)? They are 2 different integrations. SpotifyPlus integration does not create any sensors.

You’re absolutely right, I feel so stupid! In my defense I can say that in my HACS they only differ by one space! :slight_smile:
Sorry again

@Mekki86
Not a problem.

Just so you are aware, the SpotifyPlus Integration can do everything that the HA Spotify integration can do, and it supports both Sonos and Google Chromecast devices (Spotcast not required). You can also use the same Spotify developer account Client ID / Secret that you created for the HA Spotify integration if you want.

There is also a Spotify Card user-interface that contains a media player, and allows you to manage your Spotify favorites as well as search the Spotify catalog. You have to install the SpotifyPlus integration first though, and get it configured before you can use the SpotifyPlus Card.

Check out the SpotifyPlus Integration wiki Home page for an index of topics including installation instructions, how to configure the integration using Device Configuration Options, as well as the custom Services Provided.

Hope it helps!