I’m currently experiencing the following problem.
I’m writing the current rainfall in an infludb from the openweathermap binding. Every everyMinute is written to the DB.
I want to query the amount of rain in the last 24h in a rule like this:
rule "xyz" when Time cron "0 0/1 * 1/1 * ? *" then var sum = LocalWeatherAndForecast_Current_Regen.sumSince(now.minusHours(24), "influxdb") logInfo(sum.toString) end
Unfortunately a wrong value comes out here.
Over Grafana I get the correct rain amount in 24h with this querry:
SELECT sum("value") FROM "LocalWeatherAndForecast_Current_Regen" WHERE time >= now() - 24h GROUP BY time(15m) fill(none)"
Do I have another mistake in the rule?