Squeezebox binding: populating favorites into sitemap selection does not work

Good morning,

My specs are: OpenHab 2.4 (Release 0.001 für Synology), Squeezebox Server 7.9.2 and squeezebox binding (release version from Paper UI).
Binding itself and also general squeezebox Player controls are working.
Also the Paper UI Control is showing the favorites as string generated from the playFavorite item.

According to the documentation from github, it should be possible, to create a sitemap selection without adding the “mapping[…]” stuff and then the selection should show all favorites available.

This is not working for me - I can only add favorites manually into the mapping, such as "1=“SWR3”, 2=“Antenne Bayern”, … and so on.

I’d like to achieve exactly whats is written below (source: https://github.com/openhab/openhab2-addons/tree/master/bundles/org.openhab.binding.squeezebox)

Any hint what to try or what I might have forgotten?
Copied item and sitemap items exactly from the page and exchanged the squeezebox player id/mac adress to match with mine.

thanks a lot!

How to Set Up Favorites

  • Add some favorites to your favorites list in LMS (local music playlists, Pandora, Slacker, Internet radio, etc.). Keep all favorites at the root level (i.e. favorites in sub-folders will be ignored).
  • If you’re on an older openHAB build, you may need to delete and readd your squeezebox server and player things to pick up the new channels.
  • Create a new item on each player
String YourPlayer_PlayFavorite "Play Favorite [%s]" { channel="squeezebox:squeezeboxplayer:736549a3:00042016e7a0:playFavorite" }

For Sitemap

*** To use state options on the playFavorite channel, simply omit the mappings from the Selection widget.**

**Selection item=YourPlayer_PlayFavorite label="Play Favorite"**
1 Like

Hmm. Seems like it should be working. Do you see any errors in the log?

Maybe try this to see if the server has received the favorites from the LMS.

Create an item on the SqueezeBox Server thing.

String                      Squeezebox_FavoritesList
                            "Favorites List [%s]"
                            { channel="squeezebox:squeezeboxserver:YOUR_SERVER:favoritesList" }

Then in the console, type this. You should see your favorites listed after State=

openhab> smarthome:items list | grep Squeezebox_FavoritesList                                                                               

If you don’t see the favorites listed, then we’ll need to do some further debugging.

Hi Mark,

thank you.
This is working as it should:

Squeeze_ListFavorite (Type=StringItem, State=1=Bayern 3,2=Graal Radio Future,3=Radio Arabella München,4=Bayern 1,5=egoFM,6=Beach Chill-Out Radio, Label=Play a Favorite, Category=null)

As I wrote, also Paper UI is showing the player favorites; I suppose it’s a issue related to my sitemap / setup?

Best regards,

You do realize the regular sitemap Selection widget is incapable of this? It’s talking about an option in HABpanel.

EDIT - I’ll take that back, feature developed last year and looks like should be in 2.4

I somewhere read about some quotation settings that can be changed for basic ui behaviour. Could it be that this settings do have an impact?
Do you know what I mean and what settings could be tried?

Agreed. It was added in June 2018, so it should be in 2.4.

@gforums The other thing you could try is to put this in a rule, then trigger the rule somehow. This will log all the state options associated with the item linked to the player’s playFavorite channel

    YourPlayFavoriteItem.getStateDescription.getOptions.forEach[option |
        logInfo("favs", "Option " + option.getValue + ": " + option.getLabel)

Could you also post the relevant lines from your item and sitemap files?

There’s nothing else to do other than define an item linked to the playFavorite channel and then put a Selection widget in your sitemap.

Edit: My item definition:

String                      Source1_PlayFavorite
                            "Play Favorite [%s]"
                            { channel="squeezebox:squeezeboxplayer:BD72319C-1EC2-4FD3-8A1C-877B6796A80C:b827ac27d4cc:playFavorite" }

My sitemap widget

Selection item=Source1_PlayFavorite  label="Favorite" 

(Selection content feature needs documenting really, hint :wink:)

ok guys, I got it working! :slight_smile:

And the reason - at least in my case - was really the quotation setting!

In the Logitech Squeezebox Server Thing configuration, there is an Option for the “Favorites List” Channel, that can be activated and which is called “quote favorites”.

After having activated this, my selection item now works without a manual mapping needed.

And yes, the settings belongs to the SERVER thing, while the item needed belongs to the PLAYER.

String Squeeze_PlayFavorite "Favorit spielen [%s]" { channel="squeezebox:squeezeboxplayer:1A57D65F-A5C3-4FEC-9849-6D27044C6A1B:020e8e22a009:playFavorite" }

So - this can be marked as solved now and I hope it might help other people as well :+1:t4:

Glad you got it working, but I don’t think that’s the reason.

This is the more likely explanation. When you changed the quotation setting on the server thing, it caused the server thing handler to reinitialize. As part of the server thing handler initialization, the server thing handler sends the favorites list to the player thing handler(s). Once that happened, the item linked to the player’s playFavorite channel got its state options updated.

I suspect there’s a timing issue somewhere that I probably should to fix…

Indeed - out of curiosity I switched the setting off again. The list of favourites remains. So looks like another issue that was causing the problem. Still happy to have it working now.

Best regards,