Calculation of integral of two datasets for photovoltaics power generation


I have some photovoltaic panels and would like to know how much energy I am producing and actually using.
The panels are connected to a shelly from which I get the current generated power (among other data) in regular intervals. Moreover my electric meter is read out by a tasmota device. All this data is already available in Node-Red and is displayed with grafana. It is important to note that the electric meter is NOT counting backwards! Thus if I am produce more power than I am using, it goes to the public net for free. I would like to calculate the integral over these two curves over short time slices (maybe every minute) as the generated and the consumed power is changing all the time. Then I would substract these datasets from each other to see how much of the generated power actually benefited me.

I also get the accumulate total energy production/concumption from both devices, which could be used.

Any idea how to implement that?


Are you sending the data to influxdb? If so you can use the integral function of influxdb to do it.

Yeah, I am using influxdb. Do you have a good source where I can find more Infos?

It should be in the influxdb docs. In fact I know it is because I remember seeing it. The section on Querying.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.