Spotcast to Sonos unreliable

Hi everyone,

I’ve been trying to get spotcast to Sonos running … and succeeded. Somewhat.
And failed at the same time - due to missing reliability.

The intention is to “transfer” whatever is currently playing on my phone over to a Sonos speaker.
The code used to do that is

service: spotcast.start
data:
  spotify_device_id: my_sonos_device_id 

and it works - let’s say from time to time - couldn’t yet figure out any pattern.
When it fails, it gives an error in the log file, stating the device can’t be found.
Doing the exact same call at an earlier oder later point in time works - sometimes.

[spotipy.client] HTTP Error for PUT to https://api.spotify.com/v1/me/player with Params: {} returned 404 due to Device not found

Tried the same on Spotify’s developer console - and it failed there as well, so it’s not spotcast to be blamed - it’s most probably something between Spotify and Sonos…

Did anyone dig into that topic and found a solution that would make “transfering” anything that is being played on Spotify (on the phone) to Sonos work reliably?

Ingo

2 Likes

I have the same issue with the exception that it has never worked. Highly interested in anyone who could solve this issue.

Did you ever find a solution? I’m running into the same problem when trying to restart an interrupted Sporitfy playlist on a Sonos device (Sonos Restore doesn’t work for streaming services). Sometimes it works, but sometimes the device not found error is thrown and spotcast.start can’t execute.

No, as far as i remember I also found that there was some kind of a scheme of preconditions more or less identifiable - depending on that it either (almost) never worked or it (mostly) worked - but I don’t remember the details.

I started to dig into some (Web)API calls - again I forgot most “details”, but I think it was on the Spotify side… and even there I didn’t get it to work reliably.

So to me it seems like the topic isn’t on HA side, and it’s probably even hard to find a workaround in HA (at least for me)

Hi, did someone find a workaround? I received my third Sonos speaker (2 One and a One SL) and it’s annoying I can’t use them with Spotify and HA…