Hi everyone! I have some issues with Spotify Bridge, I just installed it yesterday but didn’t get it to work as should, the problem is that through Paper UI the Spotify Player Bridge doesn’t control anything, just receives the information about the track, playlists, duration, connected devices etc, but I can’t control anything through it, and can’t understand why. Log look ok without errors.
I don’t think this feature is supported for free accounts, but apparently you can get the status. I think this changed, because I if I remember correctly that wasn’t even possible.
You can debug with log:set DEBUG org.openhab.binding.spotify
2019-11-28 22:51:44.642 [DEBUG] [potify.internal.api.SpotifyConnector] - Bad request: Player command failed: Premium required
So you are right, need to have Premium Account
Hovewer theres one trick I discovered, it’s by creating controls directly for Chromcast Binding, and controlling Google home, that way I can control somehow the music, hovewer the next/previouse button doesn’t work and log says:
2019-11-28 22:55:55.522 [INFO ] [omecast.internal.ChromecastCommander] - NEXT command not yet implemented
rule spotitest
when
Item trackUri changed
then
trackPlay.sendCommand(triggeringItem.state)
end
It does work - a song change in one bridge is reflected in the other device as well. But as you can imagine, there’s a delay between it, about 1-2s.
Do you seen any better way of syncing it?
Maybe pausing Bridge 1, waiting on Bridge 2 to start and then resume Bridge 1? Or am I likely to run into the same issue then…?
2019-12-05 20:27:47.932 [INFO ] [oauth2client.internal.OAuthConnector] - grant type refresh_token to URL https://accounts.spotify.com/api/token success
2019-12-05 21:27:45.841 [INFO ] [oauth2client.internal.OAuthConnector] - grant type refresh_token to URL https://accounts.spotify.com/api/token success
Would you please let me know if the setup looks ok or if you know what may be causing it?
It should be the latest version of the binding as I only installed it a couple of days ago.
What version of openHAB are you running? The message is unexpected, as it is only given when the devices are initialized and that should only happen when they’re first created or the configuration is updated, which should not happen under normal circumstances. It should at least also log when the devices go off line. Can you check the logs if you find anything related (you might need to check the log files itself, the browser UI only shows recent logging)
2019-12-05 21:55:04.463 [vent.ItemStateChangedEvent] - spotify_player_fba277f5_trackProgress changed from 0:23 to 0:24
2019-12-05 21:55:05.464 [vent.ItemStateChangedEvent] - spotify_player_fba277f5_trackProgress changed from 0:24 to 0:25
2019-12-05 21:55:06.174 [vent.ItemStateChangedEvent] - spotify_player_fba277f5_trackProgress changed from 0:25 to 0:26
2019-12-05 21:55:06.466 [vent.ItemStateChangedEvent] - spotify_player_fba277f5_trackProgress changed from 0:26 to 0:27
2019-12-05 21:55:07.467 [vent.ItemStateChangedEvent] - spotify_player_fba277f5_trackProgress changed from 0:27 to 0:28
2019-12-05 21:55:08.467 [vent.ItemStateChangedEvent] - spotify_player_fba277f5_trackProgress changed from 0:28 to 0:29
2019-12-05 21:55:09.288 [hingStatusInfoChangedEvent] - 'spotify:device:fba277f5:50d9' changed from OFFLINE (CONFIGURATION_ERROR): Missing configuration from the Spotify Bridge (UID:null). Fix configuration or report if this problem remains. to UNINITIALIZED
2019-12-05 21:55:09.292 [hingStatusInfoChangedEvent] - 'spotify:device:fba277f5:50d9' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
2019-12-05 21:55:09.306 [hingStatusInfoChangedEvent] - 'spotify:device:fba277f5:abc8' changed from OFFLINE (CONFIGURATION_ERROR): Missing configuration from the Spotify Bridge (UID:null). Fix configuration or report if this problem remains. to UNINITIALIZED
2019-12-05 21:55:09.310 [hingStatusInfoChangedEvent] - 'spotify:device:fba277f5:abc8' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
2019-12-05 21:55:09.312 [hingStatusInfoChangedEvent] - 'spotify:device:fba277f5:3d41' changed from OFFLINE (CONFIGURATION_ERROR): Missing configuration from the Spotify Bridge (UID:null). Fix configuration or report if this problem remains. to UNINITIALIZED
2019-12-05 21:55:09.317 [hingStatusInfoChangedEvent] - 'spotify:device:fba277f5:3d41' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
2019-12-05 21:55:09.321 [hingStatusInfoChangedEvent] - 'spotify:player:fba277f5' changed from ONLINE to UNINITIALIZED
2019-12-05 21:55:09.326 [hingStatusInfoChangedEvent] - 'spotify:player:fba277f5' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
2019-12-05 21:55:15.797 [temChannelLinkRemovedEvent] - Link 'spotifyAlbumName => spotify:fba277f5:6f52962fa9ca4129b0e592b4bd727df8:albumName' has been removed.
2019-12-05 21:55:15.799 [temChannelLinkRemovedEvent] - Link 'device1DeviceVolume => spotify:device:6f52962fa9ca4129b0e592b4bd727df8:fba277f5:50d9:deviceVolume' has been removed.
2019-12-05 21:55:15.801 [temChannelLinkRemovedEvent] - Link 'device2Player => spotify:device:6f52962fa9ca4129b0e592b4bd727df8:fba277f5:3d41:devicePlayer' has been removed.
2019-12-05 21:55:15.802 [temChannelLinkRemovedEvent] - Link 'device2DeviceVolume => spotify:device:6f52962fa9ca4129b0e592b4bd727df8:fba277f5:3d41:deviceVolume' has been removed.
2019-12-05 21:55:15.804 [temChannelLinkRemovedEvent] - Link 'device3Player => spotify:device:6f52962fa9ca4129b0e592b4bd727df8:fba277f5:abc8:devicePlayer' has been removed.
2019-12-05 21:55:15.805 [temChannelLinkRemovedEvent] - Link 'device1Player => spotify:device:6f52962fa9ca4129b0e592b4bd727df8:fba277f5:50d9:devicePlayer' has been removed.
Then a bit later…
2019-12-05 21:55:15.917 [temChannelLinkRemovedEvent] - Link 'spotify_player_fba277f5_trackName => spotify:player:fba277f5:trackName' has been removed.
2019-12-05 21:55:15.918 [temChannelLinkRemovedEvent] - Link 'spotify_device_fba277f5_3d41_deviceVolume => spotify:device:fba277f5:3d41:deviceVolume' has been removed.
2019-12-05 21:55:15.919 [temChannelLinkRemovedEvent] - Link 'spotify_device_fba277f5_abc8_deviceName => spotify:device:fba277f5:abc8:deviceName' has been removed.
2019-12-05 21:56:06.551 [.ItemChannelLinkAddedEvent] - Link 'spotifyAlbumName-spotify:fba277f5:6f52962fa9ca4129b0e592b4bd727df8:albumName' has been added.
2019-12-05 21:56:06.553 [.ItemChannelLinkAddedEvent] - Link 'device1DeviceVolume-spotify:device:6f52962fa9ca4129b0e592b4bd727df8:fba277f5:50d9:deviceVolume' has been added.
2019-12-05 21:56:06.556 [.ItemChannelLinkAddedEvent] - Link 'device2Player-spotify:device:6f52962fa9ca4129b0e592b4bd727df8:fba277f5:3d41:devicePlayer' has been added.
Later again…
2019-12-05 21:56:08.065 [hingStatusInfoChangedEvent] - 'spotify:device:fba277f5:50d9' changed from UNINITIALIZED to INITIALIZING
2019-12-05 21:56:08.066 [hingStatusInfoChangedEvent] - 'spotify:device:fba277f5:50d9' changed from INITIALIZING to OFFLINE (CONFIGURATION_ERROR): Missing configuration from the Spotify Bridge (UID:null). Fix configuration or report if this problem remains.
2019-12-05 21:56:08.068 [hingStatusInfoChangedEvent] - 'spotify:device:fba277f5:3d41' changed from UNINITIALIZED to INITIALIZING
2019-12-05 21:56:08.070 [hingStatusInfoChangedEvent] - 'spotify:device:fba277f5:3d41' changed from INITIALIZING to OFFLINE (CONFIGURATION_ERROR): Missing configuration from the Spotify Bridge (UID:null). Fix configuration or report if this problem remains.
2019-12-05 21:56:08.779 [vent.ItemStateChangedEvent] - spotify_player_fba277f5_trackPlayer changed from NULL to PLAY
2019-12-05 21:56:08.781 [vent.ItemStateChangedEvent] - spotify_player_fba277f5_deviceShuffle changed from NULL to OFF
2019-12-05 21:56:08.789 [vent.ItemStateChangedEvent] - spotify_player_fba277f5_trackRepeat changed from NULL to off
2019-12-05 21:56:08.794 [vent.ItemStateChangedEvent] - spotify_player_fba277f5_trackProgress changed from NULL to 1:28
2019-12-05 21:56:08.796 [vent.ItemStateChangedEvent] - spotify_player_fba277f5_trackDuration changed from NULL to 7:50
2019-12-05 21:56:08.798 [vent.ItemStateChangedEvent] - spotify_player_fba277f5_playlists changed from NULL to
2019-12-05 21:56:08.800 [vent.ItemStateChangedEvent] - spotify_player_fba277f5_playlistName changed from NULL to
2019-12-05 21:56:08.812 [vent.ItemStateChangedEvent] - spotify_player_fba277f5_trackName changed from NULL to Tearing Me Up
2019-12-05 21:56:08.814 [vent.ItemStateChangedEvent] - spotify_player_fba277f5_albumName changed from NULL to Days Gone By
2019-12-05 21:56:08.832 [vent.ItemStateChangedEvent] - spotify_player_fba277f5_artistName changed from NULL to Bob Moses
2019-12-05 21:56:08.835 [hingStatusInfoChangedEvent] - 'spotify:player:fba277f5' changed from UNKNOWN to ONLINE
2019-12-05 21:56:08.841 [vent.ItemStateChangedEvent] - spotify_player_fba277f5_devices changed from NULL to 3d41a9ff92a68fa9b8caf3bde53a8df1685fe711
2019-12-05 21:56:08.843 [vent.ItemStateChangedEvent] - spotify_player_fba277f5_deviceName changed from NULL to CRAIGS-LAPTOP
2019-12-05 21:56:08.844 [vent.ItemStateChangedEvent] - spotify_player_fba277f5_deviceVolume changed from NULL to 100
2019-12-05 21:56:09.018 [vent.ItemStateChangedEvent] - spotify_player_fba277f5_albumImage changed from NULL to raw type (image/jpeg): 13424 bytes
2019-12-05 21:56:10.073 [vent.ItemStateChangedEvent] - spotify_player_fba277f5_trackProgress changed from 1:28 to 1:29
2019-12-05 21:56:11.073 [vent.ItemStateChangedEvent] - spotify_player_fba277f5_trackProgress changed from 1:29 to 1:30
@hilbrand I’ve managed to determine what the root cause could be. It’s when I do a cold shutdown (pulled out the power cable).
Then it comes back with the errors reported. Where I live in South Africa there are many power outages, so would there be a way to recover from one and have the binding recognise the devices again?
Ive got just one device that is now showing its device name as “AEOBC” rather than “Downstairs Echo” - other devices seem fine. I recall this happening a long time ago but cant find where or what fixed it?
I’m currently facing a similar issue as others where the Active Device is not showing in the selection drop down. (I’ve also set the deviceId on the thing) Similarly, I have the same issue with Playlists, if I change both of these to text i get the Id much like Paper UI.
Is anyone able to help?
edit: I dont receive any errors either…
many thanks,
In the Spotify Api it’s possible to set an offset. Possible this can be used. So in a rule you then start the second player with an offset. It’s probably not possible to get it exactly synchronized as it very much depends on network latency and processing speed. But it might be enough to get it almost in sync most of the time. Pausing might work to, something to try. If that works it might be the starting with offset will work too. If you think using the offset is worth a try can you create an issue on the openhab2-addons repository and tag me in the description. I currently am short on time and otherwise it gets buried in this thread.
Do you still have the logs. These might be still in the marketplace binding. In the new release these logs are not present.
I’m not sure how I could fix this. The error messages give indicates the things didn’t get initialized correctly and I’m not sure under what conditions that happens and doesn’t seem to be something caused by the binding itself. It might be the cache is corrupted due to the sudden shutdown and a restart is the then the way to recover.
I can set the maximum to 50 by default. I’m not sure how to work with the offset. Possible implement it as an append to the playlist something like <playlist id>#<offset>. Is that something that might work?
Let me know and can you open an issue on the openhab2-addons GitHub repo and tag me in the description. Then I have it on my list otherwise it gets buried here.
It could be the Echo registered itself to Spotify after a restart or update or got renamed for some other reason and when it registerend itself it showed up with that name. Otherwise I have no idea.
You can run with log level trace to see what Spotify returns. If you use text you get the id that is correct, because the id is the value. Only when using Selection you get a selection dropdown.
Thanks for the response @hilbrand, apologies if this is a bit of a novice question; but how do I run the log trace? I’ve seen in earlier posts the syntax is:
Thanks @hilbrand - any ideas on how I can determine if a flash briefing is playing? Seems the active channel is always on so this isnt for it playing - perhaps it is able to be disabled or enabled and this is what active is for?
Not sure what ou mean by flash briefing. Spotify only allows 1 device to play at once. The device that is active is the device that can be controlled. But it doesn’t say anything about playing status.
What version of the binding do you run? I made some changes related to 204. 204 basically means that Spotify tells you that it already send that information just recently and therefor the api won’t return anything. I’m under the impression this was changed fairly recently by them and in the past they always returned the data. I made a change to the binding to be able to handle such situations better. (The marketplace version of this binding has timestamp 09/12/2019 in the name in PaperUI).