Spotcast - custom component to start playback on an idle chromecast device

Thanks! Got the sensor working. Is there someone here that got it combined with the mini media player card? So minimediaplayer together with sources from spotcast (chromecast devices). Please, if there’s someone that can help me in the right direction that would be amazing…

It is still working for me

Playing something in a chromecast device?

I’m sorry I was wrong it’s working on my Spotify connect devices Chromecast is getting error 400

Same error also playing in a chromecast device.
Where to find the spotify_device_ID?
EDIT: Now i get this error only when choosing chromecast devices, but i get for all the devices when i use spotcast.start from the developer’s UI services…

You can just use regular Chromecast card. Or regular Spotify card (that one works on no matter what device is used).

Thanks, but if i use the regular card of spotify, i have a huge card with some playlists only, while using the mini player card, i have a nice designed card but the default spotify (not theone from this spotcast creator), won’t show all chromecast devices at all time.

To get rid of any and all confusions;
Spotcast was developed to start spotify on an idle chromecast device.
It has since gained a lot of functionality but the original function requires a browser based token that spotify themselves use in their web based player (open.spotify.com). This is not an official api and there is no support for it.
That is the only token which has the correct scopes (permissions) to open spotify on a chromecast device.

Spotcast used a library which retrieved the token which now is broken due to changes in
Spotify tech.

Any chance to fix this?

Not until someone fixes the spotify-token library or comes up with an alternative approach.

Sorry to learn about the problems with spotcast. I used this component alot :frowning: Is there any alternative workaround to play spotify on a specific cast device from home assistant?

What are the needed scopes that are not available through the documented API? I had a quick glance at cookies at open.spotify.com and all its neighbors, but nothing jumped out at me as a decodable JWT/oauth style token and I did not take the time to decode all the things and the bearer token retrieved (get_access_token call) and sent to the api is not a base64 encoded JWT afaict.

(The answer here may well be "nothing visible, just under-the-covers-magic that the proprietary black boxes validate by sending it to their servers and getting a response).

argh ! will this not work anymore ? :-/

I get this error after upgrading my HA to 0.109 Hassio.

Setup failed for spotcast: Unable to import component: No module named ‘pychromecast.const’

Spotcast become invalig config. Before I upgrade my HA it was all working.

Please advice…

Make sure you update Spotcast to the latest version. Should resolve this issue.

Hi @fondberg
So i have HA 106.5 version
The Spotcast stop work for me , so i go to git to take update
After the Spotcast update i get same 400 error
The user name and the passowrd its good fo sure

What can be the problem ?

It doesn’t matter what the scopes are named because you can’t add them anyway to the web api login.
I worked at spotify so trust menon that

Read prior posts

So we need to wait for someone fixes the token issue ?

Same issue here. Honestly, I expected more replies, maybe most haven’t upgraded to 109 yet?