Removing samples in persistence / graphs

Hi all, I need to delete some samples from persistence file of one item, as they were somehow produced with false values.

Should I manipulate the relative .rrd file

or is there any alternative way to achieve it?

Later on I can think to a “filtering rule”, such as do not accept temperatures which varies more than 50 degrees from previous sample, but for now I need to remove that “false positive”.


You can use rrd inspector to manipulate the rrd file (it’s a little bit tricky to get it up and running, anyway… see HowTo Change values in an rrd4j database for instructions.

On the long run, openHAB does not filter any incoming data, so you will have to use an additional item to manipulate the values with a rule, like that:

rule "incoming temperature"
   Item measured_temperature changed
   if(Math::abs((newState as Number).floatValue - (previousState as Number).floatValue) > 50)

This way you won’t lose the time stamps.
BUT: if there are two spikes together, they are maybe not filtered.
So maybe better compare to the last stored_temperature.

1 Like

You are using rrd4j as persistence service, in order the change perstited values in this kind of database one needs to understand the archive structure of rrd4j. Theses false entries might show in each archive and would habe to be changed in affected archives.
Using the rrd-inspector such is possible, please read this Old Thread. The needed version should be rrd4j-3.4-inspector.jar.

1 Like

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.