Hi,
Shelly 3EM does not support Net metering, which is used extensively here in Australia and in many other parts of the world eg Canada, Denmark, Netherlands, Slovenia, Spain, USA.
We have to create complex sensors in home assistant to calculate Net metering and it's not accurate due to the update frequency of the sensors.
With Net metering the 3 phase meter is treated as whole service, you are not metered per phase, you are metered for the sum of the phases as import or export.
So if you have constant for 1hr:
Phase A = 100W
Phase B = 150W
Phase C = -2000W (solar generation)
You are metered for the sum: 100+150 +(-2000) = -1750Wh export.
On your bill you are charged(for that 1hr):
0 kWh Usage (import)
1.75 kWh Feed-in credit (export)
The counters total and total_retuned do not sum up the phases, they increment per phase.
Could you add some counters(kWh) that increment for each moment in time?:
power_import(W): if (PhaseA_power + PhaseB_power + PhaseC_power) > 0
power_export(W): if ((PhaseA_power + PhaseB_power + PhaseC_power ) < 0 ) * -1)
total_import(kWh): - power_import recorded over time
total_export(kWh): - power_export recorded over time
Would be great if the 3EM could add support for Net metering and increment these counters in real time!