Webfront graph showing wrong values.

Hi community,

I have a script with a query once a day to get yesterdays total power consumption for my house from an API.
In the archive the values show up correctly with the correct timestamp.
This script runs sometime after midnight and adds the value and the timestamp to the archive with yesterdays date.

Capture.PNG

The float value is showing 91 in the archive and the variable, but in the webfront it is showing only around 3…?

I tried the same with hourly consumption an here also the webfront trend is showing completely faulty values, and I have no clue why.

The script is reaggregating the variable every time the script runs also.’
The variable has aggregation set as „Counter“ as I believe should be with KWH? If set to „Standard“ then the value is displayed correctly.
Any idea why??

Andreas

The aggregation „Counter“ displays the delta between the new and the current value. I assume the counter was at 88 kWh the day before and thus it shows 3 kWh. The counter aggregation is meant for increasing counters that usually only count upwards. As the value of that counter is not that interesting, but rather the energy consumption of a day, the delta is shown.

In your case, I see two solutions: You can just add the daily consumption to the variable instead of setting it or you reset the variable to 0 before. The aggregation interprets that as resetting the counter and will start again at 0.

I’m not sure what you want to see in the diagram? If the logged value is the daily delta, and not a counter value, then aggregation „Standard“ is the correct choice.

If you log the counter, and want see the delta, then aggregation „Counter“ is fine. But if you just increase the counter value once per day, then obviously the hourly values have no meaning … you will just see one large jump at that moment when the daily addition was done.