Add support for changedSince using rrd4j

I want to use motionSensor.changedSince() functions.
I’ve added rrd4j (1.8.3) jar. and this is the list of my persistency-addons:


And added rrd4j.persist file:

Strategies {
everyMinute : "0 * * * * ?"
everyHour : "0 0 * * * ?"
everyDay : "0 0 0 * * ?"
default = everyChange
Items {
Watts,gTemprature : strategy = everyChange, everyMinute, restoreOnStartup
* : strategy = everyChange, everyMinute, restoreOnStartup

and see in the logs the message: Loading model ‘rrd4j.persist’

In my openhab.cfg I configured persistence:default=mapdb but even if I changed it to rrd4j it still didn’t work… Does it mater?

But when I tries to print in the log motionSensor.persist - I see null. and motionSensor.changedSince not working.

Does someone have any idea why it doesn’t work?

What do your rules code look like?

It should be something like:

motionSensor.changedSince(now.minusMinutes(5), "rrd4j") // changed in the last five minutes using rrd4j

Now it looks good. The problem was I didn’t add the “rrd4j” in my rule.