rrd4j error when trying to load chart

I’m having a bit of a nightmare trying to get charts to work in Openhab on my Pi.

I have two ESP8266s logging temperature values via MQTT. I can list the values fine in my sitemap, but can’t display a chart.

Items:

Number Bathroom_Temp “Bathroom Temperature [%.1f °C]” (Temperature_Sensors) {mqtt=“<[broker:hab/bathroom/temperature:state:default]”}

Sitemap:

Frame label=“All Rooms” {
Chart item=Temperature_Sensors period=1h refresh=30000
}

Persist:

Strategies {
everyMinute : “0 * * * * ?”
everyHour : “0 0 * * * ?”
everyDay : “0 0 0 * * ?”
default = everyChange
}
Items {
// persist everything when the value is updated, just a default, and restore them from database on startup
* : strategy = everyChange, restoreOnStartup
// next we define specific strategies of everyHour for anything in the Temperature group, and and every minute for Humidity
Temperature* : strategy = everyMinute
Humidity* : strategy = everyMinute
}

I can see the rrd files being created, but when I try to view the chart I see the following in openhab.log

203600153-05-30 01:38:37.641 [INFO ] [ui.internal.chart.ChartServlet] - Illegal argument in chart: {}
java.lang.IllegalArgumentException: Invalid RRD step specified: -6751202914410168260

One thing I find very strange is the date stamp in the log. The time is 21:05 at the moment, not 01:38. If I call date in Putty I get the correct date time.

Any ideas? I’d love to get the date right to rule that out first.

In your persistence file it looks like you are trying to use the * as if it were a wild card. It is not a wild card. It is a character to denote that the Item named is a Group and to persist all of the Items in that Group. So you probably want:

Temperature_Sensors* : strategy = everyMinute

I’ve made the change, but still see the same error

Removing the generic everyChange strategy appears to have resolved the issue. I’ll leave it running for the rest of the day, but it seems ok at the moment.

My rrd4j.persist file now looks like this:

Strategies {
everyMinute : “0 * * * * ?”
everyHour : “0 0 * * * ?”
everyDay : “0 0 0 * * ?”
default = everyChange
}
Items {
// persist everything when the value is updated, just a default, and restore them from database on startup
// * : strategy = everyChange, restoreOnStartup
// next we define specific strategies of everyHour for anything in the Temperature group, and and every minute for Humidity
Temperature_Sensors* : strategy = everyMinute
// Humidity_Sensors* : strategy = everyMinute
// alternatively you can add specific items here, such as
//Bedroom_Humidity,JamesInOffice : strategy = everyMinute
Living_Room_Temp : strategy = everyMinute
}