8 min read

21.8 kWp, 67 kWh of batteries, and a dashboard that replays the whole day

Solar on three roof faces, two hybrid inverters in parallel, four battery packs, EMHASS planning against quarter-hourly prices, and a 3D dashboard of the house. All of it runs locally in Home Assistant.

This summer the house got solar panels, a large battery and a car charger. From the first day I had one rule: nothing that controls the house goes through a vendor cloud. Everything is read and driven by Home Assistant on the local network, a planner decides when to charge and discharge, and a dashboard I built shows where every watt goes.

Real data, not a demo: 10 November replayed from Home Assistant’s history at 5-minute steps. Night on battery, sunrise, about 8 kW in the early afternoon, sunset, back on battery. Only the power flows are replayed; the daily totals on the cards stay at their 13:45 values.

The hardware

  • 45 × AIKO 485 W panels, 21.8 kWp, on three roof faces: 21 facing south-south-west, 12 west, 12 east-south-east.
  • 2 × Deye SUN-12K-SG05LP3 hybrid inverters running in parallel, one master and one slave.
  • 4 × Felicity Solar FLA48314 LiFePO4 packs on a Felicity combiner box: 64 kWh on the nameplate, about 67 kWh measured from full swings.
  • A HomeWizard P1 dongle on the utility meter.
  • A WS90 weather station in the garden, mostly to tell clouds from shade.

It went in step by step. The first inverter in July with two roof faces, two battery packs in August, the other two in September, and in early November the second inverter, which brought the last 12 panels online.

Some numbers, all from Home Assistant’s long-term statistics: best day 81.3 kWh on 29 July, best month August with 1,718 kWh, best hour 11.4 kW averaged over a full hour. All of those were set with 33 of the 45 panels and one inverter, so next summer should beat them.

Everything runs locally

  • Inverters. Both Deyes are read and written over Modbus, through an RS485-to-Ethernet gateway on the LAN, with the Solarman integration in local mode. No Solarman app.
  • Batteries. An ESP32 running ESPHome reads each pack’s BMS over Bluetooth: state of charge, cell minimum and maximum, temperature, current. No Felicity app.
  • Grid. The P1 dongle’s local API.
  • Car. The charger is switched over Zigbee, and the car’s battery level comes from a local reader, not the manufacturer’s cloud.
  • Planning. EMHASS runs as a Home Assistant add-on, the solar forecast on a small VM in the house.

Only two things come from the internet: raw weather model data for the forecast, and the day-ahead electricity prices. Both cover more than a day ahead, so a short outage changes nothing. If prices stop arriving, EMHASS falls back to a local profile, the median of the last 14 days for each quarter hour. And if Home Assistant itself goes down, the inverters keep running the house and the batteries on their own.

My own solar forecast

The usual forecast services were well off for my roof, so I wrote my own engine. Every 15 minutes it pulls eight weather models, calibrates each one against my real production per roof face (orientation, a slowly moving level factor, and a shade mask learned from clear days), and averages them.

I measured it on 44 days, 1 October to 14 November, scored per day against what the panels actually made. The daily error was 14.6 % for my engine, 24.3 % for the Open-Meteo integration and 33.5 % for Solcast.

Then I tried to make it better and mostly failed, which was useful in its own way. More level tuning, weather-type correction tables, picking the best model, refreshing the models during the day, a satellite nowcast: none of it gave a gain that held up out of sample. So I asked a different question: what does the forecast error cost? I replayed the planner over the same 44 days with my published forecast and with a perfect one. The difference was about 5 euros in total, roughly 12 cents a day. I stopped tuning the forecast.

The generic part of the engine is public as RoofCast on GitHub. The engine running at home is the original it came from; the two have drifted apart.

EMHASS plans the battery and the car

EMHASS runs in model-predictive mode every 15 minutes over a 48-hour horizon. It takes the solar forecast, the house load it expects, the quarter-hourly buy and sell prices and the battery’s state, and decides how much to charge or discharge in each slot, and when the car should charge.

EMHASS 48-hour plan

