Hardware: RPi3b+
OS: openhabian
openHAB version:2.5M6-2.5M5
Hi, and thanks for help in advance.
I try to create a multi-selection switch in the sitemap , for that i create a virtual item :
String TvHomeCinemaUrlList "TVLG List Url"
then i create a rules base on the state of this “item” TvHomeCinemaUrlList
here the rule:
rule "List of url LGTV"
when Item TvHomeCinemaUrlList received command
then
switch receivedCommand{
case 0: actions.launchBrowser("http://192.168.2.30/photo/#!Albums")//lien vers Album General Sur synology
case 1: actions.launchBrowser("http://192.168.2.30/photo/#!Albums/album_5452494754")//lien vers Album Trigt Sur synology
case 2: actions.launchBrowser("http://192.168.2.40:81/ui3.htm")//lien vers camera General
case 3: actions.launchBrowser("http://192.168.2.40:81/ui3.htm?group=Rue")//lien vers camera Group Rue
case 4: actions.launchBrowser("http://192.168.2.40:81/ui3.htm?cam=Etang_alarm")//lien vers camera etang
case 5: actions.launchBrowser("http://192.168.2.40:81/ui3.htm?cam=Ruelle")//lien vers camera etang
case 6: actions.launchBrowser("http://192.168.2.40:81/ui3.htm?cam=Noyer")//lien vers camera Noyer
case 7: actions.launchBrowser("http://192.168.2.49/index.php?v=d&p=dashboard&object_id=2#")//lien vers camera Jeedom
case 8: actions.launchBrowser("http://192.168.2.34:8080/basicui/app?sitemap=sitemapTest")//lien vers camera Jeedom
}
end
And a Sitemap :
Selection item=TvHomeCinemaUrlList icon="tv" mappings=[0="Album Photos",1="Album Photos TriGt",2="Camera Global",3="Camera Rue",4="Camera Etang",5="Camera Ruelle",6="Camera Noyer",6="Jeedom",7="Openhab"]
So when i select for exemple “Album Photos” a send command “0” but the actions don’t fire.
i suppose the “item type” of “TvHomeCinemaUrlList” wrong i thing i need to chose some channel like for Application selection but what type ?
if i change the item “TvHomeCinemaUrlList” like this :
String TvHomeCinemaUrlList "TVLG List Url" {channel="lgwebos:WebOSTV:tv1:appLauncher"}
i recieve error like …command “0” don’t exist for appLauncher.
Ok is logic, but waht type chosing ? or…i’m totaly wrong ?
thanks for your help