Best way to send out data from smart meter and inverter

Hi there,

My setup is composed by an ABB Inverter and a energy meter from Nansen (brazilian company). From ABB inverter I am able to read power and energy (instantaneous power and cumulative energy for the day) but from my meter (where I have access to serial port) I can read only energy consumed and energy exported (so no instantaneous power). The way things are wired enforces that:

Meter´s energy import accumulator is the total energy I´ve imported from grid. (gross import)
Meter´s energy export accumulator is the energy I exported to the grid (this the energy not consumed in the house). (gross export)
ABB´s power is the instantaneous power being generated (obviously)
ABB´s energy is the accumulated energy generated for the day (obviously) (gross generated)

*No way to read total consumption because house can be using power from the inverter + power imported from grid at same time. Consumption would be derived from day import, day export, day generation.

Ex:

Import for the day 5KWh
Export for the day 4KWh
Generation for the day 6KWh

Consumption is: (6-2)+5 -> generated - exported + import

Another issue is that ABB reports generated energy in a Wh resolution, so I can have 6573Wh generation for instance. However, Nansen meter reports in KWh resolution, hence I read 4KWh consumption, not 4125Wh (the meter is intended for billing and local regulations only allow to bill a full KWh consumed, so you do not have bills of 225,33KWh month but 225KWh month). Because of this I can have small daily distortions on my gross consumption calculations, for instance:

Generated: 6573KWh
Import: 5KWh (let´s suppose it was actually 5000Wh)
Export: 5KWh (let´s suppose it was actually 5950Wh but meter still reports 5)

Actually I exported almost 6KW but my consumption would be calculated as 7573Wh when it was 5623Wh. Ok, I can live with that since it is a limitation of the system. However, next day, in the first light, meter will report 1000KW exported (because first 50Wh generated will cause meter to increase from 5KWh to 6KWh exported). PVoutput would complain that I am submitting a exported value greater than generated value, right? So I believe I need to enter exported value once a day for the total exported in that day, am I right? How about the import energy? I cannot send it in live because API does not support it, I have to report it only at the end of day?

Today I am doing it manually: I send import data as being consumption every 5 minutes and send generation together every 5 minutes. In the end of the day I manually enter exported data and copy consumption value to import value and leaving blank field for consumption. Than PVoutput calculates the consumption.

Is that correct? Any other idea?

If this is the only and best way I will change my scripts to report only ABB data all day long and every day at 5 minutes past midnight I will calculated delta import and delta export and set for day before.

Thanks

Its possible to get the gross consumption from import/export + generation. However, if the meter resolution is in kWh then the results will be inaccurate.

Thanks for answer. I am aware of distortions, no way to avoid them now. My main concern is the right way to present data to PVOutput so I can follow my system performance.

Regarding the Nansen meter, as per local regulations I just need to know (Imported - Exported) in KWh for billing purposes. The sad news (for me) is that I cannot attach a power meter (like emonCMS ecosystem) to the main wires in the house since generator is wired inside after fuse box, hence, a simple power meter would meter power in both directions and still I would not have real consumption from this power meter. The way would be a bidirectional power meter with wh resolution and not KWh billing type.

Thanks.