The home server
One small computer runs the whole house. Lights, climate, shades, the network and the boards that control them.
The house runs off a small computer in a closet. It's a second NUC. Everything else in the house talks to it.
One gateway
One Node server does most of the work. It knows every device in the house and how to talk to it. Lights, switches, shades, the minisplit, the projector. Every button and every page sends it the same kind of request. A device name and an action.
There's no build step on the front end. Native modules and a couple of vendored libraries. Each room has its own page, and there are separate apps for climate, devices and the network.
The house model lives in Postgres. Rooms, devices and floor plans. I change it through the API.
No Home Assistant
I ran Home Assistant for a while. I took it out. Every device it handled I now talk to directly on the local network. Less software and fewer places for something to break.
Network
A scanner runs every two minutes. It sweeps the network, records every device and checks which ports are open. Device IPs move around. The gateway looks devices up by hardware address, so it doesn't care.
Names are all mDNS now. I used router DNS for a while, but I don't control the router and it kept losing records. mDNS doesn't need anyone's permission.
Deploys
I write code on my desktop and push it. A webhook pulls it onto the server and restarts what changed. I don't edit files on the server. When I did, the next deploy quietly undid it.
What I learned
When the gateway is down, every page is down with it. Postgres not coming back after a reboot once took the whole house offline for two days. Everything restarts on its own now, and that's the first thing I check.
- #making
- #home automation
- #self hosting
