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

I’ve also created an issue for last update.

Before this I just needed entity_id and uri to call the service from dev tools.

Now I need also force_playback, random_song, repeat and offset.

Yeah, I see. I guess this is unintended as all values are optional. The fix is easy (and created a PR for it already).

To apply the fix manually yourself:

  • open /custom_components/spotcast/services.yaml
  • look for any instances of required: true and replace by required: false
  • save and restart HA
1 Like

so the issue only occurs in dev tools?

1 Like

Yes. services.yaml describes how services can be called through the UI, but the actual spotcast service is described in the python code.

1 Like

Great! that was easy then. Thank you!

I have two instances of Home Assistant, on one updated Spotcast to 3.5.4 and it’s not working for second Spotify account. On the other HA instance I’m still running 3.5.2. and working fine for both primary and second Spotify account.

Failed to call service spotcast/start. module ‘pychromecast’ has no attribute ‘get_chromecast_from_cast_info’

Just updated spotcast because I have issues all the time selecting sources and playing music and now I get this error when selecting a source.

Update HA.

hello all,

sorry if this has been already discussed, but I have some troubles on getting the this integration work…

here what I have done:

  • Installed main Spotify Integation under HassOS → Configurations → Integrations and included the Spotify keys
spotify:
  client_id: 1f9a........
  client_secret: f104.......
  • Installed Spotcast Integration under HACS
  • added into my configuration file the followings
spotcast:
  sp_dc: AQBH0BE...........
  sp_key: 04...........

sensor:
  - platform: spotcast

and now I am stacked… how do I progress form here? how do I actually play Spotify on my google mini home?

Thank you all

New release today which re-adds support for multi account

how to add keys for other accounts than default when using (in chrome) chrome://settings/cookies/detail?site=spotify.com it jump from incognito to default browser

Try hitting [F12] (or open “developer tools” through the menu) → tab ‘Application’ → Under “Storage”, select “Cookies”

1 Like

thanks . now i found the keys — but it dont seem to work - only my default account.

It works fine here (Spotcast 3.5.7 on HA 2021.5.0b6, with multiple accounts).

Make sure you have the latest Spotcast version.

OK, I´M ON Spotcast 3.5.7 on HA 2021.4.6) I´LL WAIT FOR 2021.5

Hi @fondberg
it is possible to add also media_position and, media_position_updated in a future release? I’m asking because I have a notifier that tts many messages every day and I’m looking for a solution to stop music - play tts and restart music in spotify.

Moreover there’s a way to find out also “who” triggered spotcast (which user)? It would be useful to restart music with same account

look at GitHub - Apipa169/Assistant-Relay-for-Hassio: Send commands (including broadcasts) to the Google Assistant via Home Assistant

That doesnt permit spotify actions

Sure. Open a feature request on github so i can track it.

1 Like

Done!

1 Like