Sitemap visibility features are gone for frames?

I used a setup in which I used had three different switches in order to select one out of nine charts for display. Like this shortened example:

Frame label=“Outer Frame” visibility=[OuterSwitch==0, OuterSwitch==“NULL”]{
Frame label=“Inner Frame” visibility=[InnerSwitch==0, InnerSwitch==“NULL”] {
Chart item=Value1a period=D refresh=300000 visibility=[PeriodSwitch==0, PeriodSwitch==“NULL”]
Chart item=Value1a period=W refresh=600000 visibility=[PeriodSwitch==1]
Chart item=Value1a period=M refresh=600000 visibility=[PeriodSwitch==2]
}
Frame label=“Inner Frame” visibility=[InnerSwitch==1] {
Chart item=Value2a period=D refresh=300000 visibility=[PeriodSwitch==0, PeriodSwitch==“NULL”]
Chart item=Value2a period=W refresh=600000 visibility=[PeriodSwitch==1]
Chart item=Value2a period=M refresh=600000 visibility=[PeriodSwitch==2]
}
Frame label=“Inner Frame” visibility=[InnerSwitch==2] {
Chart item=Value3a period=D refresh=300000 visibility=[PeriodSwitch==0, PeriodSwitch==“NULL”]
Chart item=Value3a period=W refresh=600000 visibility=[PeriodSwitch==1]
Chart item=Value3a period=M refresh=600000 visibility=[PeriodSwitch==2]
}
}
Frame label=“Outer Frame” visibility=[OuterSwitch==1]{
Frame label=“Inner Frame” visibility=[InnerSwitch==0, InnerSwitch==“NULL”] {
Chart item=Value1b period=D refresh=300000 visibility=[PeriodSwitch==0, PeriodSwitch==“NULL”]
Chart item=Value1b period=W refresh=600000 visibility=[PeriodSwitch==1]
Chart item=Value1b period=M refresh=600000 visibility=[PeriodSwitch==2]
}
Frame label=“Inner Frame” visibility=[InnerSwitch==1] {
Chart item=Value2b period=D refresh=300000 visibility=[PeriodSwitch==0, PeriodSwitch==“NULL”]
Chart item=Value2b period=W refresh=600000 visibility=[PeriodSwitch==1]
Chart item=Value2b period=M refresh=600000 visibility=[PeriodSwitch==2]
}
Frame label=“Inner Frame” visibility=[InnerSwitch==2] {
Chart item=Value3b period=D refresh=300000 visibility=[PeriodSwitch==0, PeriodSwitch==“NULL”]
Chart item=Value3b period=W refresh=600000 visibility=[PeriodSwitch==1]
Chart item=Value3b period=M refresh=600000 visibility=[PeriodSwitch==2]
}
}

This worked using #504, changing to #550, the visiblitiy tag doesn’t work for frames anymore.
Using the sitemap like that, all charts are displayed. When removing the surrounding frames, the visiblitiy for the chart is correctly evaluated.
Or did the installation of InfluxDB and Grafana do that?

Never mind,
I found a way the select the visibility by just one switch, which is checking all 3 switches.

I did not quite understand the problem but would you like to share your result and explain it a little? I can imagine many users to be interested in something like this. A few hints: About the Tutorials & Examples category

Problem:
You want to display a single chart, however you have to select out of a set of different charts. The selection depends on 3 different parameters, for example the Period, the ValueType and ValueOrigin.
Solution:
Create the three number items for Period, ValueType and ValueOrigin as well as another number item ChartSelector.
Place three switches on the sitemap, each state of a switch is mapped to a value.
Like this:

Frame label= “Select” {
Switch item=ValueType label= “Type:” mappings=[0=“Type 1”, 1=“Type 2”, 2=“Type 3”]
Switch item=Period label= “Period” mappings=[0=“Day”, 3=“Week”, 6=“Month”]
Switch item=ValueOrigin label= “Origin” mappings=[0=“Origin 1”, 9=“Origin 2”, 18=“Origin
3”]
}

Use rule like:
The trick is in different values, which later allows to select the correct chart.

rule “Select Chart”

when
Item ValueType changed or Item Period changed or Item ValueOrigin changed
then
var Number Check
Check=ValueType.state
Check=Check+ Period.state
Check=Check+ ValueOrigin.state
sendCommand(ChartSelector,Check)
end

on the Sitemap:

Frame label=“Chart” {
Chart item=ValueTyp1_Origin_1 period=D refresh=300000 visibility=[ChartSelector==0, ChartSelector==“NULL”]
Chart item=ValueTyp1_Origin_1 period=W refresh=600000 visibility=[ChartSelector==3]
Chart item=ValueTyp1_Origin_1 period=M refresh=600000 visibility=[ChartSelector==6]
Chart item=ValueTyp2_Origin_1 period=D refresh=300000 visibility=[ChartSelector==1]
Chart item=ValueTyp2_Origin_1 period=W refresh=600000 visibility=[ChartSelector==4]
Chart item=ValueTyp2_Origin_1 period=M refresh=600000 visibility=[ChartSelector==7]
Chart item=ValueTyp3_Origin_1 period=D refresh=300000 visibility=[ChartSelector==2]
Chart item=ValueTyp3_Origin_1 period=W refresh=600000 visibility=[ChartSelector==5]
Chart item=ValueTyp3_Origin_1 period=M refresh=600000 visibility=[ChartSelector==8]

}

I hope that’s understandable.

However the problem that visibility does not work for frames anymore still exists.
Even if all sitemap items are invisible the frame stays.

Sitemap:
Frame label=“Kodi” visibility=[Mediaserver_Switch==ON] {
Text item=Kodi_Playerstate visibility=[Mediaserver_Switch==ON]
Text item=Kodi_Playertitle visibility=[Mediaserver_Switch==ON]
}

If my Mediaserver_Switch is off the text items are invisible,but the empty frame remains. In older versions it went invisible.

Hello,
I have exactly the same problem with OH2 and Basic UI. On the first page I have a number of Messages which are displayed in case some condition is met. In case no message needs to be displayed the frame should be invisible. The feature works in iOS App and might work in classic GUI - which means that it is eventually a problem of BasicUI ?

Thanks
BR
ThomasS

@opus @andirs @t_schmidt That sounds like a real bug or more precisely a missing feature. Please create a ticket at https://github.com/eclipse/smarthome/issues/new?title=Basic%20UI:%20…&body=

done, thanks for the link :slight_smile:

1 Like