Conflict between rrd4j and my.openhab persistence?

I had a good working rrd4j persistence with working graphs but after enabling the persistence for my.openhab I no longer see the graphs.
Also min and max values are not calculated correctly anymore.

my rrd4j contents:
// persistence strategies have a name and a definition and are referred to in the “Items” section
Strategies {
everyMinute : “0 * * * * ?”
everyHour : “0 0 * * * ?”
everyDay : “0 0 0 * * ?”
default = everyChange

Items {
// DemoSwitch,NoOfLights,Window_GF_Toilet,Heating* : strategy = everyChange, everyMinute, restoreOnStartup

// let's only store temperature values in rrd
Temperatuur*, Weer*: strategy = everyChange, restoreOnStartup


My my.openhab contents:
Strategies {
default = everyChange
Items {

  • : strategy = everyChange

Any idea what could be wrong here?

To have a reliable rrd4j persistence you should use “everyMinute”, not “everyChange”. everyChange works sometimes, but not reliable, everyMinute works always …

BTW, I had the same problem when I added my.openhab persistence, after two or three days the problems with rrd4j were gone (without doing anything).

Good luck.

The reason for this is that rrd MUST get data within the period that it is storing to disk. In OH, there are fixed periods used for the RRD store - the shortest being 60 seconds. So, if no data is received in a 60 second time period, then RRD will store no data. To ensure data is always recevied within this period, you need to use everyMinute.


1 Like

Thanks for clarification!
I’ve read a lot of times in different forums we should (must) use everyMinute, but there was never an explanation.


Thanks Chris, I changed it to everyMinute, and I see the charts appearing!

I have the same problem: rrd4j does not seem to start if myopenhab is present. I work around it this way for now:

  1. remove myopenhab jar from the addons
  2. start openhab
  3. put myopenhab jar back into the addons

A bit painful. Anyone else noticed this ?

I have my config set to every minute, and once it starts, it works fine with graph and all.