Spotify Connect Binding

I think this might be caused by the amazonecho binding. If you can temporary disable/remove this binding just for checking if that makes a difference.

String item is ok. In sitemap it should be a Selection. It should return a key-value list in the options section.

1 Like

yep, it works now …

Ok. Recently a fix for this on the amazonecho binding was merged. It’s in 2.5.0-SNAPSHOT version. If you’re running a 2.5M2 version you could download the snapshot jar version of the binding and manually install it (or update SNAPSHOT if you’re running SNAPSHOT) (Although I would not recommend to just move to snapshot versions in general).

i am on the current milestone and will upgrade the amazon binding, thank you i’ll update and report back :slight_smile:
Now if that works i just need to find a way to display the label instead of the value in habpanel :wink:
{{getItem(config.Haus_Spotify_Geraete).label}} does not work.

You need another item for that linked to the deviceName channel to get the name.

1 Like

Hi everyone, hi @hilbrand,

Before trying and setting up this binding I have some questions regarding this binding:

  1. I recently just bought two sonos one for separate rooms. Is it possible to control those devices with this binding? Does someone has some config examples? I only watched alexa speaker in this thread. I am looking for multiroom solution for sonos, playing separate but predefined playlists and searching in spotify like written here.

  2. Is the at spotify created account a different account or is it using one of the existing ones?

  3. Did someone ever create a rule that switch light on and radio on like a wake up function?

  4. Do you have som examples, how you use this binding? what functions are possible at all?

Thank you for your support.

Woogi

If the devices are accessible via the spotify api you can use them. For sonos devices this doesn’t seem to be always be the case and than you won’t be able to control them through the spotify api and thus not via the binding. You’ll have to try. If it does work and you want to play separate playlists at the same time you need to create 2 bridges (in the binding this are the players) with different spotify accounts. The binding does support multiple accounts.

It can but it’s not a requirement. Any spotify account that you give the client id and secret created in the developer dashboard can use it to access the spotify api.

The readme of the binding describes all channels available and with that all functions. Does that help?

Hi @hilbrand,

thank you for the explanations.

Regarding answer 1: 2 bridges with two accounts - perfect that this is working!
Regarding answer 4: Yes I did that but I would like to know which functions are used most or very practical to use :slight_smile:

I will give it a try and if I have further questions or problems I will come up again :wink:

Hi there,

While authenticating, I get Illigal Scope, so unable to configure the binding, any idea what’s wrong here??

It should print in the log what scope, or else when enable debug log. scope can also be a problem on Spotify side. Google turns up several suggestions, but depends on the error. I don’t know if you get this message with a free account.

HI @hilbrand,

I did integrating the binding today. So far all works but I get the same issues @Andrew_Pawelski and @nolan_garrett had regarding playlists and active devices. For both I can see and select values in paper UI under “Control” but I can’t select and see sth. in Basic UI. There those lists are blank.

I don’t have the alexa binding running. I assume it is the same problem they had. Do you have any idea what could face the issue?

Furthermore I did not reach to incorporate the Sonos speaker into the binding. Hope this will be possible in the future by softwareupdate from sonos or spotify…

kindly,
woogi

Did you configure the items as Selection on the sitemap?

I think the free account may be the case.

@hilbrand
After upgrading to M3 I just realized that the Spotify binding stopped working. Spotify devices says:

Missing configuration from the Spotify Bridge (UID:null). Fix configuration or report if this problem remains.

Looking at /connectspotify it says that my account is authorized, however clicking on Authorize Player gives me ‘Invalid redirect URI’. What should I do?

It could be the bridge needs to be recreated, due to changes in the configuration. There were some changes. Can you removing the bridge and readd it.

Yes I will try, thanks!

It worked, but the redirect URIs in the App settings (on the Spotify Developer Console) need to be updated, because only the http://openhabianpi:8080/connectspotify was added, but now it wanted to authenticate with the IP address. After adding http://:8080/connectspotify it worked as it should!

yes I did.

.items
String spotifyPlaylists     "Playlists [%s]"       {channel="spotify:player:OpenHab:playlists"}

.sitemap
Selection item=spotifyPlaylists 

So it should work, but nothing is shown.

If it does work in PaperUI than it’s not the same problem as reported earlier. As that would result in not showing playlists or devices anywhere. So I don’t know what the problem might be. Try editing the sitemap file and see it it gives any errors in the log when you save the file.

I’m a bit lost with all those bridges and devices. How can I switch playing to a certain device via a rule? Which channel should I use ? From the readme it seems that i need devices channel, but what is the full path ? e.g. spotify:device:spotify:ddf0:devices ? Should I then configure a string item and sendCommand to that item?