I changed the transmission rate of the value from 30s to 60s to have the easier math…
So the Item Waermepumpe_HT is changing every 60s now.
i found a topic where someone is asking nearly the same, but the syntax is not clear for me and i am not able to replicate it for my purposes.
I did a typo in my rule for the daily count… so i don´t know if this rule is working properly… I will see it tomorrow morning.
rule "Daily Power Consumption"
when
Time cron "0 59 23 ? * * *"
//Item Waermepumpe_HT changed
then
val summary = Waermepumpe_HT.sumSince(now.minusDays(1), "jdbc") /60 /100
Heatpump_total_kwh_daily.postUpdate(summary.toString)
end
I am afraid this counting function I have to let it go for now… because I have to learn the persistance function and the rule syntax much much more in detail to solve this.
Normally i can gather all needed informations from different threads and combine them for my purposes but here i am stuck.