Closed TheMrDec closed 9 months ago
I have the same problem for quite a while now. Timed start fails, doing a manual restart works.
My errors vary between a 403 and 502:
http status: 403, code:-1 - https://api.spotify.com/v1/me/player/volume?volume_percent=50&device_id=xxxxx: Player command failed: Restriction violated, reason: UNKNOWN
http status: 429, code:-1 - /v1/me/player: Max Retries, reason: too many 502 error responses
Try removing the force playback command, it might clause problem if the player is already in an activity.
Basically restriction violated means your query to spotify api is impossible. Since spotcast only has one service, if your options are not set correctly you can make the service call fail
Well, I did two things that fixed the issue. First, I moved the automation to cut playback of the ambiance sounds to Google Home.
Second, I moved the automation to cut playback to 04:00
So this is not a Spotcast issue, and is like not even a Spotify issue. Its either a Google software limitation, or a hardware bug of some sort.
I really ought to just get SIP addressing fixed on my network and get these damn Google devices out of my house . . .
Bug Ticket
Describe the bug
Over the past few weeks, Spotify has been returning a 403 when trying to start playback on my Google Home Mini using a time based automation. Curiously, running the automation manually at an arbitrary time does not return this error. As such, troubleshooting has been nearly impossible.
Troubleshooting
Versions; Spotcast and HA are up to date Spotcast v3.7.1
Spotify Integration in home assistant is working Secrets are valid, though I did redo the setup process completely with no change I have Spotify Premium and am using only one account in HA I am using Entity ID in the service call. I have tried Device ID and Device Name with no change
Environment
HAOS - 10.5 HA Supervisor - 2023.09.2 HA Core - 2023.9.3 Frontend - 2023.09.11.0 - latest
Configuration
Service Call
If relevant, provide a
yaml
of the service call or explain the action taken to replicate the issue.Logs
normal, debug has been enabled going forward
Additional context
As I said in the open, if I run the task manually at an arbitrary time, it works flawlessly. The only conflict I could think of is that I use the same speaker to play some ambience to fall asleep using Google's built in functions but I have this set up to stop at 05:30. This wasnt an issue prior but I do see entries in the logs when trying to stop the playback in HA now. I am going to try rolling that action back to 04:00 to give more airgap between that and spotcast.