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"
when
Item measured_temperature changed
then
if(Math::abs((newState as Number).floatValue - (previousState as Number).floatValue) > 50)
stored_temperature.postUpdate(stored_temperature.state)
else
stored_temperature.postUpdate(newState)
end
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.
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.