Simple Persistence Config not working

First, thanks to all the folks that have worked to create this software. It’s much appreciated!!

I’m trying to get restoreOnStartup working in OpenHAB 3.1

My Persistent Default Service is JDBC. I’m happy to use JDBC Postgres, or mapDB or whatever for the restoreOnStartup components.

Here is my .item definition:

 Number:Temperature F2_Bedroom_IdealTemp "Ideal Temp [%.1f %unit%]" <Temperature> (F2_Bedroom,gF2_Bedroom_HVAC , gPersist)

I don’t really care what Persistence store I use, I’ve seen strong recommendations in the forums to use mapDB over Influx and MariaDB (I’m using JDBC Postgres for all my other persistent storage). Here is my mapDB .persist:

Strategies {
  default = everyChange

Items {
    // persist items on every change and every minute
    gPersist* : strategy = everyChange, everyMinute, restoreOnStartup

My sitemap looks like this:

Setpoint item=F2_Bedroom_IdealTemp label="Ideal Temp [%.1f %unit%]" minValue=65 maxValue=85 step=0.5

Any thoughts on what I’m doing wrong? This seems like a really simple configuration! What am I doing wrong?

Thanks so much for the help/assistance!


Use code fences instead of quotes when posting code to the forum.

code goes here

everyMinute is not needed for anything except rrd4j, unless you have a specific reason to save redundant data to the database (maybe for charting). I can’t think of a single reason to save everyMinute to MapDB since it only saves the most recent value. It just renders that data unusable to, for example, determine when the Item changed to it’s current state.

Not really because you don’t actually say what’s specifically not working? The obvious thing to check is that you’ve installed the add-on.


Good points. I’ve modified the original post to use code blocks.

The expected behaviour is that upon restore (i.e. a shutdown and startup) the value in F2_Bedroom_IdealTemp would remain (i.e. 67.5)

The current behaviour is that upon restore (i.e. a shutdown and startup) the value is NULL, and remains NULL until it is set by the UI.

The the mapdb add-on is installed, as is the jdbc add-on. rrd4j is also configured with a .persist file.


The Group gPersist exists?



grumble grumble. I can’t believe I overlooked that.

The Group must be explicitly declared in items. You cannot implicitly declare a group through another Item. Items file now looks like this:

Group   gPersist
Number:Temperature F2_Bedroom_IdealTemp "Ideal Temp [%.1f %unit%]" <Temperature> (F2_Bedroom,gF2_Bedroom_HVAC , gPersist)

Thanks again.