It is nice to see that the binding is updated!
I am also very happy that the album image is now embedded inside the binding.
Unfortunately the binding has a bug at my OpenHAB.
The data is only updated when a track is started/paused or skipped from within openhab.
When Spotify is controlled form elsewhere (e.g. my pc) the data (title, artist and stuff) isnât updated.
Also the player bridge keeps switching between online and offline as I can see in the log. I hope you can help me with it, if you need more information about the bug I would like to hear it!
Also I really miss the custom Spotify request which was available in version 2.2.0, because I use this to retrieve a list of my playlist into openhab. Is there a reason why you deleted it?
It should update the track info when controlled from elsewhere, this might indicate it doesnât poll correctly. And might be related to the bridge switching on/off. Can you run it with log level DEBUG and see if that gives any more details. If you had an earlier version you might try cleaning the cache.
Iâm not sure what you mean with the custom Spotify request I donât think I removed anything. Iâve only set the trackPlay channel to advanced. Meaning it doesnât show up by default in PaperUI if you add it. But you can enable it by configuring it in the edit mode of the item in PaperUI under channels Show more. Can you give me some more information on what you mean?
I will try the logging tomorrow and let you know if I can find anything. About the cache, which one and how can I delete it, because I just removed version 2.2.0.
In version 2.2.0 (they were already removed in 2.2.3) there were two items named âCustomRequestâ an âCustomReplyâ. With the custom request you could make an API call to the Spotify servers for things like playlist information or more detailed information about an album (depending on the request).
The json answer from the server then was stored in customreply. With these 2 items it was possible use every api function of the api without them being in the binding.
I hope it is more clear this way.
Otherwise let me know.
The cache is the folder in the samba map openhab2-userdata/cache. You can remove/empty the cache folder (you might need to stop openhab to make it possible)
Iâll check the history of the binding development to see if I can find it back and see why it was removed.
Try first cleaning the cache and if that doesnât resolve the issue enable debug.
I canât find anything about it. In the pull request history, which I continued developing I canât find no such channel. On the other hand itâs still possible to do something like this. There is the acccessToken channel which can be used to construct a query, possible via exec or http binding (not sure which, havenât used them). In this thread you can find other people doing this. Although this might run into scope rights. I changed the default access scopes requested by this binding to only what is needed by the binding itself. So it wonât ask for access to read private playlists. This might be a cause of the problem?
I cleane the cache
Sometimes the sync. continues. Sometimes not, so I will try it with the debug editor.
Nice function though that the song progress keeps track!
Hmm, weird, I really used it until yesterday haha.
Can send you version 2.2.0 if you want to see it?
Otherwise I will use the exec binding with curl or something indeed.
This can give problems for that yesâŠ
Can I change the default scope if I want?
Hmm, weird that the code has no components in it for this function.
As specially because it worked very well.
But a function the retrieve things like playlists and the url of the album picture would be really usefull.
Would be nice if that can be a setting or just ask permission for all player related things.
I have debugged the binding and received an unexpected error during poling (in info log)
I will send it to you in a private message.
An update on the Spotify binding (new jar available at the same place as before):
Added playlist channel that is propagated with the state options of the playlists and will show the name of the playlist in case a playlist is being played.
Changed deviceName channel. It will is also propagated with the available devices and can be used to transfer play to another device by setting the Spotify device id as string argument (id is key, name is value).
Internally Iâve rearranged the code to be (more) compatible with the new OAuth2 interface of ESH. But since the ESH implementation would required some changes to work the ESH interface is not used (and would also make it impossible to use the binding with older version of openHAB). There need to be some updates to the documentation and some readability and therefor these changes are not yet pushed to the pull request.
With the deviceName channel changes itâs looks like the need for a thing for each specific player is not really adding any value. Everything can be done from the bridge thing I think. So Iâm doing some more research if these player specific things are needed anyway, and if possible just remove them. So if you have any opinion about it let me know.
Hi @hilbrand, Iâm looking forward to give your Spotify binding a try. Unfortunately I seem unable to install it, using manual (configuration files and Karaf console).
I copied the jar file to the addons directory and it did not get picked up. I did make sure to set the rights correct. The OH daemon is running under openhab user and the file has RWX for that user and is owned by that user and group:
:/opt/openhab2/addons# ls -al
total 100
drwxrwxr-x 2 openhab openhab 4096 Oct 17 17:30 .
drwxr-xr-x 6 openhab openhab 4096 Oct 14 22:13 ..
-rwxrwxr-x 1 openhab openhab 85154 Oct 17 17:46 org.openhab.binding.spotify-2.4.0-SNAPSHOT.jar
-rw-rw-r-- 1 openhab openhab 70 Oct 12 15:30 README
When trying to install manually in Karaf console with bundle:install org.openhab.binding.spotify it gives an error:
It should pick up the binding directly if you place it in the addons folder. If I type the commands you mentioned I get the exact same message, and on my system the binding is installed. What version of openHAB are you running? Possible clear the cache and see if that makes a difference. Or try installing another binding in the addons folder and see if that gives the same problems. See what bundle:diag and/or bundle:status gives are result.