Spotify Lovelace Card

hmm, i also have the INVALID_CLIENT: Invalid redirect URI error
i am using nabu casa
when i try incognito, it links me to spotify page, i fill in user/password, and then i also get error above
what am i doing wrong?

Redirect URIs in my spotify :

https://xxxx.ui.nabu.casa/lovelace/media

OK , NM

i needed to replace /media with /1

two things:

  1. I have released a new version which supports playlists with no poster images
  2. I’ve been busy creating a custom component which can launch Spotify on idle chromecast devices using a more powerful token to start playback from an automation (I will integrate it with this card later unless someone beats me to it). Check it out -> https://github.com/fondberg/spotcast
1 Like

Awesome, this is super useful.

I’ve previously been using Assistant Relay to start Spotify playback on my cast devices but this is a much more streamlined solution, works great so far :+1:

Thank you for sharing this.

1 Like

@fondberg: great work!
pitty that chromecast “groups” dont’t work

I think it needs some extra functionality in pychromecast (also made by HA folks). if you want you can investigate, that would be very helpful

Hi,

Looking at your great card and I’m wondering a bit about the scopes that the .js file is requesting access to.
Why do you need access to all these scopes?
“user-read-private”, “user-read-email”, “playlist-read-private”, “user-read-birthdate”, “user-read-playback-state”, “user-modify-playback-state”

Why do you need access to “user-read-private”, “user-read-email” and “user-read-birthdate”?
Seems to me that you app should be able to do what it does(listing playlists and playing them on connected devices) without needing access to those scopes?

Please correct me if I’m wrong.

(Edit…)
Deleted my Spotify app on https://developer.spotify.com/, edited your .js file to only include scopes “playlist-read-private”, “user-read-playback-state”, “user-modify-playback-state”, and then I re-authenticated with Spotify(The scopes requested now, was only the 3 from the .js file, so the changes was picked up).
All is working fine, I’m able to see my playlists and devices and start playing on the devices, so I’m still wondering why you need access to private account info like email, username and birthday?

ping @fondberg

You are right. Those scopes are not needed. They are there from earlier times when I was tinkering with more functionality.
Can you open a PR for your changes?

Fixed in v1.5

A new release is out (v1.5) which adds support for my new custom component spotcast which adds possibility to start playback on an idle chromecast device. Read the updated README in the github repo

did the update with the custom component updater and now it broken… is the custom component you made also forced,or is it optional? also, please can you set up a correct custom updater setup? https://custom-components.github.io/custom_updater/Notes-for-developers

From error log:

Log Details (ERROR)

Wed May 01 2019 20:09:48 GMT+0200 (centraleuropeisk sommartid)

https://xxxxxxxx.duckdns.org/lovelace/mediaplayers:0:0 Uncaught TypeError: Failed to resolve module specifier “@babel/polyfill”. Relative references must start with either “/”, “./”, or “…/”.

I don’t know how the custom updater works so please install according to the README on the repo. Sounds like you are pulling from src directly which was deprecated in v1.1

i added the guide for developers in the previus post. It becomes a bit of a hassle when your card and component works in other ways the all my other once…

thanks for the quick for for number of playlists!!!

You are welcome to open PRs for any enhancements because I follow the official HA dev docs for these so I have no clue about what you want different.

Also please note that all code and functionality is done on free time on a non paid basis so please roll up the sleeves and help out instead of ask for features

1 Like

Noted, won’t ask for anything again.

Are you trying to use custom updater for the card? You don’t need to as it’s being run from a live version and not one stored in your HA install. Maybe I’m missing something?

i wanted to run it localy stored. But we can let this go now.

How were you able to make this work? I did exactly the same but it is not showing in custom updater.

Hello guys,
I reached this point: https://github.com/custom-cards/spotify-card/blob/master/spotify-card-authenicate.png And I logged in.
I still haven’t connected my Echo to Spotify. Source is empty.
My issue is I that have several PCs, tablet, smartphone and so on and each time I head to HA homepage ( http://10.0.1.102:8123/lovelace/spotify ) It asks me to log In. Exactly that same picture above. I don’t want to log in from every device, I thought it was “inheriting” the login from HA itself.
Is this its behaviour, or…??
Thanks!

EDIT: And also, beside only being able to see my own playlist, would it be possible to use a Search feature in this card or another, that would play any other song or playlist outside of my playlists?