How to get the last 5 values from the RRD4J?

sorry - bit OT for now, but stay with me.

If I understand this correctly, this one does filter out values, not within a certain pattern?
I would like to add to this if possible a variation in percentages instead of absolute values?

Reason I ask is, that I switched (since a long time) to using Node-Red for gathering information and “pre-processing” those and then sending cleared ones to openHAB using the “filter node”.

I also have some devices that are prone to send faulty values from time to time, which could potentially lead to really not expected behaviours of my rules.

So - that was my first thought reading this:

Use node-red as a pre-processor. Currently many MQTT-values get read from a node-red flow, get checked through a filter (like screenshot above) and are then sent in MQTT topics, which are read by openHAB. If the kind of filtering node-red offers in the filter-node can be done within openHAB, I’m very happy to use it!

see more on node-red RBE node: