InfluxDB vs Graph+ discrepancies with integrator

Hi. I was wondering if it’s expected for there to be a small amount of variance between data sent to InfluxDB and the same data graphed in InfluxDB. It’s only a tiny amount, but added up over months it may lead to inaccuracies.

I have a Grid integrator setup with a GridImport output defined as: Watts = Grid.pos which i’m sending as is to InfluxDB.

When I compare the output of hourly grouped buckets with the same time range and the same output I get slightly different results:

InfluxDB query:

from(bucket: "iotawatt")
    |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
    |> filter(fn: (r) => r["_measurement"] == "GridImport" and r["unit"] == "Wh")
    |> aggregateWindow(every: 1h, fn: sum, timeSrc: "_start")
    |> cumulativeSum()

Graph+

InfluxDB values:

2023-04-03 00:00:00, 635
2023-04-03 01:00:00, 1287
2023-04-03 02:00:00, 1948

Graph+ values:

2023-04-03 00:00:00, 643.9262000000
2023-04-03 01:00:00, 1306.1516000000
2023-04-03 02:00:00, 1976.6862000000

Is this to be expected?

EDIT:
When I define an output of (GridA + GridB + GridC) max 0 however, I get matching values in both. Is it more accurate to use an integrator or to calculate it manually?

It looks like the drift between the two calculation starts to increase as my solar output increases:

date,GridImportManual,GridImportIntegrator,SolarGeneration
2023-04-03 07:28:00, 5033.88, 5033.88, 18.30
2023-04-03 07:30:00, 5036.41, 5036.70, 22.16
2023-04-03 07:32:00, 5037.02, 5038.85, 24.42
2023-04-03 07:34:00, 5037.02, 5039.16, 35.25
2023-04-03 07:36:00, 5037.02, 5039.16, 45.37
2023-04-03 07:38:00, 5037.02, 5039.16, 55.07
2023-04-03 07:40:00, 5037.02, 5039.16, 52.63
2023-04-03 07:42:00, 5037.02, 5039.16, 64.01
2023-04-03 07:44:00, 5037.02, 5039.33, 40.77
2023-04-03 07:46:00, 5037.02, 5039.33, 38.71
2023-04-03 07:48:00, 5037.02, 5039.66, 33.92

The answer is no. They should be exactly the same, especially when you are only adding them up.

There is something different here. Can I see:

  • influx setup
  • integrator setup
  • outputs setup

Waking up this morning it seems that everything is now matching as expected. I’m wondering if this was caused by me tinkering with the post interval and bulk send settings config for InfluxDB. I guess that could skew some results over the bounds of individual hourly buckets.

I will keep an eye on it and see if any weirdness returns!

1 Like

“Time heals all” doesn’t usually apply with computers. Maybe there’s a way post interval is involved with influx, but you showed a table that I think was Manual vs Integrator without influxDB. I’m suspicious of the repeating 5037.02, 5039.16.

Definitely keep an eye out and if you have more trouble you know what I need to look into it.

1 Like