I’m monitoring the temperature measured in my small greenhouse and I am comparing it with the current temperature as obtained by the the weather binding. I am using the rrd4j persistence. I noticed that the Current temperature given by the weather binding is delayed by at least a couple of hours: i.e. I would need to shift the binding temperature to the left of the chart by a couple of hours.
This means that the value recorded say at 12.00 is actually referring to 10.00: therefore I would need to modify the value taken two hours before.
Would this rule work ?
rule "correct delay"
when
Item Temperature changed
then
Temperature_adjusted.historicState(now.minusHours(2)).state=Temperature.state
end
Temperature and Temperature_adjusted are two number items, which are also persisted with rrdj4
Not sure why you want to modify the database? You’ve found the method you could use to fetch the greenhouse data from two hours ago and compare it with the ‘delayed nowcast’. What else is needed?
It might be worth exploring other weather providers to see if something more accurate is available for your locality.