openHAB integration to Spotify Web Connect API (player)

Hey @pmpkk,

Thank you very much for your great work. Most the things I am currently missing are issues on spotify’s table (real time updates e.g. via websockets or webhooks and the possibility to control all devices that are available in the apps e.g. Chromecast).

One thing however that is not working for me is the persistence. I installed influxdb (together with grafana) and it’s working. But since I didn’t want to track every single item update I wanted to now which items actually have to be saved (and restored after a reboot?).

This is how my influxdb.persist currently looks like:

Strategies {
    everyMinute : "0 * * * * ?"
    everyHour   : "0 0 * * * ?"
    everyDay    : "0 0 0 * * ?"
}

Items {
    spotify_auth_code      : strategy = everyUpdate
    spotify_client_id      : strategy = everyUpdate, restoreOnStartup
    spotify_client_secret  : strategy = everyUpdate, restoreOnStartup
    spotify_access_token   : strategy = everyChange
    spotify_refresh_token  : strategy = everyChange
    spotify_token_expiry   : strategy = everyChange
    spotify_token_issued   : strategy = everyChange
}

But since I have to do the auth dance (http://openhabianpi.local:8080/static/spotify-auth.html) every time after a reboot I think it’s not working correctly. What does your persist file look like?

Regards,
Florian

1 Like