Help with output math

i am struggeling to be curtain that my power usage metering is good how i have it set up.
this is my electrical panel:

the A,B, C stands for the phase’s

for energy consumption i have:
Grid_3B + Grid_4C + Grid_5A + Garden_6B + Garden_7C + Garden_8A max 0
production to grid:
((Grid_3B + Grid_4C + Grid_5A) min 0)

is this right i cant get my head over it someone told me this is not correct

ps my 3 main wires coming in are to short and are behind the din rail so i cannot get clamps on it

I don’t think so. At least by this diagram.

I’m not sure what you are trying to do. What do you mean by “energy consumption?” Are you trying to quantify the energy that you are using in your home, or the energy that you are “importing” from the grid? Those are two different things. The energy that you use in your home includes what you generate, the energy that you import from the grid does not.

So lets define four quantities:

  • grid_import - defined as the kWh that you buy from the grid.
  • grid_export - defined as the kWh that you export to the grid.
  • consumption - defined as the kWh that you consume in your home
  • generation - defined as the kWh that you produce with the solar inverters.

Since you didn’t provide the names of the solar inputs, for this example I’ll call them solar1 and solar2. Let’s also stipulate that the Grid inputs are positive when importing and negative when exporting, and that solar1 and solar2 are positive when generating.

  • generation = solar1 + solar2

  • consumption = Grid_3B + Grid_4C + Grid_5A + Garden_6B + Garden_7C + Garden_8A + solar1 + solar2

  • grid_import = ( Grid_3B + Grid_4C + Grid_5A + Garden_6B + Garden_7C + Garden_8A ) max 0

  • grid_export = ( Grid_3B + Grid_4C + Grid_5A + Garden_6B + Garden_7c + Garden_8A ) min 0

These Scripts will give you accurate data when plotted with Graph+ for a time period up to a day or so, but become less accurate as the time period increase. To simplify and make it completely accurate, you may want to take a look at the integrator feature introduced in the recent release 02_07_03…

If you define an integrator as:

grid = Grid_3B + Grid_4C + Grid_5A + Garden_6B + Garden _7C + Garden_8A

you can then define the four values as:

  • solar = solar1 + solar2

  • consumption = + solar1 + solar2

  • grid_import = grid.pos

  • grid_export = grid.neg { add abs if you want it as a positive value for something like Home Assistant)

With this approach, your import, export and consumption will be accurate (going forward) even when you query over a week, month or year.

1 Like

Thanks for the reply and getting it clear for me!!

1st: energy consumption is the energy that my home uses.
2nd i cannot seem to update to 02_07_03.

What happens when you try? Are you in Oz?