I’ve discovered and installed the Spotify binding. I used the JAR file from this post.
Installation was pretty smooth. And set up of the Bridge and discovery of my Denon AVR was easy.
However, my Sonos devices can’t be discovered using the binding, even is Spotify is streaming to them. The item associated with “deviceName” (on the Bridge) is updated correctly with the name of the Sonos device (and so is Device Type (a speaker) for that matter). But running discovery does not display my sonos. I don’t understand why it works for other devices (Denon, my Smartphone, Echo Dot, computer) but not for Sonos.
I can see information on albumName or artistName perfectly. However, the field “trackPlay” is never populated (not on the level of the Bridge or my Denon AVR). Also writing a value to that item will not trigger Spotify to play that specific number.
And this is unfortunate, because this is the main reason for me to start using the Spotify binding.
The last thing I noticed is that I sometimes get this error message in OpenHAB.log:
2017-10-02 16:44:07.374 [ERROR] [nding.spotify.handler.SpotifyHandler] - Exception caught in anonymous scheduled runnable task. This task will now stop.
java.lang.NullPointerException: null
at org.openhab.binding.spotify.handler.SpotifyHandler.updatePlayerInfo(SpotifyHandler.java:358) ~[?:?]
at org.openhab.binding.spotify.handler.SpotifyHandler.lambda$0(SpotifyHandler.java:273) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
at java.lang.Thread.run(Thread.java:748) [?:?]
If this error occurs, the Spotify binding stops working. Restarting OpenHAB helps.
I have OpenHAB 2.2 (build #1054)
Is there anyone who can help me with one of these questions?
FYI, I also noticed that besides my Sonos devices, also my Chromecast devices are not being found via the Spotify binding (even when they are “online” with the ChromeCast binding)
Ok, I’ve decided to remove this binding. I’ve been getting a lot of “Dispatching event to subscriber ‘org.eclipse.smarthome.core.internal.items.ItemUpdater@30e62445’ takes more than 5000ms.” errors in my openhab.log, it looks like this binding is consuming too much resources.
I downloaded the *.jar incorrectly from github - Binding now works for me. I’ll configure it and see if I get similar issues or have an idea how to fix them!
I’ve tried to test the Spotify binding, but I’m struggling with receiving the access token.
In the readme.md of the binding it says, one must connect and receive the token via “http://openhab.mydomain.com:8080/connectspotify/”.
I’m using myopenhab.org to remotely connect – can anyone help me to understand what would be the correct URL to use to point to my raspi, running openhab please?
Could you please describe how this worked for you? I’m also trying to install the binding by getting the *.jar from github, but so far, no succes… I can’t get the binding to show up in paper UI or in karaf with bundle:list… Any help would be greatly appreciated
Hi, I just started playing with this binding and everything appears to work fine so far! (device selection / player controls / status update: all ok)
But I would also like to retrieve the current access token, there’s a channel for that :
Channel Type ID
Item Type
Read/Write
Description
accessToken
String
Read-only
The current accessToken used in communication with Web API. This can be used in client-side scripting towards the Web API if you would like to maintain your playlists etc.
Source:
In my case the String item linked to this channel remains empty. Is it the case for everybody?
I am using this binding for a few weeks now on my raspberry pi.
But after an hour or two, the updates for song titles and artist stop coming.
I still can use the play and pause button though.
Someone else also experience this problem?
@doum
At my raspberry it will show the acces token.
But i took a while for the binding to refresh…