Power-House — Whole-Home Energy Monitoring
Power-House started as a personal itch: our house produces solar power, stores it in a battery, charges an EV and feeds the grid — but the vendor apps each showed only their own little slice, each in its own cloud. We wanted one local, self-hosted view of every energy flow, with years of history and full drill-down. This page walks through what we built, which components we used, how they connect, and how you can rebuild the whole thing from our open-source repository — a tutorial based on our own interests and requirements, shared in the hope it saves you the detours we took.
What we wanted to achieve
- Full visibility of all household energy flows: PV generation, battery, grid import/export, EV charging and per-device consumption
- Long-term history at raw resolution — the ability to answer "what happened last Tuesday at 7am?" years later
- Local-first: no vendor cloud in the data path, everything on our own hardware
- Component-agnostic: any part (inverter brand, wallbox, meters, host) must be swappable without redesigning the system
- Extensible: a future heat pump should be a one-line addition, not a rebuild
Components we used
These are our devices — the architecture doesn't depend on any of them. The repository's adaptation guide lists drop-in alternatives for every row.
| Role | Our pick | Swappable with |
|---|---|---|
| Hybrid inverter + battery | Sungrow SH8.0RT-20 + SBR096 (Modbus TCP) | SMA, Fronius, Kostal, Huawei, GoodWe, … |
| Grid & circuit metering | go-e Controller (CT clamps, local HTTP API) | Shelly Pro 3EM, SMA Energy Meter, P1/SML readers |
| EV charger | go-e Charger | 100+ evcc charger templates |
| Per-device metering | Shelly Plug S | any Home-Assistant-integrated plug |
| Integration hub | Home Assistant on a Raspberry Pi | HA VM/container, HA Yellow/Green |
| Docker host | Synology DS224+ (Container Manager) | any machine that runs Docker Compose |
How it is wired — the architecture
The design boils down to three rules. One: Home Assistant is the single integration hub — every device is integrated exactly once, there; storage and dashboards only ever see generic power/energy entities. Two: only a tiny modbus-proxy talks to the inverter, because many inverter interfaces (like Sungrow's WiNet-S dongle) accept just one Modbus client — the proxy multiplexes Home Assistant and evcc onto that single connection and makes the inverter endpoint a one-line config change. Three: everything site-specific (IPs, credentials, entity ids) lives in gitignored files with committed .example twins, so the public repo is fully generic and parameterizable.
Every entity that Home Assistant knows flows automatically into InfluxDB (state-change based, so flat periods cost nothing). Grafana reads InfluxDB for six dashboards — flow overview, drill-down, battery, EV charging, autarky and circuits. evcc taps the same modbus-proxy for its beautiful live flow view and is ready for PV-surplus EV charging. Home Assistant itself keeps the daily-driver views: its native Energy Dashboard, a mobile live dashboard, and — after losing days of data to silent failures twice — a watchdog that pushes a phone notification whenever a data source goes quiet for 15 minutes.
"Isn't there already an integration for that?"
Yes — and it's great. The mkaiser Sungrow-SHx integration gives Home Assistant the inverter's full Modbus register set and is exactly what runs inside our Home Assistant. So this was never an either/or decision: the integration answers "how do I talk to my inverter?", while our stack answers "how do I turn that (and every other device) into insight I can still query in three years?" Here is what each layer covers:
HA + Sungrow integration alone
The perfect starting point — one device, deeply integrated
- Full inverter register set as HA entities (PV, battery, grid view of the inverter)
- Feeds HA's native Energy Dashboard
- Quick to set up, actively maintained community project
- Detailed history bound to HA's recorder — long-term data survives only as hourly aggregates
- One Modbus client only: add evcc or a vendor EMS and the connection wedges — we lost days to exactly this
- Inverter-only scope: no grid-meter truth, no wallbox logic, no per-device drill-down
Power-House stack (integration included)
The house built around that foundation
- Everything on the left — mkaiser runs unchanged inside HA
- Years of raw-resolution history in InfluxDB + six Grafana drill-down dashboards
- modbus-proxy: one upstream connection, any number of consumers — the single-client problem is gone by design
- Whole-home scope: dedicated grid meter, wallbox, smart plugs, future heat pump — each metered where it can actually be seen
- evcc live flow view, ready for PV-surplus EV charging
- Day-2 operations: outage push alerts, restart hardening, downsampling — it fails loudly, not silently
We didn't replace the integration — we built the house around it. If all you want is inverter data in Home Assistant, start (and maybe stop) with mkaiser's project. It's excellent.
Rebuild it yourself
The repository is deliberately cut so that nothing in it is specific to our house — all our IPs, credentials and entity ids live in gitignored files, and each one has a committed .example twin that documents the format. Rebuilding is roughly an afternoon:
- Clone & parameterize: copy the
.examplefiles (deploy/.env,evcc.yaml,modbus-proxy.yml,site/*.json) and fill in your values - Start the stack:
docker compose up -don any Docker host — InfluxDB, Grafana, evcc and the modbus-proxy come up together - Wire Home Assistant: point your inverter integration at the proxy, merge the provided InfluxDB export snippet, add your meters and chargers
- Dashboards by script:
tools/grafana_setup.pyimports all Grafana dashboards;tools/ha_energy_dashboard.pyandtools/ha_live_dashboard.pyconfigure Home Assistant - Day-2 operations:
tools/ha_watchdog.py(outage push alerts) andtools/influx_downsample.py(long-term storage rollup) — plus the restart-hardening recipes in the deployment guide
Different hardware? The adaptation guide maps each role to alternatives — the whole point of the single-hub design is that swapping a brand touches one integration and nothing else.
Lessons we learned the slow way
- Single-client Modbus interfaces are real. Two pollers on one WiNet-S dongle (in our case: the energy provider's gateway on its LAN port, us on its WiFi) degrade slowly and then wedge completely — it looks exactly like bad WiFi. The modbus-proxy plus one dedicated interface per consumer ended weeks of mystery outages.
- Wired beats wireless for metering. The WiNet-S dongle has its own, easily-missed RJ45 port; patching it into the home network was the permanent fix.
- Silence is the enemy. A stack that fails loudly is fine; one that fails silently costs you weeks of history.
restart: always, a boot-up task, a daily dead-manup -dand a phone-push watchdog are 30 minutes of work that pay for themselves the first time. - Meter each quantity where it can actually be seen. CT clamps on a hybrid inverter's AC feed measure PV and battery combined — grid belongs to a grid meter, PV and battery to the inverter's own registers.
The project is MIT-licensed and everything — architecture decision record, deployment runbook, dashboards, tooling — is in the repository. If you rebuild it, adapt it to different hardware or spot something to improve, we'd genuinely like to hear about it.