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

I had .4 now .5 I will continue to test and update you on github then. Thanks

ok then the issue you had was normal. Should be fixed with build 5

1 Like

spotcast.play_media doesn’t work for me either so I checked and it doesn’t work with any google home, only with bose and other spotify connect devices it works. Moto probably I’m doing something wrong, I’ll leave that to the more experienced. The beauty of spotcast was being able to wake up google home, I think it’s still possible, it’s probably my problem.

yeah very strange as it is working for me at the moment, any errors in your logs

Yes I find this, but I don’t know how to evaluate these errors, in fact I don’t want to clog up the topic, but I wasn’t sure if it was correct to report it on github

Registratore: homeassistant.components.websocket_api.http.connection
Fonte: components/websocket_api/connection.py:315
Integrazione: Home Assistant WebSocket API (documentazione, problemi)
Prima occorrenza: 16:07:22 (6 occorrenze)
Ultima registrazione: 16:35:48

[140586207973808] Error handling message: https://api.spotify.com/v1/me/player/play?device_id=4f41d83fac0c755864aaa9f29c8c22f9: Device not found (home_assistant_error) Diegocampy from 195.103.18.226 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36)
[140586207973808] Error handling message: https://api.spotify.com/v1/me/player/play?device_id=3d3e9b5ca32bcbedadf89e0715c81c4b: Device not found (home_assistant_error) Diegocampy from 195.103.18.226 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36)
[140586288761008] Error handling message: https://api.spotify.com/v1/me/player/play?device_id=4f41d83fac0c755864aaa9f29c8c22f9: Device not found (home_assistant_error) Diegocampy from 195.103.18.226 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36)

if you have any problem with spotcast, please open a ticket, worst case I’ll tell you its not spotcast fault and where you should be looking for your issue

when filling out the bug request, can you make sure to generate a debug log (instruction in the ticket form) and upload the information?

Thanks for this Felix.
I’m currently testing v5.0.0-b9 and all seems good :slight_smile:
Quick question, using spotcast.play_media, is it possible to resume Spotify from where it previously was ie. not specifying a specific URI?
Thank you

1 Like

you can use the transfer playback feature, that will auto start a paused playback, but if it hasn’t been playing for a while, the playback state is null and that wouldn’t work. That could be a neet improvement to recreate the last known playback state. I’ll check if its feasable

2 Likes

Thanks Felix, I’ll have a play around with the transfer playback feature and see how that works out if Spotify hasnt been used for a while.

I think it’s doable, because spotify plus does it, I use it to activate my Bose with spotify to the spotify music of that precise moment (which wasn’t natively possible on Home assistant)

Just an update on this, I used the transfer playback feature this morning after not using Spotify for a couple of days. It started playing from where it had previously been stopped so seems to work as expected, even after a lengthy period of non use.
Happy Days :slight_smile:

1 Like

I’ve coded the functionality but it’s not released in a build yet. What version are you using?

I was running betav9 but just updated to v13

I’m trying to use prerelise, I’m on the 14th hour installed. I have two spotify accounts logged in with normal spotify, I tried to use them in sopotcast, but I notice that logging them one after the other, the devices of one account overwrite the other, am I doing something wrong or are there problems?

Not a bug, but my mistake, explained here:

How do I picka random song?

this dont work

action: spotcast.play_media
data:
  media_player:
    entity_id: media_player.tv_stuen
  spotify_uri: https://open.spotify.com/playlist/37i9dQZF1DX0Yxoavh5qJV
  data:
    random_song: true

Hi @ha_user22323,

The new key is simply random now. Make sure to read the documentation for the new beta. This new version is a complete breaking change from older version, so keys might be different.

Services - Play Media

1 Like

I’m not able to add spotcast integration not sure why…

INVALID_CLIENT: Invalid client

I tried the exact method from the docs. I tried the incognito way and non-incognito way.

Should I add the integration in Home assistant or just use the configuration.yaml file?

Spent over 2h already can’t seem to add it…

Hi @mmarques

Are you trying to install the v5 beta or the current v4? can you also provide more context on to where you are getting this INVLID_CLIENT: invalid client error. Do you have a specific log, is it when trying to configure from the UI, etc.

If you are trying to install the beta, make sure to follow the development documentation, not the production one. You can find it here.

I had the same issue, you probably have the old Spotcast credentials stored in HA, remove them as described here