I’ve got a GoodWe solar inverter and 2 x batteries setup in the last couple of days. I’ve used the GoodWe integration for HA to bring in the data using the modbus connection. All working fine and I can see the entities.
However I’m finding some discrepancies between my HA dashboard and the SEMS+ app
On SEMS the total solar generation today is showing 17.3kwh. On HA (picture) it’s showing as 14.1kwh.
The live generation from solar seems to match - 6.5KW.
I’m confused why I’m showing 3.41kwh pulled from the grid today when my batteries are full - and were full overnight. Do I need to set something up to ensure that it pulls from the battery rather than the grid (I’m just using a fixed price at the moment rather than any agile tariff).
I’m sure there are going to be other questions as I get going…
Just guessing it’s a similar case for you - as I saw those flaws as well…
While the inverter is balancing around 0 (e.g. only battery usage) it won’t always hit that 0 exactly. Additionally there is a time lag between the internal inverter sensors, often only milliseconds, which causes measurements to be asynchronous.
Look at that snapshot from my Home this morning, while the coffee machine was running. Battery serving the house…
All 3 phases sum up to
+640W + (-432W) + (+89W) = 297W
But only for 1 or 2 measurement cycles. Anyhow, during the day all those little and short values sum up on the energy meters.
Most likely your inverter app and the integration calculate those conditions differently, if at all…
If you only use a polling interval in the range of seconds, there is no good way of filtering.
As the inverter needs the home electricity data, you probably got a smart meter installed as well. I have got an Eastron SDM630 in my electric cabinet that is connected to and polled by the inverter every 280ms via Modbus. I just hooked a Waveshare RS485 TO ETH in between to read this communication. On such high frequency I can do statistics and only give sensor values to HW every 15s.
Here is my extremely well working Waveshare sniffer…
Main principle:
check for the signs on the 3 phases. Equal means real power flow. Sum over the phases indicates that as well and shall be around 0 for no power flow
average P total about 1 minute (4 measurements) → if in 15s I have 297W and next 15s it shows -300W that cancels out. Most likely no real power flow
take the min of P-total and phase sum
below a threshold → rate it as phantom power and stall the energy meters
Instead of some kWh difference per day I now have got between 0 and maybe 0.1kWh difference, compared to the physical meter from my electricity provider. The script is never going to be perfect but what in life is?