The plan tab: battery state of charge (green), solar forecast (yellow), buy price (purple), and the bars underneath for what was actually bought, sold, charged and discharged.

My tariff also bills the highest 15-minute average of the month, so a single careless quarter hour costs money for a whole year. A lot of the work around the planner is about that peak:

  • A reserve for the peaks. After the oven pulled 3.4 kW with the battery nearly empty, the battery now always keeps a reserve for shaving peaks. While it’s in reserve, the floor on the inverters’ discharge current drops from 4 A to 2 A each, so the reserve isn’t slowly drained overnight.
  • A guard on the car. In November I started a manual car charge on a busy afternoon and set the month’s peak at 4.9 kW. Now a guard runs every 15 seconds, even in manual mode: it lowers the charge current so the current quarter hour stays under the month’s peak, and stops the charge when that would mean less than 6 A. A push warns me when the house alone is heading for a new peak.
  • Car versus petrol. The car is a plug-in hybrid. Waiting for a really cheap slot in winter just meant driving on petrol, so the most the car will pay per kWh now follows the price of petrol.

Each plan comes with a “Why?” button on the dashboard that explains in one sentence what the battery is doing and why.

The dashboard

None of it is Lovelace. It’s a standalone web page that Home Assistant serves from its own /local folder and that talks to Home Assistant over the WebSocket API.

Home page at 13:45

The Home page on 10 November at 13:45: 8.1 kW of solar, 6.4 kW going into the batteries, the house at 1.1 kW, almost nothing from the grid.

The Home page is an isometric render of the house and garden. Solar, battery, house, grid and car each have a card linked to the right spot, with flows that move at the speed of the power and the sun at its real position over the roof. Day and night follow the sun. The “24 h” button replays any day from history, which is how the GIF at the top was made.

The tabs underneath cover the 48-hour plan, the weather, the monthly peak, the finances, a log of what the automations did, and a health page for the packs and the inverters.

Finances tab

Finances, 11 November: month to date, the end-of-month estimate including the capacity charge, the monthly peak, and savings per day.

The second page started as a map of my breaker boards and grew a solar room: a photo of the actual room with the live flows drawn along the real cables. Each battery pack has its own ring, every part can be tapped for details, and tapping a breaker board zooms into a photo of it.

Same moment as the picture above, 10 November at 13:45. Tapping the slave inverter, the battery bank, one pack, a DC breaker and the utility meter, then the breaker boards.

At night it looks like this: no sun, the battery carrying the house, the car charging in the cheap slots.

Night on battery

What broke, and what still needs looking after

  • A settings write rebooted both inverters. In early November I changed the battery mode on the master by hand. The parallel pair rebooted together and took the power to my server rack with it. Since then, no manual inverter setting happens without planning for a power cut.
  • The master stopped answering on Modbus. After that reboot the master kept working but went silent on the bus. Home Assistant now has a fallback: when one inverter is silent it reads the other one and the P1 meter, and rebuilds the totals from there. Nothing that uses the sensors had to change.
  • One pack works harder. Pack 2 carries about 25 % more current than the other three. The sum of the four packs’ own readings matches the inverter within 1 %, so it isn’t a sensor error. Most likely a slightly lower resistance somewhere in its cabling. I haven’t found it yet.
  • The round trip costs about 12 %. Measured: the battery alone gives back 97 % of what goes in, but adding the conversion both ways, grid to battery to house comes to about 88 %. EMHASS assumes 90 %, close enough that changing it moves the bill by about a euro over six weeks.
  • No full charge since September. In autumn the battery never reaches 100 %, so the BMS doesn’t recalibrate its state of charge. I’m checking what the pack maker recommends before forcing one.

What’s public and what’s mine

Public: RoofCast, the forecast engine. Mine for now: the dashboard, the Home Assistant packages around EMHASS, and the peak guards. The dashboard is full of my house, my photos and my entity names. Splitting the generic part from the house-specific part is on the list, but it’s not done.

Questions about the EMHASS setup, the pack monitoring or how the replay works are welcome in the comments.

Comments

Loading comments…

    Shown publicly under the name you enter. No account and no email needed.