OH2 Squeezeplayer with Radio/Playlist Select Button and dynamic visibility

squeezebox
oh2bindings
habpanel
Tags: #<Tag:0x00007f15da14b058> #<Tag:0x00007f15da14aef0> #<Tag:0x00007f15da14adb0>

(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…


(WJ) #26

Hi Oliver aka @Oli

  1. I like your work and sharing und use it as starting point to get my Logitech Radio running in OpenHAB so could you also please share your streams.map, as openhab newbe i need to get a push in the right direction; I can understand an error like “!=” and change it into “!==” but something missing I am really clueless, thanks in advance.

  2. below you can see more people have problems with “persistence” could you please kick us here too?

Hi Peter aka @narf27, i just started with openhab and got only very limited experience. Thanks for you comment it gave me push the what I possible should do, after adding my persist file with your content:

gPlayerPlayList* : strategy = everyChange,restoreOnStartup

I can still see the following warnings in my log:

  • Configuration model ‘radio1.persist’ has errors, therefore ignoring it: [1,1]: mismatched input ‘gPlayerPlayList’ expecting ‘Strategies’

  • and “There is no default persistence service configured!” Hi @Oli think you can help us in this matter can you please share some info arround this subject, thanks in advance.

But that is at this point not my only problem:

  • FileNotFoundException: /etc/openhab2/transform/streams.map (No such file or directory), Should i have added this file myself?

  • Validation issues found in configuration model ‘radio1.rules’, using it anyway, just copied the file found in this topic…

  • switching radio channel gives ERROR “Rule ‘playlist wechsle dich’: cannot invoke method public java.lang.String org.eclipse.smarthome.core.items.GenericItem.getName() on null” likely caused by the rule file???

As you see I am not there yet myself but i hope something was helpfull or gives a reaction for another push in the right direction :slight_smile:


(Jordi) #27

Hello,

Finally my mistake was because of not installing and configuring the persistence. After installing mapdb and configure-everything works correctly. Thank you very much Oli, your work is great.

Regards!


(Oliver Stenzel) #28

Sorryfor the late reply. here is my streams.map:

http\://hr-mp3-m-youfm.akacast.akamaistream.net/7/246/142136/v1/gnl.akacast.akamaistream.net/hr-mp3-m-youfm=YOU FM
http\://mp3.ffh.de/radioffh/hqlivestream.mp3=FFH
http\://mp3.ffh.de/radioffh/livestream.aac=FFH
HIT\u0020RADIO\u0020FFH=FFH
HR\u00203=HR 3
http\://addrad.io/4WRDQ6=HR 3
http\://hr-hr3-live.cast.addradio.de/hr/hr3/live/mp3/128/stream.mp3=HR 3
http\://opml.radiotime.com/Tune.ashx?id\=s57109\&formats\=aac,ogg,mp3\&partnerId\=16\&serial\=8ef15207e62082921048854d898a9367=HR 3
planet\u0020radio=planet radio
http\://mp3.planetradio.de/planetradio/hqlivestream.aac=planet radio
Silence\u0020Nogood\u0020Radio\u0020(Electro)=Silence Nogood Radio
http\://opml.radiotime.com/Tune.ashx?id\=s230457\&formats\=aac,ogg,mp3\&partnerId\=16\&serial\=e16775754549cd827c15202ce6b569d6=Silence Nogood Radio
http\://listen.spacial.com/api/listen/?sid\=66644\&method\=sc\&rid\=1230304=Silence Nogood Radio
Radio\u0020Swiss\u0020Classic\u0020(Schweiz)=Radio Swiss Classic
NULL=???
http\://mp3.planetradio.de/planetradio/livestream.aac=planet radio
-=Internet Radio Stream
FFH=FFH