Page 1 of 1

Daily total not calculated right

Posted: Sunday 07 July 2019 11:17
by bjornp
I am monitoring the total revenue of a Piko solar inverter. Type is virtual device Electric (Instant+Counter). Both counter are filled with correct values every 5 minutes. The data in the tables look correct.

Two issues:
1. The initial value (here 6936 kWh) is always the initial counter of lifetime total, which is very high (not zero), so the graph starts with a spike. I expect Domoticz to calculate the difference with the second value and remove the initial (false) value.
2. Four days later the Last week graph shows a second spike (total counter, not difference since day before). It looks like there is an error in the calculation of totals per day.

Can someone explain these two points?
usage.jpg
usage.jpg (310.56 KiB) Viewed 932 times
Related to post in Bugs section https://www.domoticz.com/forum/viewtopi ... =6&t=28554

Re: Daily total not calculated right

Posted: Sunday 07 July 2019 21:25
by bjornp
Is it possible there is a bug in at MainWorker::decode_Energy (starting at line 8851 in mainworker.cpp)? I'm not very good at reading C++ code ;-)
The problem doesn't seem to exist with another virtual device (also solar inverter).

Re: Daily total not calculated right

Posted: Thursday 11 July 2019 18:41
by bjornp
Deleting data point (shift left click) doesn't work in week graph, but it does work in month graph. :lol:
That way I was able to delete the initial value.
The second spike was my bad... LUA script hung up Domoticz around the time the daily total should be calculated.
Thanks for the help Gizmocuz!