Playing on chromecast devices doesn't work
See original GitHub issueDescribe the bug
I couldn’t play to chromecast devices. I set everything up according to the README: spotify integration, spotcast, lovelace-spotify-card. So I checked issues #182 and #174 and followed the steps in there. I re-started the setup then and only used one account.
Reporting this here since it seems to be a spotcast issue, not of the spotify-lovelace-card.
I see this in the logs:
Error executing service: <ServiceCall spotcast.start (c:8780b51c4b820d07593395d2c811c809): uri=spotify:playlist:37i9dQZF1DWUJiNTfqDwyS, force_playback=False, random_song=True, account=daften, device_name=Office speaker, start_volume=101, repeat=off, shuffle=False, ignore_fully_played=False, offset=0>
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/core.py", line 1507, in catch_exceptions
await coro_or_task
File "/usr/src/homeassistant/homeassistant/core.py", line 1530, in _execute_service
await self._hass.async_add_executor_job(handler.job.target, service_call)
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/spotcast/__init__.py", line 143, in start_casting
spotify_device_id = spotcast_controller.get_spotify_device_id(
File "/config/custom_components/spotcast/spotcast_controller.py", line 202, in get_spotify_device_id
spotify_cast_device.startSpotifyController(access_token, expires)
File "/config/custom_components/spotcast/spotcast_controller.py", line 84, in startSpotifyController
sp.launch_app()
File "/usr/local/lib/python3.9/site-packages/pychromecast/controllers/spotify.py", line 87, in launch_app
raise LaunchError(
pychromecast.error.LaunchError: Timeout when waiting for status response from Spotify app
I also see this right after a restart of hass and me probably reloading the dashboard too early:
2021-08-23 01:32:33 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [547426358368] Received invalid command: spotcast/devices
- [ X ] Using latest version of spotcast
- [ X ] I have setup the Spotify integration in Home Assistant
- I am using multiple accounts
- [ X ] Using latest stable version of Home Assistant
- [ X ] I have Spotify Premium
- [ X ] I’m attaching relevant logs with level debug for component spotcast (see README)
- I’m using entity_id in the service call and have tried device_name but the issue remains
Environment (please complete the following information):
- HA version: [ 2021.8.8 ]
- spotcast version: [ 3.6.14 ]
Configuration
# Spotify
spotify:
client_id: !secret spotify.client_id
client_secret: !secret spotify.client_secret
# Spotcast
spotcast:
sp_dc: ''
sp_key: ''
accounts:
daften:
sp_dc: !secret spotcast.daften_sp_dc
sp_key: !secret spotcast.daften_sp_key
Additional context
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:6
Top Results From Across the Web
Chromecast not working? Try these 9 simple fixes | WhistleOut
Chromecast not working? Try these 9 simple fixes · #1: Check Your Wi-Fi Network · #2: Use the Chromecast Extender · #3: Move...
Read more >Chromecast Not Working: 10 Easy Fixes [2022 How-to Guide]
1. Check Your WiFi · 2. Make Sure Your Mobile Device and Chromecast Are on the Same Network · 3. Change Your Power...
Read more >Chromecast not working? Here's how to fix it! - Android Authority
When your Chromecast isn't working, you should first try rebooting the device. The easiest way to do this is the tried and true...
Read more >Troubleshoot Chromecast connection - Google Support
Troubleshoot Chromecast connection · Make sure your mobile devices and Chromecast are on the same Wi-Fi network. · If your router supports both...
Read more >How to Fix It When Chromecast Isn't Working - Lifewire
How to Fix a Malfunctioning Chromecast · Restart the Chromecast. · Reboot the router. · Reboot the computer, tablet, or smartphone. · Use...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Some more info I just noticed. It seems spotify does try to connect to the chromecast device, but it just never starts playing. I can see this because the card for the cast player I have next to this, shows spotify connected to it at the time I tried to play a playlist.
#244 works for me too, closing this 😃