Hi,
I am a bit puzzled concerning the results I get by using sumSince. I have a rain gauge and wanted to store aggregated values for varying time periods in items.
Below is the excerpt of the rule doing the aggregation:
`
rule "RainFall GA WeatherStation Update"
when
Item RainFall_GA_WeatherStation received update
then
RainFall_Last24h_GA_WeatherStation.postUpdate(RainFall_GA_WeatherStation.sumSince(now.minusHours(24)))
RainFall_Last12h_GA_WeatherStation.postUpdate(RainFall_GA_WeatherStation.sumSince(now.minusHours(12)))
RainFall_Last3h_GA_WeatherStation.postUpdate(RainFall_GA_WeatherStation.sumSince(now.minusHours(3)))
RainFall_Last1h_GA_WeatherStation.postUpdate(RainFall_GA_WeatherStation.sumSince(now.minusHours(1)))
RainFall_Last1w_GA_WeatherStation.postUpdate(RainFall_GA_WeatherStation.sumSince(now.minusWeeks(1)))
RainFall_Last1m_GA_WeatherStation.postUpdate(RainFall_GA_WeatherStation.sumSince(now.minusMonths(1)))
end
`
The item RainFall_GA_WeatherStation is persisted using rrd4j.
I would now expect that the values do increase monotonic, thus the aggregation holding the sum for the month is the largest. However, this is not the case: The monthly value shows 7.6 while the 24hours value show 814.9. Probably, worthwhile to mention is that I have values for only around 24 hours so far.
I think I understood something fundamentally wrong or did some other silly mistake.