Function AC_GetAggregatedValues returns incorrect values

I use a script to monitor my daily electricity consumption and the yield of my solar panels. Because the function AC_GetAggregatedValues gave incorrect values, I also calculated the daily consumption with the function AC_GetALoggedValues.

I have just done a „Reaggregate all“, for 2 variables the errors have disappeared. The AC_GetAggregatedValues function still returns incorrect values for variable 36615.

I have highlighted the incorrect values in red in the spreadsheet.

Attachments:

  • Variable settings: Settings.json
  • History of 4 variables in C:\IP-Symcon\db\2018\06
  • Script to calculate the daily figures: 10061.ips.php
  • Script output: 10061.txt
  • Script output analysis: 10061.xlsx (Excel)

IP-Symcon AC_GetAggregatedValues1.zip (707 KB)IP-Symcon AC_GetAggregatedValues2.zip (354 KB)

06/14/18 06:46:41 | 29878 | DEBUG | Archive Control | Writing negative record size for variable 36615
06/14/18 06:47:47 | 29878 | DEBUG | Archive Control | Writing negative record size for variable 36615
06/14/18 06:48:52 | 29878 | DEBUG | Archive Control | Writing negative record size for variable 36615
06/14/18 06:49:57 | 29878 | DEBUG | Archive Control | Writing negative record size for variable 36615
06/14/18 06:51:03 | 29878 | DEBUG | Archive Control | Writing negative record size for variable 36615
06/14/18 06:52:08 | 29878 | DEBUG | Archive Control | Writing negative record size for variable 36615
06/14/18 06:53:12 | 29878 | DEBUG | Archive Control | Writing negative record size for variable 36615
06/14/18 06:54:17 | 29878 | DEBUG | Archive Control | Writing negative record size for variable 36615

Hi Henk,

unfortunately, we cannot reproduce the issue with your data.

We’re still looking for a reason for the record size to turn negative. Does the record size remain negative after reaggregation?

And could you check your log for the time the record size became negative? There should be an according error message. Candidates are:

  • Reading data for aggregation decreased the record size.
  • RecordSize became negative while deleting variable data:
  • Variable is initialized with negative aggregation size.

The message will only appear in the log, not in the message tab of the console. If you reaggregate the variable and the record size remains negative, the message should trigger again as well.