I recently ran in to a problem regarding the rr4dj persistence database. I updated openhabian to latest version 2.4 Snapshot. Before I used 2.3.
Now it looks like a numeric item is not restore correctly
I have the following configuration:
In runtime this item contains integers from 0 … 3
Persistence looks like that:
Alarm_Betriebsmodus : strategy = everyChange, restoreOnStartup
Up to v2.3 everything worked as expected. Let’s assume that the item value is 1. When the system starts again the item value is restored as 1.0.
What can I do to make persistence deliver the correct value 1 instead of 1.0?
Use mapdb for restoreOnStartUp. That database is made for that.
for Vincent’s recommendation
+rrd4j requires at least everyMinute persistence strategy to work properly (some debate this one )
Be the same underlying issue as this post, storing as a floating point.
I’m guessing it gives you some problem because 1 != 1.000000001 ?
switching to mapdb persistence solved this issue. This is perfectly suitable for my needs.
Thx @all for the great support.