averageSince works only with default persistance rrd4j

After migration from OH1 to OH2 I lost avarageSince functionalty in my Rules.

The solution I found finally is to set up properly runtime.cfg file

org.eclipse.smarthome.persistence:default=rrd4j

My original setup was mysql

Hope that will help as no direct indication in the log I could not find.

If you want averageSince or anything else from the non-default persistence supply the name of the persistence store in the method call.

Foo.lastUpdate("rrd4j")
Foo.averageSince("MySQL")
...

Hi rlkoshak,
I would like to use the averageSince method for the last 5 minutes from a non-default persistence (“rrd4j”).
How to combine the parameters in one statement?

  • Foo.averageSince(“rrd4j”)
  • Foo.averageSince(now.minusMinutes(5))

Think I found it:
•Foo.averageSince(now.minusMinutes(5), “rrd4j”)

2 Likes