Infuxdb output calculation

i need to have 2 outputs to get an automation working right in Home assistant.

  1. grid power consumption (i.e. power i consume from the grid) positive value
  2. grid power production (i.e. power i produce to the grid) negative value

how do i configure these 2 influxDB outputs ?

Depends on your power system.

How many mains do you have?
1 (Europe 230Vj
2 (North America split-phase 120/240V)
3 (Three phase Australia, Germany etc.)

Where does the inverter connect?
1 to grid side (before) the main breakers
2 on the house side (after) the main breakers

Can you show a screenshot of the input configuration display so I can see the names?

i have 3phase where 2 inverters have there own phase

phases are correct A,B,C

also the inverter connects to the house breakers

I’ll take that to be case 2 above.

So grid power, whether consumption or production, is what is going through you mains i.e. the sum of your three mains. As I understand it you want to break that down on whether it’s positive (consumption) or negative (production).

So the the mains total is:
(Grid_3B + Grid_4C + Grid_5A)

To get only the positive values (grid consumption):

(Grid_3B + Grid_4C + Grid_5A) max 0

To get the negative values (grid production)

(Grid_3B + Grid_4C + Grid_5A) min 0

To prove this out, you can create a couple of outputs and look at them with the local graph.