I’m trying to set up a chart based on the demo information in the OH2 App. and demo sitemap.
When I run the OH2 app on my phone in Demo mode, it shows 1 single Chart Period that you can change by pressing Hour, Day, or Week. But I can not seem to mimic that in my own site map. When attempting, I always end up 3 charts showing up 1 below each other.
This is what I have done.
In my Site Map I have this:
Frame label="Weather" {
Text item=Weather_Temperature valuecolor=[Weather_LastUpdate=="NULL"="lightgray",Weather_LastUpdate>90="lightgray",>25="orange",>15="green",>5="orange",<=5="blue"] {
Frame {
Text item=Weather_Temp_Max valuecolor=[>25="orange",>15="green",>5="orange",<=5="blue"]
Text item=Weather_Temp_Min valuecolor=[>25="orange",>15="green",>5="orange",<=5="blue"]
Text item=Weather_LastUpdate visibility=[Weather_LastUpdate>30] valuecolor=[Weather_LastUpdate>120="orange", Weather_LastUpdate>300="red"]
}
Frame {
Switch item=gWeather_Chart_Period label="Chart Period" icon="chart" mappings=[0="Hour", 1="Day", 2="Week"]
Chart item=gWeather period=h refresh=600 visibility=[gWeather_Chart_Period==0]
Chart item=gWeather period=D refresh=900 visibility=[gWeather_Chart_Period==1, gWeather_Chart_Period=="NULL"]
Chart item=gWeather period=W refresh=3600 visibility=[gWeather_Chart_Period==2]
}
}
}
And my items information is
Group gWeather (All)
Number Weather_Temperature "Temperature [%.2f °F]" (gWeather) {weather="locationId=home, type=temperature, property=current, unit=fahrenheit"}
Number Weather_Temp_Min "Temperature min [%.2f °F]" (gWeather) {weather="locationId=home, type=temperature, property=min, unit=fahrenheit"}
Number Weather_Temp_Max "Temperature max [%.2f °F]" (gWeather) {weather="locationId=home, type=temperature, property=max, unit=fahrenheit"}
I do have RRD4J persistence installed and I see the graphs charting the temps. But the SiteMap always shows the 3 charts tacked 1 after the other?