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.
sendCommand(Spotify_Bridge_TrackPlay, "spotify:track:6ybGElyQcnkaMLqy8X3FPL") sendCommand(Spotify_DenonAVR_TrackPlay, "spotify:track:6ybGElyQcnkaMLqy8X3FPL")
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?