spotcast: Cast device not launching properly, but works if timeout is ignored
Bug Ticket
Describe the bug
I am not sure if this is relevant for anyone else, but in case it creeps up other places I decided to create a report as I have a solution if anyone else experiences the same problem. Basically it seems my cast devices has some sort of issue with starting properly. This does not only include spotcast, but also when trying to cast Spotify from the web player. Most of my devices are Chromecast audio, but I also have a few normal Chromecasts. What happens is the app is started (I hear the “startup sound”), but not totally started (on the normal chromecasts, the screen goes black).
Now, what I discovered is that this causes Spotcast to fail because the is_launched property of the SpotifyController class stays false. However, if I ignore that and simply try to start playing anyways everything works fine.
If this becomes a problem, and not just something happening on my setup, it seems it can be fixed by ignoring that is_launched is False.
If no one else experiences the same, feel free to ignore this as I have fixed the issue for myself.
I made these changes to Spotcast, and now everything seems to work for me:
- Spotify_controller.py, line 104 to 106 changed to:
# raise LaunchError(
# "Timeout when waiting for status response from Spotify app"
# )
self.logger.warning("Timeout when waiting for status response from Spotify app")
- Spotcast_controller.py, linje 94-96 changed to:
# raise HomeAssistantError(
# "Failed to launch spotify controller due to timeout"
# )
_LOGGER.warning("Spotify controller did not launch properly before timeout, this might not be a problem")
- Using latest version of spotcast
- Using latest stable version of Home Assistant
- I have setup the Spotify integration in Home Assistant
- I have Spotify Premium
- I am using multiple accounts
- I have renewed my
sp_dcandsp_keyvalues and restarted Home Assistant (see README) - 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
- Installation type: HA_OS
- HA version: 2022.11.4
- spotcast version: 3.6.29 (but I have manually included the fix from 3.6.30)
Configuration
Add your configuration
Service Call
If relevant, provide a yaml of the service call or explain the action taken to replicate the issue.
Additional context
Add any other context about the problem here.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 5
- Comments: 20 (1 by maintainers)
@wautersj same thing here, although looks like there’s a new ticket: #398