Energie Thuis

A self-hosted home energy dashboard and analysis tool

We wanted to understand our home's energy flows — solar, grid import/export, EV charging, gas, air conditioning, and the load on each of the three phases — and to make data-driven decisions about a home battery, extra solar panels, a new EV charger, and the end of net metering (“salderen”) in the Netherlands. Rather than relying on vendor apps, we built our own data pipeline and dashboard on top of Home Assistant.

Architecture

Home Assistant collects data from a DSMR/P1 smart meter (per-phase power), solar micro-inverters, a smart switch on the EV charge point, a gas meter, air conditioners and temperature sensors. A small Python service — standard library only, no external dependencies — streams every state change plus the long-term hourly/5-minute statistics from Home Assistant's WebSocket API into compressed JSON Lines files. It backfills gaps, deduplicates, and can import old Home Assistant database exports, so the archive reaches back to the very start of the data.

A second Python service — again standard library only, no external dependencies, no internet connection required — serves a local web dashboard. Every page load re-reads the newest files and recomputes everything from scratch, so there is no separate database to keep in sync, and the charts are hand-built SVG with no charting library.

Sensors P1 meter, solar inverters, EV charger switch, gas & temperature
Home Assistant Collects and stores every reading
Collector Python service, streams changes over the WebSocket API
Archive Compressed JSON Lines files
Dashboard Python service, re-reads and recomputes on every page load
Browser Live view, period analysis, scenario simulations

It runs as hardened systemd services, reachable only from the home network and VPN; when exposed externally it sits behind Cloudflare Tunnel and Cloudflare Access, with no-cache and security headers (CSP, frame-ancestors none, no-referrer).

Features

📊Live view

Grid, solar, house load, EV charging and temperatures, with 60-minute sparklines, 15-minute trend arrows, a refresh countdown, and per-phase current gauges (green under 20 A, orange 20–25 A, red above 25 A) that show how long a phase has been over the main fuse rating and when the last peak happened.

📅Period analysis

A day or date-range picker comparing consumption against solar, self-sufficiency and self-consumption, costs with and without net metering using the actual hourly tariff (including public holidays), gas use against outdoor temperature (per degree-day), air conditioning against temperature, and “today vs. an average day”.

🔌EV charging cost

Cost per kWh for EV charging, counting solar as free and grid energy at the hourly tariff.

🧭Phase analysis

Energy and peaks per phase, which phase the solar panels and charger are on, a breakdown of every excursion above the fuse rating with its exact duration from five-second data, and detection of cycling appliances (like a hot-water device keeping warm overnight).

🔋Scenario simulation

Run on real hourly data: home battery sizing (savings curve, payback period, state of charge), extra solar panels, and a smarter EV charger (comparing current charging, charging immediately, and following solar surplus with an overnight top-up) — including single/three-phase switching, minimum charge current, load balancing on the home's three-phase connection, and income from energy certificates.

🌓Light & dark mode

Responsive down to phone width, following the visitor's system preference.

What we found

Built with

Home Assistant Python (stdlib) WebSocket API JSON Lines SVG systemd Cloudflare Tunnel/Access Data analysis

Built together with Claude (Anthropic) as an AI pair-programmer and analyst throughout the project.

Not publicly available — this page is a write-up, not a hosted demo.