Home Security. My own app for our Ring cameras and door sensors. It knows when we're home, plays live view in about a second, and keeps every clip in my own cloud.
- Role
- Builder · product, design and engineering
- Built on
- ring-client-api by Dusty Greif and contributors (MIT) ↗
- Platform
- Mac (server), iPhone app, and any browser
- Status
- Building
- Stack
- Node.js, SwiftUI, ring-client-api, WebRTC and HLS, ffmpeg and VideoToolbox (HEVC), Cloudflare R2, Tailscale, Swift (CoreBluetooth), Web Push, Google WebRTC (iOS)
Overview
Home Security is the app I wanted from Ring and couldn’t buy. It signs in to our Ring doorbell and indoor camera directly, records every ring and motion into my own Cloudflare R2 storage instead of a Ring plan, and opens like an app on our phones. On top of the cameras it adds Bluetooth door sensors, an alarm, and the part I cared about most: it knows whether we’re home, so it stays quiet when we’re in and pays attention when we’re out or asleep.
It runs on a Mac at home. Nothing is public: the phones reach it over a private network, and it asks for a password as well.
My role
I built it on my own over five days, from 20 to 24 November 2026, in 144 commits, almost all of them written with Claude Code. I made the product and design calls as I lived with it: what should alert, what should stay quiet, and how it should feel on a phone at the front door. The Ring connection uses the open-source ring-client-api library; the rest, from the recorder to the interface, is mine.
What it does
- Knows when we’re home. It sees our phones on our private network and can tell whether they’re on the home connection. There’s no app to open and no button to press.
- Alerts and records by situation. A table sets, for every device, whether it alerts, rings through or records at home, at night and when nobody’s in. The doorbell can keep working in the daytime while the indoor camera stays off.
- Live view in about a second. Live plays over WebRTC straight from Ring to the phone, about a second behind, instead of the 15 seconds the first version took. A live wall shows every camera at once in a bento grid.
- Every clip in my own cloud. Clips are compressed on the Mac and stored in R2. They’re deleted after 30 days unless I keep them, and nothing stays on the Mac’s disk.
- Door sensors. Shelly BLU door and window sensors report over Bluetooth, either to the Mac or to a small gateway by the door. They show as live cards, with their battery level.
- An alarm. Door sensors and indoor motion can set it off. Every phone gets a warning first, then the camera’s siren sounds and a voice warning plays through its speaker.
- An activity timeline for the last 24 or 48 hours, which you can scrub with a finger to see exactly what happened when.
- A native iPhone app. Home, Activity and Live in SwiftUI, with the same amber look. Live comes straight from Ring over WebRTC, about a second behind.
- Warnings that say what to do. When something isn’t working, Home says what and how to fix it: a camera whose motion never arrives, a door sensor that hasn’t reported or has gone quiet, a weak signal, a low battery.
Decisions and trade-offs
- Presence without a step. Location sharing and Shortcuts automations both need something on the phone and fail quietly. A phone on the same home connection as the Mac is home; one anywhere else is out. If it can’t tell, it assumes nobody’s home and keeps watching.
- A table, not a mode. Home, Night and Away modes hide the real question, which is “should this device do this, right now?” Every device has its own row, so each answer is one tap.
- WebRTC for live, HLS as a fallback. Relaying Ring’s stream through the Mac as HLS cost about 15 seconds. WebRTC goes straight from Ring to the phone, which is fast but never touches the Mac. So recording during live view opens the Mac’s own stream only while it’s recording, and closes it afterwards.
- Compressed before it’s kept. Each clip is re-encoded as HEVC by the Mac’s hardware encoder, in memory, to about 43% of Ring’s size and hard to tell apart from the original. An index goes at the front of each file, so a phone starts playing at once instead of downloading the whole clip first.
- Shorter clips, longer batteries. Battery cameras pay for every second of video. Clips stop 15 seconds after the last motion and never run past a minute, and live view pauses itself after 5 minutes.
- No footage on the Mac. Clips go from Ring to memory to the cloud. The one exception is when the cloud can’t be reached: clips wait on disk until it’s back, and are deleted as soon as they’re uploaded.
- Every lesson became a warning. Each thing that cost me time while setting it up is now a check with a fix in plain words. Ring only passes on motion when Motion Alerts are on in the Ring app, so missed motion says so. A Shelly sensor only speaks when its magnet moves, so a new one that stays silent says to move it. A flat battery looks exactly like a closed door, so a sensor that goes quiet for two days says to check the battery first.
- Private by default. There’s no public address and no account with a third party beyond Ring, Cloudflare and Tailscale. Notifications go through the browser’s own push service.
How it’s built
A Node.js server on the Mac signs in to Ring with ring-client-api, and keeps a single video call per camera that recording and the Mac’s own live stream share. ffmpeg turns that call into fragmented MP4 in memory. The Mac’s VideoToolbox encoder compresses each clip as HEVC, and the clip is uploaded to Cloudflare R2 with its index already at the front.
The phone side is a web app with no framework, installed to the home screen, with Web Push for notifications. A small Swift helper listens for the door sensors’ BTHome adverts over CoreBluetooth and passes them to the server through a local socket. A Shelly gateway can do the same from further away, over its own WebSocket. Presence comes from the network map of the private network the phones already use. More than 160 automated tests cover all of it against stand-in cameras, sensors, gateways and phones.
The iPhone app is SwiftUI, signs in like the web app (the password once, then a session kept in the Keychain), and plays Live through Google’s WebRTC. Two bugs kept the picture black even though 25 frames a second were arriving and decoding: Ring’s frame timing made WebRTC’s render queue throw every frame away as out of order, and releasing the track object quietly detached the screen from it. Both were found from WebRTC’s own statistics and log.
Timeline
- 20 November 2026. The first version: the doorbell recording to R2, and a viewer for the clips.
- 21 November. Recording from live view, notifications, and battery alerts.
- 22 November. Ring directly, without a home hub: one shared video call per camera, and full-length clips.
- 23 November. Door sensors, home and away, the alarm, compression, the live wall, and the activity timeline.
- 24 November. Live view over WebRTC, about a second behind; shorter clips to save the batteries; warnings with fixes; and the native iPhone app, with Live over WebRTC.
Where it is now
In daily use at home, on a MacBook for now. It moves to an always-on Mac mini next. The iPhone app is going into TestFlight for the household. It’s a personal project and isn’t published, so there’s no download.