Spotify in combination with chromecast

It works when I do that either from Spotify or from Google Assistant. I was thinking that if I can find a way to trigger an action by REST API in one of the services. Does not have to be complicated, once Spotify switches to the Chromecast devices, I can manage it from Home Assistant.
I have tried in Spotify API, but could not make that work.
And I did not find a way how to make Home Assistant to ask Google Assistant to do that.
Maybe someone here more experienced?

should be a way. WIth spotify connect it works well, with chromecast it does not

Aww just found out this does not work, so sad!

Anyone found a clever solution yet?

Same issue as other users.

I tried your script, but i always get this error:

Error executing service <ServiceCall media_player.select_source: entity_id=[‘media_player.spotify’], source=media_player.salotto_audio>
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/core.py”, line 1002, in _event_to_service_call
await service_handler.func(service_call)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/media_player/init.py”, line 403, in async_service_handler
yield from getattr(player, method[‘method’])(**params)
File “/usr/lib/python3.5/asyncio/futures.py”, line 380, in iter
yield self # This tells Task to wait for completion.
File “/usr/lib/python3.5/asyncio/tasks.py”, line 304, in _wakeup
future.result()
File “/usr/lib/python3.5/asyncio/futures.py”, line 293, in result
raise self._exception
File “/usr/lib/python3.5/concurrent/futures/thread.py”, line 55, in run
result = self.fn(*self.args, **self.kwargs)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/media_player/spotify.py”, line 241, in select_source
self._player.transfer_playback(self._devices[source],
KeyError: ‘media_player.salotto_audio’

How to solve?

Hey all

Just wondering if anyone has solved this? It’s a shame I can’t trigger a spotify playlist to start playing when I get home from work.

Is there possibly a way we can trigger a Google Assistant command to start the playlist instead?

Yes there is a GA in this forum, not the broadcast but the command

So it turns out the command function can’t cast… so back to the drawing board unfortunately.

This is the setup I have been using as well for the last few months, and works really really well.

Does anyone happen to have working Docker images of Mopidy and/or Icecast that can be used for this?

Hi, the GitHub project is offline. Could you please update?

I don’t see an option to edit my original post. Here is the updated link: https://github.com/robwolff3/homeassistant-config/blob/master/packages/playlist.yaml

I’m experiencing the same problem. is there any solution?

I noticed that controlling spotify playlist from HA and using google home as audio output works only if google home is in “spotify mode reproduction”.
I’m not able to tell HA to say to Google Home to start a playlist.

Is this possible or not?

I have one cast-built-in Sony SRS-ZR7 sitting next to my Google Home.
I’ve turned to using tts.google_say on the Sony speaker telling Google Home to do stuff. LOL

3 Likes

I was wondering whether instead of the google_say, the Google Assistant SDK could be leveraged. Does anyone has install and knows whether scripts/REST API calls can be made to the addon?

The best wya I think to get Spotify connected to Chromecast is to use the Spotify to MP3 Converter. Thus, you will be able to syns the Spotify music files to your devices for offline listening and also move to other software. You can then keep the songs from Spotify forever. I like it.

Did you guys try Spotcast?

Was recommended to me here

and from what I read it should work. However I was not able to try it yet becaus of …no time :smiley:

Thanks for sharing! I would like to have a try.Did you heard about the Spotify Music Converter called Tunelf ? my friend had recommended this software to me.

In order to use Spotify with Chromecast, I use the DRmare Windows Music Converter for Spotify. It supports to use Spotify music on any other devices directly with original quality offline. You could give it a try if you are interested in it.