Item value recovery after restart

I have 4 items which are DateTime type.

They are selected in the group of items to be persisted.

With restoreOnStartup strategy :

Problem is that after OpenHAB restart is value of this items NULL.

What’s wrong ? Or I must somehow restore values manually ?

I guess, you have RRD4J as default persistence service.

RRD4J just stores numbers. You should use mapdb persistence for restoreOnStartup.

Yes, I’m using RRD4J and only for selected items.

I’m also working with historic data to show a graphs of some items.

Is it possible use any rule which will restore this four DataTime items after restart ?

I’m not familiar with mapdb, so not sure how to setup openhab to have historic data for selected items and working restore after restart.

Just install mapdb persistence and configure it through MainUI. you can select your items and define restore on startup and every change as strategy. It is straight forward like configuring any other persistence…

Shall I use RRD4J and also mapdb ? I don’t want lose data saved in rrd4j. Or use mapdb only for this four DateTime items, which I want restore after restart ?

Use restoreOnStartup with mapdb for all items only.

ok, like this ? :

so now both will work prallel ?

MapDB as backup for reboot and RRD4J for historic data ?

Yes !!

No, you have missed everyChange…

This is my config:

You need everyChange to have the last state in mapDB. For Synchronization, please add “everyMinute” for a couple of minutes, otherwise you might miss some items that do not get changed so often.

And this is my rrd4j config

I changed according to your pictures (I hope so):

for MapDB isn’t necessary everyUpdate strategy ?

No, as an update could have the same value.