Selected work

apollo

A house on a Raspberry Pi

Discipline
AI & Agents
Year
2026
Status
Active
Stack
Python · systemd · Shelly Gen3 · Three.js · Tailwind
18daemons
1third-party dependency
955 MBof RAM
apollo · sense node, exploded

This one is genuinely for me. It runs the house I live in, and it has been up for a fortnight without anyone touching it.

The organ model

Eighteen single-file Python daemons, each hardened as a systemd unit and named after an organ. It sounds whimsical and it is, but it produces a useful property: every process does one thing, restarts independently, and can be reasoned about on its own. Two more run as timers rather than services, because a nightly backup and a disk-health check are events, not processes.

Between all eighteen there is exactly one third-party Python dependency — tinytuya, which two of them import to talk to Tuya devices on the local network. Everything else is the standard library. That is not asceticism for its own sake. A dependency here is something that will eventually need updating on a machine I would rather not think about, and the standard library is the only thing I can be confident will still import in five years.

boiler-bot is the heart. It drives a Shelly 1 Mini Gen3 into an Alpha InTec 28XE combi with degree-day-gated comfort windows, optimum start, a frost stat, anti-short-cycle protection, a maximum-on cap and a running cost figure. Those last few are not features, they are safety paths: software that controls a gas appliance needs to fail closed.

apollo-vitals is the hippocampus, writing five-minute samples to a CSV and events to a JSONL file, so state survives a reboot. Around them sit air quality, doorbell, TV, circadian lighting, presence, network watch, printer and a watchdog.

What was hard

Memory. 955 MB is the entire budget and every organ shares it, so the interesting engineering is in deciding what happens when something wants more than exists.

Every unit runs under ProtectSystem=strict and ProtectHome=read-only with an explicit list of the paths it is allowed to write, so a bug in one organ cannot reach another's state. More usefully, each one carries a deliberate OOM score. The organs that keep the house running sit at negative scores, which puts them among the last things the kernel will reap. Anything merely useful sits positive and volunteers to die first.

That ranking earns its keep. This website is now built on the same Pi, and a production build peaks around 800 MB of the 955 — close enough to the edge that without the ranking, publishing a new case study could plausibly turn the heating off. Instead the builder is the first thing the kernel kills and the house does not notice.

The unusual part

There is a mind/ directory holding an identity stack and memory index that a resident AI boots from every session — so the context travels with the repository rather than living in someone's chat history.

The newest organ is the one that publishes this site. The editor for louisreed.co.uk runs on the Pi alongside the boiler and the doorbell, which means the house now maintains the page describing it.

Open to interesting problems

Got something
that needs building?

hello@louisreed.co.uk