Hestia — Solar Hydrogen for Buildings

A building on its own sun, through heat and cuts: it plans for the outage and keeps one cool room going

Context
PFA team project, carried on as a product · INSAT
Role
Led the PFA software, then built Hestia from it
Team
3 on the PFA bench; Hestia solo
Period
2026
87 → 0 ha year without cooling or heat on the demo home, through 220 hours of cuts
8.5 h → 6.6 daysof essentials through a cut with no sun: the battery, then a full hydrogen tank
500 / 2,000ppm: two detection stages, stop and ventilate, then cut the power and latch
Hestia in a minute: a heatwave cut in Tunis, the worst day of 2026, Paris in January, a clinic in the planner, a leak · 1:04

The problem

In the summer of 2026, Ariana and the rest of Grand Tunis lost power again and again in the hottest hours. People needed one cool room, a fridge that held and a charged phone, while the sun beat on every roof. A building with solar, a battery and hydrogen can carry them through, if something plans for the cut rather than the bill, and if the people living next to it can tell whether the gas detector still works.

What I built

  • A model of the building's place: the hours the grid strains, the price of each hour, and the cuts, 3 to 6 hours at any hour of a hot spell, plus the worst day lived in 2026 (16 hours off, 2 back, 5 off) as a test.
  • What the building is for (a home, a clinic or pharmacy, an office, a school, an equipment room), each with its own loads, schedule, temperature limits and what must stay on in a cut.
  • A year plan for what stored hydrogen is worth each day, then a 48-hour plan every hour (a linear program, solved in milliseconds): what to store, what to use, what to hold back for a cut.
  • An ESP32 safety controller and a Python gateway that run the same rules, checked against one set of test vectors; two-stage hydrogen detection, a trust layer that stops production when the detector can't be believed, and a signed safety journal.
  • A private simulator for every visitor on a real year of weather, in Tunis or in France, and a planner that sizes the system on the same physics.

Inside the decisions

01

Planning for the cut, not the bill

Most energy tools optimise what the building pays. In a Tunis summer the question is different: when the grid goes down at 8 pm and it's still 36 °C outside, is there a cool room left? So the plan keeps the battery's reserve through the hot afternoon instead of selling it, pre-cools the building on the last sun, and draws the reserve only when the cut comes.

The test is the worst day people actually lived in 2026: 46 °C, the grid down from 9 am. On the demo home, the sun, then the battery, then the fuel cell keep the house at 26-27 °C through it.

The worst day in the simulator: 46 °C, grid down since 9 am; at 9 pm the battery runs the cooling and the house holds 26 °C
The worst day: grid down since 9 am, the house still at 26 °C at night.
02

From a bench to a building

The PFA bench kept its control simple on purpose: threshold rules on an ESP32, pumps on and off, an e-mail on any fault. For a prototype on a lab table, with its team beside it, that was the right scale. A building is another matter: someone lives next to it, and an inspector will ask what happened last March.

So the rules came out of the firmware into a written spec, with test vectors that the C++ controller and the Python twin both have to pass. Writing it settled cases a supervised bench never had to: interlocks hold in manual mode too, and an over-temperature stops production while the cooling keeps running.

Hestia's live bench: the stack producing at 1 kW, the electrolyte held between 50 and 55 °C, every reading drawn against its limits
The PFA bench, replicated: the cooling loop holds 50-55 °C while the stack produces.
03

Can the detector still be believed?

A poisoned hydrogen sensor keeps reading perfectly normal air. Nothing on the screen looks wrong.

Each sensor is watched for drift, freezing and silence; bump tests and calibrations are scheduled, and pass or fail is computed from the readings, never ticked by hand. No trusted detector, no production. Every alarm, reset and check goes into a journal where changing one past line breaks the chain.

Hestia's safety page: production suspended because the hydrogen detector failed its bump test while reading normal air
Clean air on the display, a failed bump test underneath: production stops.
04

Where should the sun go?

In Tunis, a kWh sold to the grid avoids 0.47 kg of CO₂. The same kWh through the stack, the tank and the fuel cell comes back in winter worth 0.15 kg. So every site gets a merit order: CO₂ at 300 € a tonne, plus the money. Battery, grid, then hydrogen in Tunis; in Paris, with a clean grid and dear power, hydrogen comes before the grid.

Hydrogen ends up doing what only it can: carry summer into winter, and take the sun nobody else will.

The simulator at noon in July: battery full, the grid taking its share, 2 kW going to hydrogen, with the reason written out and the merit table beside it
Summer noon: battery full, the grid at its 30 % share, 2 kW to hydrogen. The dispatch line says why.
05

An honest answer

On the demo home in Tunis, solar and a 10 kWh battery already get it through every cut of the year: from 87 hours without cooling or heat today to none, and the worst day held. Hydrogen adds the rest: self-sufficiency from 95 to 100 %, and a reserve of days instead of hours (about 8.5 hours of essentials on the battery, about 6.6 days on a full tank).

On money alone, that costs about 29,400 € more than solar and a battery over twenty years. The planner says so first, then shows what the extra buys.

The planner: a year of real weather, four set-ups compared side by side, and a written verdict
A year of real weather, four set-ups, one verdict.

The outcome

A building that plans for its own place and its worst day, supervises itself and can prove its safety record; a simulator where anyone can live a heatwave cut, a Paris peak or a leak; and a planner that tells the truth about cost.

What would come next

  • A certified hydrogen detector and pressure vessel in place of the bench parts.
  • The certification path: ISO 22734 for the generator, ISO 26142 and IEC 60079-29-2 for detection and its upkeep.

Stack

ESP32
C++
Python
FastAPI
React
TypeScript
MQTT / TLS
ONNX
Docker

What it proves

Safety interlocksProcess controlDigital twinsPhysics modellingEnergy systemsIoT securityLSTM forecastingReinforcement learning

Also in Engineering AI