Hello,
is there a way to get the last e.g. 10 data points from the persitence data (at the moment i use rrd4j database) to a rule? I need it for a transient based rule.
Thanks for help.
You’ll have to use the sendHttpXRequest Actions to query openHAB’s REST API for the last 10 minutes of entries (note that rrd4j stores a value every minute whether it’s been updated or changed or not so make sure this makes sense with how you want to use the values) and parse them out of the resultant JSON.
You could individually fetch data in a rule for now-1min, now-2min etc., again relying on the records being at one minute intervals.