Temperature chart with rrd4j

I’m using an Raspi Pi with openhab2.
Now I want to chart the temperature of weather-binding. Display the temperature works well, but I have an empty chart.

I installed the persistance rrd4j via openhab2-paperUI and set the default persistance to rrd4j.
In /var/libs/openhab2/persistance/rrd4j I create a file rrd4j.persist:
Strategies {
everyMinute:“0 * * * * ?”
everyHour: “0 0 * * * ?”
everyDay: “0 0 0 * * ?”

    default =  everyChange

Unna_Temperatur* : strategy=everyMinute, restoreOnStartup

After rebooting, a file names “UTemperature.rrd” is in the direction, but the timestamp never changes.

In /etc/openhab2/items a file names weather.items exists:
Group Wettergraphik
Number Unna_Temperatur “Temperatur [%.2f °C]” (Wettergraphik) {weather=“locationId=Unna, type=temperature, property=current”}
Number Unna_Luftfeuchtigkeit “Luftfeuchtigkeit [%d %%]” {weather=“locationId=Unna, type=atmosphere, property=humidity”}
Number Unna_Luftdruck “Luftdruck [%.0f mb]”{weather=“locationId=Unna, type=atmosphere, property=pressure”}
Number Unna_Bewoelkung “Bewölkung [%.1f %%]” <sun_clouds> {weather=“locationId=Unna, type=clouds, property=percent”}
Number Unna_Windgeschwindigkeit “Windgeschwindigkeit [%.0f km/h]” {weather=“locationId=Unna, type=wind, property=speed”}
String Unna_Windrichtung “Windrichtung [%s]” {weather=“locationId=Unna, type=wind, property=direction”}
DateTime Unna_UpdateTime “Letztes Update [%1$td.%1$tm.%1$tY %1$tH:%1$tM]” {weather=“locationId=Unna, type=condition, property=lastUpdate”}
Number Wettergraphik_Zeitraum “Temperaturverlauf”

In /etc/openhab2/sitemaps the Haus.sitemap has the following content:

Switch item=Wettergraphik_Zeitraum label=“Zeitraum” icon=lines mappings=[0=“Stunde”, 1=“Tag”, 2=“Woche”]
Chart item=Unna_Temperatur period=h refresh=6000 service=“rrd4j” visibility=[Wettergraphik_Zeitraum==0, Wettergraphik_Zeitraum==“Uninitialized”]
Chart item=Unna_Temperatur period=D refresh=30000 service=“rrd4j” visibility=[Wettergraphik_Zeitraum==1]
Chart item=Unna_Temperatur period=W refresh=30000 service=“rrd4j” visibility=[Wettergraphik_Zeitraum==2]

…but the charts are empty and I don’t understand why. Can you say me where my problem is?

Thank you,


<groupName>* - all members of this group will be persisted, but not the group itself. If no strategies are provided, the default strategies that are declared in the first section are applied. Optionally, an alias may be provided if the persistence service requires special names (e.g. a table to be used in a database, a feed id for an IoT service, etc.)

* is not a wild card. It means all members of the Group.

First: thank you for your reply. I don’t know if I understand…

I changed the .persist to

Unna_Temperatur, Wettergraphik* : strategy=everyMinute, restoreOnStartup

or to
Unna_Temperatur: strategy=everyMinute, restoreOnStartup
makes no difference. I have also empty charts, even if I changed the “default” to “everyMinute”.

So… please… can you tell me where the bug is?
Thank you,

Try that:


// rrd4j persistence

Strategies {
	everyMinute : "0 * * * * ?"
Items {
	Wettergraphik* : strategy = everyMinute

I think (maybe) there was a space between Items and {

I don’t recommend using rrd4j for restoreOnStartup, mapdb is far better suited for the purpose as it can store any (almost) type of items whereas rrd4j is limited to numbers

I tried the .persist… now I haven’t any .rrd-files in /var/lib/openhab2/persistence/rr4dj/ and no charts.

This is odd…
Please try uninstalling the rrd4j persistence service
Restart OH
Install the service again
And Restart OH again

I reinstalled the persistence service, but the charts were still empty. The solution was very simple: because /etc/ and /usr/lib are only accessible as root the file owner of rrd4j was root. chown openhab … and i see the chart-lines.

Thank you for your help - often the bugs are soo simple…