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