Format change after restart

i have a problem with a variable witch i use for controling my alarm system.

Number      OH_ALARM_Zustand_Soll       "Soll"                      <settings>  (AL_Alarm)    {stateDescription=""[pattern="%d",min="1",max="4",step="1",options="1=Aus,2=Extern,3=Intern,4=Wartung"]}

With this variable, i control the state of my alarm system through the sitemap. I’ configured persistence services over rrd4j:

Strategies {
    // for rrd charts, we need a cron strategy
    everyMinute : "0 * * * * ?"

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

Now my problem: I set the variable to “Extern” via sitemap. The value is 2. Now, i restart my openhabian. After reloading the variables, the state changes from NULL to 2.0. Within the sitemap, the state “Extern” wouldn’t be shown, because the option 2 is mapped with Extern and not 2**.0**. I’ve tryed to add the pattern=“%d”, but the mapping still doesn’t work because the value is 2.0 again.

Any ideas to workarround this issue? One workarround would be, that i run a rule on System restarted an correct the value, but i’m looking for a better solution.

Yep, this is what restore-on-startup from rrd4j (and some other services) does.

MAPDB persistence is purpose designed for restore-on-startup and does not suffer this limitation. Remember to stop other services from doing the restore.

Hi Rossko,
thx a lot. I’ve changed from rrd4j to mapdb. It seems to work as expected now.