A smart apartment on a Raspberry Pi, with the code, the parts list, and how we built it.
The front door unlocks as you walk up to it and locks when you leave. Brushing your teeth at night fades the lights and closes the curtains. The fish tank light follows a sunrise and sunset you set from your phone. A robot vacuum and a dot for you move across a live map of your home. It all runs on one Raspberry Pi with Home Assistant, on your own network, with no monthly fees.
This repo is everything you need to build the same thing in your own home: step-by-step guides, the code we wrote, ready-to-use Home Assistant files, the parts we bought (with links), and the AI prompts we used to build the parts we couldn't buy. Our own floor plan, model and keys stay private; you bring your own. The two dashboard cards (the live map and the 3D home) are the one thing you build yourself: the guides and prompts walk you through it.
Affiliate links: As an Amazon Associate HouseMaxer earns from qualifying purchases. The product links in this repo are affiliate links: buying through them costs you nothing extra and helps fund the project.
| Feature | Guide | |
|---|---|---|
| 🧠 | Raspberry Pi 5 running Home Assistant, plus three ways to buy the hardware | 1 |
| 📶 | Mesh Wi-Fi that tells Home Assistant who is home | 2 |
| 📡 | ESP32 boards, a few dollars each, that spread Bluetooth to every room | 3 |
| 📍 | Room-level tracking from your phone's Bluetooth, calibrated, on a live map | 4 |
| 🔐 | Front door unlocks as you walk up, locks when you leave | 5 |
| 💡 | Hue lights with a bedtime fade, and normal light again next morning | 6 |
| 🪟 | Motorised curtains on the rod you already have | 7 |
| 🐠 | Fluval aquarium light in Home Assistant (our own integration) | 8 |
| 🤖 | Roborock on your floor plan, and a robot that calibrates your tracking | 9 |
| 🪥 | Bedtime starts when you brush your teeth | 10 |
| 🏠 | A live 2D map and a 3D model of your home on the dashboard | 11 |
flowchart LR
subgraph Pi["Raspberry Pi 5 · Home Assistant"]
HA[Home Assistant]
BT[Pi Bluetooth]
ZB[Zigbee / Z-Wave stick]
end
Router[ASUS mesh Wi-Fi] --- HA
ESP["ESP32 Bluetooth proxies (one per room)"] -- Wi-Fi --> HA
Phone((Your phone)) -. Bluetooth .-> ESP
Phone -. Wi-Fi .-> Router
Brush[Oral-B iO] -. Bluetooth .-> ESP
Tank[Fluval light] -. Bluetooth .-> ESP
Curtains[SwitchBot curtains] -. Bluetooth .-> ESP
Lock[August lock] -- cloud / Bluetooth --> HA
Hue[Hue Bridge + bulbs] -- LAN --> HA
Robot[Roborock] -- Wi-Fi --> HA
Plugs[Zigbee plugs] -. Zigbee .-> ZB
The full list, with what each part is for, is in PARTS.md.
| Part | Link |
|---|---|
| Raspberry Pi 5 (8 GB) | Board · Starter kit · Home Assistant Green instead |
| microSD card | 128 GB A2 |
| ESP32 Bluetooth boards | ESP32 multipack · USB-C cables · USB wall chargers |
| Zigbee stick | SONOFF ZBDongle-E (ours is a HUSBZB-1, no longer sold) |
| Wi-Fi | ASUS ZenWiFi mesh (ours is the XT8, now sold used) |
| Smart lock | August Wi-Fi Smart Lock (we bought ours used on eBay) |
| Lights | Hue Bridge · Hue color A19 |
| Curtains | SwitchBot Curtain · SwitchBot Hub 2 |
| Aquarium | Fluval Flex 32.5 gal · Zigbee plug for the UV filter |
| Robot vacuum | Roborock Qrevo Plus, Renewed · main listing |
| Toothbrush | Oral-B iO Series 9 |
Buy the expensive things used. Our lock came from eBay and our robot vacuum was refurbished. Smart locks, robot vacuums, mesh routers and Hue bridges sell used for far less and work the same. Reset them to factory settings before you set them up.
docs/ step-by-step guides (start with 01)
homeassistant/packages/ Home Assistant YAML you can drop into /config/packages/
presence_lock.yaml walk-up unlock, lock on leave, away latch, lock self-heal
bedtime.yaml toothbrush → bedtime fade, curtains, default-scene restore
aquarium.yaml Fluval sunrise/sunset schedule run by Home Assistant
roborock_live_position.yaml robot position in floor-plan feet
custom_components/
fluval_ble/ Home Assistant integration for Fluval Bluetooth lights
roborock_pose/ Roborock heading + robot-carried calibration recorder
esphome/ one firmware for every ESP32 Bluetooth scanner
tracking/ room tracker: floor plan → walls, calibration, fit, map engine
prompts/ the AI prompts we used to build the custom parts
tools/ helper scripts (parts links, aquarium dashboard)
PARTS.md the full parts list
- Change entity IDs. Every YAML file says at the top which entity IDs to
replace with yours (Settings → Devices & services → Entities shows them).
presence_lock.yamlneedsbedtime.yamltoo. - Never commit secrets or your layout. Tokens, Wi-Fi passwords, your
phone's IRK, your floor plan, calibration files and 3D scans belong in files
that
.gitignorealready skips (secrets.yaml,floorplan*.json,calib*.json,samples*.jsonl,*.usdz,*.glb...). Rungit statusbefore every commit and read the list. - Locks are serious. Read the safety notes in guide 5 before you turn on walk-up unlock.
- Home Assistant users worked out the Fluval light protocol, mainly mrzottel
with an ESPHome
fluval_ble_ledcomponent, in the Fluval Aquasky BLE thread. - Room distances come from Bermuda by agittins.
- Built with Home Assistant, ESPHome and three.js, and with a lot of help from Claude.
Product names and trademarks belong to their owners. HouseMaxer is not tied to or backed by any of the brands named here.
MIT. Use it, change it, share it.