Gatehouse

1The problem
Open your gate from a phone, without opening your home network
The gate at the house was reached by forwarding a port on the home network to a public hostname: one guessable address away from anyone on the internet. Gatehouse replaces that with a box that only ever dials out. It serves the installer who fits it, the owner, their family and guests, and the operator who runs the fleet. Someone at the gate with a screwdriver was never the threat to beat; the point is that physical access never turns into lasting remote access.
2Opening a gate
Hold the disc, and a signed command reaches the box
A press holds for a beat, the server signs a one-time command, the box verifies it and pulses the relay, and the gate reports back, all in a couple of seconds. When the box is offline the disc greys out and says so, rather than pretending the gate moved. The app installs to the home screen and reconnects on its own when the connection drops.
3Living with it
Who can open it, what happened, and the box itself
A connection sheet traces the path from this phone through the server to the gate box and shows how fast it answered. Members lists owners, guests with dates and devices waiting for approval; history keeps ninety days of who opened what; settings reaches the box for its relay timing, Wi-Fi and reboots. The operator side sits behind Cloudflare Access and a passkey, for enrolling boxes and rolling out firmware.
Under the hood
No single leaked secret opens a gate on its own
- Hardware
- A XIAO ESP32-C6 on a 1-channel relay, pulsing a 10 A contact for 500 ms into the gate motor.
- Cloud
- One Cloudflare Durable Object per gate; the box keeps a single outbound WebSocket to it.
- Sign-in
- A magic link, single use and tied to the browser that asked, then a passkey re-checked every 30 days.
- Commands
- ECDSA P-256, signed by the server and verified by the firmware; each expires 10 s after signing, with a replay ring against repeats.
- Measured
- On the production box, 15 of 17 opens were acknowledged in 2.3 to 2.7 s.
- Built with
- A Zig firmware core on ESP-IDF; a Preact app under a 60 KB budget for all its JavaScript and CSS.