Dynamic sitemaps: Can't get Visibility to work fine

786 views
Skip to first unread message

Gilles GBA

unread,
Aug 11, 2014, 3:16:16 AM8/11/14
to ope...@googlegroups.com
Hi,

Basically I want to hide heatings frame (or at least group, or items) when I don't need it (let say in summer). So I play with the visibility features, but can't have it to work.
I use explanations and samples from the doc/wiki and from this post : https://groups.google.com/forum/#!searchin/openhab/Sitemaps$3A$20dynamic/openhab/uMBrYWi-eeI/3r0eQTjOWqMJ

I try with both openhab versions 1.5.0, and 1.6.0 #704 (August, 9th), in classic UI.
I also try with Habdroid 1.5.1.0 and 1.5.1.0 #135 (July, 25th).


Here are my test files (no rule or script, only those two files):

default.items
Switch XbmcLiving_State
String XbmcLiving_Title



default.sitemap
sitemap home label="Test" { 
Frame label="XBMC" {
Switch item=XbmcLiving_State label="State [%s]" mappings=[ON="Play", OFF="Pause"]
Text item=XbmcLiving_Title label="Title [%s]" visibility=[XbmcLiving_State==ON]
Text item=XbmcLiving_Title label="Title [%s]" visibility=[XbmcLiving_State=="ON"]
Text item=XbmcLiving_Title label="Title [%s]" visibility=[XbmcLiving_State==On]
Text item=XbmcLiving_Title label="Title [%s]" visibility=[XbmcLiving_State=="On"]
Text item=XbmcLiving_Title label="Title [%s]" visibility=[XbmcLiving_State==on]
Text item=XbmcLiving_Title label="Title [%s]" visibility=[XbmcLiving_State=="on"]
}
}


Can anyone tells me what I'm doing wrong ?
Many thanks.

Gilles

Chris Jackson

unread,
Aug 11, 2014, 6:29:59 AM8/11/14
to ope...@googlegroups.com
Hi Gilles,
I don't see anything immediately wrong with your definition. I do exactly this on a lot of items in my sitemaps with the following definition -:
visibility=[LoungeThermostat_State==ON, LoungeThermostat_State=="HOLD"]

Chris

Renato Riolino

unread,
Aug 11, 2014, 4:06:42 PM8/11/14
to ope...@googlegroups.com
Gilles,

The correct is:

Text  item=XbmcLiving_Title  label="Title [%s]"  visibility=[XbmcLiving_State==ON]

I have some issues with dynamic sitemaps when I change the sitemap file and don't restart openhab.   After restarting openhab they start to work again.  Have you tried to do a full openhab restart?

[]'s

Renato

Gilles GBA

unread,
Aug 12, 2014, 1:09:24 AM8/12/14
to ope...@googlegroups.com
Hi Chris, Renato,

It finally works perfectly.
Issues was a bad "eclipsehome" on one testing environment, and a missing OH restart in the other... Stupid me!

Thanks for your replies.
Gilles
Reply all
Reply to author
Forward
0 new messages