Fix battery sign and separate PV from inverter output

Verified against simultaneous SolarEdge app readings (PV 40 W,
battery discharge 520 W, house 560 W): battery1_power negative
means discharge, and power_ac on this DC-coupled Energy Hub is
the inverter's TOTAL AC output - it already contains the battery
contribution. The old formula double-counted the battery, so
house_load collapsed (44 W shown vs 560 W real) and the PV tile
showed battery-inflated totals, which looked like PV and house
consumption were swapped.

New derived fields: house_load = power_ac + grid, and
pv_power = power_ac - battery (true PV production). Dashboard PV
tiles and both yield panels now use pv_power / integral(pv_power)
- the energy_total lifetime counter also counts battery
throughput and is not a PV yield.
This commit is contained in:
dj7nt committed 2026-10-10 17:48:23 +02:00
1 parent 412accc003
commit 0ec3bcb8ef
4 files changed
+57 -42

No files matched your search

+11 -8
View File
@@ -56,15 +56,18 @@ Import `grafana_dashboard.json` (Dashboards -> New -> Import). Select your
InfluxDB datasource when prompted (e.g. `InfluxDB-HJK`); the `$serial` variable
is filled from the `serialnumber` tag. InfluxQL only, InfluxDB 1.x.
The daemon also writes derived flow fields (`house_load`, `grid_import`,
`grid_export`, `battery_charge`, `battery_discharge`, `solar_to_house`) so the
dashboard's consumption-source panels are plain `mean()`/`integral()` queries.
The daemon also writes derived flow fields (`house_load`, `pv_power`,
`grid_import`, `grid_export`, `battery_charge`, `battery_discharge`,
`solar_to_house`) so the dashboard's consumption-source panels are plain
`mean()`/`integral()` queries.
**Sign calibration:** `meter1_power` positive = import and `battery1_power`
positive = discharge are assumptions observed once; verify on the first sunny
day (export while surplus / charge while battery fills). If inverted, flip
`METER_IMPORT_POSITIVE` / `BATTERY_DISCHARGE_POSITIVE` in
`solaredge_modbus_mqtt/__init__.py` and restart - all derived fields follow.
**Sign conventions (verified against the SolarEdge app):** `meter1_power`
positive = export, `battery1_power` negative = discharge, and `power_ac` is
the inverter's *total* AC output (PV + battery, DC-coupled Energy Hub) - which
is why `pv_power = power_ac - battery` and `house_load = power_ac + grid`.
If a different system disagrees, flip `METER_IMPORT_POSITIVE` /
`BATTERY_DISCHARGE_POSITIVE` in `solaredge_modbus_mqtt/__init__.py` and
restart - the derived fields follow.
### Uninstall