OH2 Squeezeplayer with Radio/Playlist Select Button and dynamic visibility

squeezebox
oh2bindings
habpanel
Tags: #<Tag:0x00007f6ce4cd7258> #<Tag:0x00007f6ce4cd6fd8> #<Tag:0x00007f6ce4cd6dd0>

(Peter) #21

somehow i was able to set them invisible! =)
but now i’m stuck on RadioSelect.
i deleted all my old items and linked the channels to new ones, copied your rules etc. but when i use the widget absolutely nothing happens (on openhab.log or events.log)?

//Items:
squeezeKuchlArtist
squeezeKuchlControl
squeezeKuchlRadioTitle
squeezeKuchlStream
squeezeKuchlTitle
squeezeKuchlVolume

groups and rule are exactly like in your opening post here.
RadioName in Widget is “Kuchl”

what am i missing?


(Jordi) #22

Hello,

First of all thank you very much Oli, it’s perfect for what I need.
But I have a problem.

The first is that I get an error in the line val ThePlayList = gPlayerPlayList.members.filter [s | s.lastUpdate ()! == null] .sortBy [lastUpdate ()]. Last as NumberItem

2018-02-07 13: 32: 49.747 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule ‘playlist’: can not invoke method public java.lang.String org.eclipse.smarthome.core.items.GenericItem.getName () on null

If I modify it to val ThePlayList = squeezeSelect1Station if that works, but I understand that not as it should.
Thanks for everything.

Regards!


(Oliver Stenzel) #23

Hi Peter,
well, first thing to ask: Have you persited all item? as stated the whole select thing only works with persistence…


(Oliver Stenzel) #24

Hi Jordi,
sounds like there are no items in group gPlayerPlayList…
You can check that on karafe console with
smarthome:items list gPlayerPlayList
on mysystem it returns:
gPlayerPlayList (Type=GroupItem, Members=4, State=NULL, Label=null, Category=null)
If your system shows 0 members my guess would have been right. also check if all items are persisted correctly.
hth,
-OLI


(Peter) #25

no, i only added this to mapdb.persist:

gPlayerPlayList* : strategy = everyChange,restoreOnStartup

this should persist all items in gPlayerPlayList, right?
strangest thing is that i get absolutely nothing on the logs…