openHAB integration to Spotify Web Connect API (player)

Thanks @pmpkk ,
great work for this tutorial. I could keep it running :heart_eyes::heart_eyes:

OpenHab enthusiasts, has anybody solved the keep alive issue of Spotify devices? I tried to implement a rule that sends a volume command to the device every hour but still the device goes offline over night (my intention is to develop an alarm clock that plays music over a spotify connect device).
Thanks!

Hi Alan i assumed you used rules to do this, do you have examples of sending commands in rules to spotify_action, such as play with a URI because its not documented anywhere. Ive tried about 10 different ways, all fail.

I have reached this stage:
“Give the client id and secret to OpenHab”
how do I do it?

These question was never answered, and was looking for this.
Late but better than never, yes you need premium for playback function (start/stop/pause/,…), see:

https://developer.spotify.com/documentation/web-api/reference/player/start-a-users-playback/

a 403 FORBIDDEN response code will be returned together with the PREMIUM_REQUIRED reason.

1 Like

I have this problem when using the Spotify Binding too, but if you have other devices like Alexa or a Streaming System like Raumfeld then you need to start playback from there and voila, the binding is responding again.

Is it possible to control spotify on my sonos one and sonos play 1 as well?