Looking to implement persistence for OH3 (recommendations?)

openHAB 3.2.0 Build #2454

I am getting around to adding persistence to my OH3 setup and looking for the simplest solution … I can get fancier if/when my needs change … all I am looking for at this point is for my items (ones that I care about) are retained and restored after a reboot.

I see there are dozens of options for persistence and (being lazy) I’d rather just get a recommendation for a simple starting point.

I have the RRD4j installed but TBH, I dont think it retains strings … I think that once I install one of the other persistence addons I will need to specify which items I want to retain?

I don’t use any .items files, everything is done through the UI … so hoping that doesn’t change. Also, I just started with OH3 and never used OpenHab before.

With that, any recommendations?

MapDB.

It does not. But when you are ready for generating charts and stuff like that use rrd4j for that. In fact, if you’ve left everything with the defaults, it’s already saving all the values for all of the supported values. It’s also restoring those on startup too so MapDB really only needs to be configured for those Items not already supported by rrd4j.

You will need to create a mapdb.persist file in /etc/openhab/persist (see the docs) to list only those Items you care about that are not already being handled by rrd4j. The default strategy for MapDB is to save all Items and restoreOnStartup all Items generating a race condition between it and rrd4j for restoring Items.

1 Like

Perfect. Thanks Rich. Yes I already am seeing the benefits of the basic history graphing with some of my Luminance capable sensors (very useful) … I will check out MapDB!

FYI - I’m getting a 404 for the MapDB in the current docs … I found this link for 2.5 (assuming its fine)

I think there is an issue for that. There is nothing special about MapDB to document really. It saves one single value per Item so it never grows. There is no configuration, just the standard .persist file.

1 Like

Yes, found that for my simple case the .persist file configuration was very easy and it’s working great!