Hello,
I use OH1.8.2 on QNAP TS-419P and I face a strange problem with charts
.
I use rrd4j for persistence and the rrd4j.persist file looks like this
// persistence strategies have a name and a definition and are referred to in the "Items" section
Strategies {
// for rrd charts, we need a cron strategy of one minute
everyMinute : "0 * * * * ?"
}
Items {
LifeSimulation,HeatingON,DarkBright,IntrusionDetection,SunProtection : strategy = everyChange, everyMinute, restoreOnStartup
// let's only store values in rrd
Weather_Temperature,Weather_Temp_Max,Weather_Temp_Min,Weather_Humidity,Weather_Pressure,Weather_WindSpeed : strategy = everyMinute, restoreOnStartup
}
I can see the rrd-files created in
/Volumes/openHAB/etc/rrd4j
My items are defined as
Group gWeather (All)
Group gWeather_Chart_Temp "Temperatur" <temperature_normal> (gWeather)
Group gWeather_Chart_Wind "Wind" <wind> (gWeather)
Group gWeather_Chart_Humidity "Luftfeuchtigkeit" <humidity> (gWeather)
Group gWeather_Chart_Pressure "Luftdruck" <pressure> (gWeather)
Number Weather_Chart_Temp_Period "Temperatur Period"
Number Weather_Chart_Wind_Period "Wind Period"
Number Weather_Chart_Humidity_Period "Luftfeuchtigkeit Period"
Number Weather_Chart_Pressure_Period "Luftdruck Period"
Number Weather_Temperature "Temperatur [%.1f °C]" <temperature_normal> (gWeather_Chart_temp, gWeather) { http="<[openWeatherMap:300000:XSLT(OWM_weather_temperature.xsl)]" }
Number Weather_Temp_Max "heutiges Maximum [%.1f °C]" <temperature_high> (gWeather_Chart_temp, gWeather)
Number Weather_Temp_Min "heutiges Minimum [%.1f °C]" <temperature_low> (gWeather_Chart_temp, gWeather)
Number Weather_Humidity "Luftfeuchtigkeit [%d %%]" <humidity> (gWeather_Chart_humidity, gWeather) { http="<[openWeatherMap:300000:XSLT(OWM_weather_humidity.xsl)]" }
Number Weather_Pressure "Luftdruck [%.0f mbar]" <pressure> (gWeather_Chart_pressure, gWeather) { http="<[openWeatherMap:300000:XSLT(OWM_weather_pressure.xsl)]" }
Number Weather_WindSpeed "Windgeschwindigkeit [%.0f km/h]" <wind> (gWeather_Chart_wind, gWeather) { http="<[openWeatherMap:300000:XSLT(OWM_weather_wind_speed.xsl)]" }
and the sitemap looks like this
Text item=Weather_Temperature valuecolor=[Weather_Temperature=="UNLL"="lightgray",Weather_Temperature>30="red",>15="green",>5="orange",<=5="blue"] {
Frame {
Switch item=Weather_Chart_Temp_Period label="Temperaturverlauf - Periode" icon="temperature" mappings=[0="S", 1="T", 2="W", 3="M", 4="J"]
Chart item=gWeather_Chart_Temp period=h refresh=300 visibility=[Weather_Chart_Temp_Period==0]
Chart item=gWeather_Chart_Temp period=D refresh=300 visibility=[Weather_Chart_Temp_Period==1]
Chart item=gWeather_Chart_Temp period=W refresh=300 visibility=[Weather_Chart_Temp_Period==2]
Chart item=gWeather_Chart_Temp period=M refresh=300 visibility=[Weather_Chart_Temp_Period==3]
Chart item=gWeather_Chart_Temp period=Y refresh=300 visibility=[Weather_Chart_Temp_Period==4]
}
}
and for pressure, humidity and windspeed it is basically the same.
The strange thing is now that the chart is empty for all groups (temperature, pressure, humidity, windspeed) as shown below.
But if I use a http request like (first uses rrdchart.png service while the second uses chart service)
http://herkules.local.:8142/rrdchart.png?items=Weather_Temp_Max,Weather_Temperature,Weather_Temp_Min&period=D&w=640&h=240
or
http://herkules.local.:8142/chart?items=Weather_Temp_Max,Weather_Temperature,Weather_Temp_Min&period=D&w=640&h=240
where all items to display are listed individually. With such http requests I can generate graphics and I can see that rrd4j records the data (don’t worry about the strange min/max curve which is due to the numberous reboots/restarts for openHAB.
But if I use the chart service with a group item (instead of individual item used above) then the chart is empty.
http://herkules.local.:8142/chart?groups=gWeather_Chart_Temp&period=W&w=640&h=240
Why???
It seems that the chart service is not able to handle the group correctly.
What is wrong?
How to debug further down?
Any help or hint is appreciated.
Regards,
Axel