Spotify Connect Binding

Yes. i guess i won’t need rules.
I did as you suggested and it works.
Is there some place where i can see all spotify deviceId’s or do i have to manually select the device and read out the id via rest api as i did before? thank you!

You can call the openHAB api on the devices item. This will include the list with options, e.g. the id and name of the devices in pairs.

hi! i guess i am to dumb for this.
i tried it with item state and the item i linked to the devices channel. it does only give back the current device. or what do i have to do differently? thank you!

What do you mean by tried?

i opened rest api and navigated to the items section then chose item state and entered the item i linked to the device channel

Use the API without state

also tried that.

Are you sure you have any active devices? Check with trace log level to see what spotify returns. Im not sure the map transform has anything to do with it, but to check remove it.

Hi!

i tried to read the item value of the playlists item.
if i listen to music it responds the current playlist.
Is there a way to get all my playlists from spotify or do i have to create them manually?
I think that is the same “issue” as with the devices.
regards

jonas

You should get them from the binding (and also not needing the MAP pattern) Do you by any chance have the AmazonEcho or onewire binding installed?

Hello

I have the amazonechocontrol binding installed.

And i created a String Item for both - devices and playlists.
What should the rest api respond?? a comma separated list of devices in that string item or am i getting something wrong?

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??