Farm Guardian
A custom AI watching the flock from cameras across the farm β detection, deterrents, and a PTZ that stares at the sky when hawks are up.
What This Is
A farmer told Claude that hawks were killing his chickens. Claude built a system to stop it β cameras, a detection pipeline, automated deterrents, and a patrol that sweeps the yard while the flock free-ranges.
The Mac Mini M4 Pro sits on the desk next to the chick brooder. Its waste heat helps keep the incubator at temperature β fewer cold spots, steadier hatches than any previous year. The same machine runs the cameras that watch for hawks so the flock can free-range. It's also home to Bubba, the farmer's OpenClaw agent, and it's where Claude Code built this entire website.
One machine. Incubator warmer, hawk watcher, code writer, bird guardian.
The Hardware
Five cameras β named for the hardware, never for where they happen to be pointed. The devices stay; the angles change.
| Camera | Hardware | Capabilities | |--------|----------|--------------| | house-yard | Reolink E1 Outdoor Pro | 4K PTZ with spotlight + siren. 11-position patrol, sky-watch lock, HTTP snapshot polling via reolink_aio. The only unit with deterrents. | | s7-cam | Samsung Galaxy S7 running the IP Webcam app | RTSP over WiFi (UDP). Fixed β the tripod moves, the stream endpoint doesn't. | | usb-cam | USB webcam on the Mac Mini | AVFoundation local capture, 1920Γ1080, snapshot polling with auto white-balance and autofocus warmup. | | mba-cam | MacBook Air 2013 built-in FaceTime HD webcam | 720p via ffmpeg + MediaMTX RTSP bridge on the laptop itself. | | gwtc | Gateway laptop built-in webcam | 720p via ffmpeg + MediaMTX RTSP on Windows; services auto-start via Shawl. |
The Reolink is the only one with deterrents β spotlight to 100% brightness and a siren loud enough to scatter a hawk mid-dive. When it detects something it can escalate through four levels: log, light, light+sound, light+siren+sound.
How It Watches
The Mac Mini pulls a JPEG from each camera on a steady cadence β no video encoding, no ffmpeg processes, no HLS segments. The old video pipeline got ripped out because nobody actually needed 30fps of their own backyard. Still images at a few seconds apart are plenty to see what's happening, and they sail through the Cloudflare tunnel instead of choking it.
It doesn't phone home. No cloud. No subscriptions. No data leaves the network. The dashboard, the camera control, the snapshots β everything runs on that one Mac Mini on the desk next to the birds.
What's working right now:
- Live snapshot feeds from all five cameras, visible here and on the homepage
- Manual PTZ on the Reolink β pan/tilt by approximate degrees, or jump to a named preset in one tap
- Five on-camera presets: yard-center, coop-approach, fence-line, sky-watch, driveway
- Spotlight and siren as on-demand deterrents from the web UI
- 4K HTTP snapshots for Discord alerts when something matters
- Full REST API exposed via Cloudflare tunnel β the farmer can reposition the camera from his phone on cellular
- eBird integration polls Cornell Lab for raptor sightings within 15km
Paused, on the bench:
- YOLOv8 + GLM-4V automated detection. The plumbing is all in
farm-guardian, but it's not running against live frames right now. The cameras are watching; the farmer is watching the cameras. Good enough while the chicks are in the brooder. - Automated patrol and deterrent escalation. Both have been written and rewritten; for now the farmer drives the camera directly.
The Story
This started because hawks were taking chickens. In the first week of April 2026, we lost four birds β including Birdgit, a Speckled Sussex who followed you around like a dog. A hawk took her on April 8th.
The response was immediate. Within hours, Claude built sky-watch mode β locking the PTZ camera onto a fixed overhead position. Alert images were upgraded from blurry 1080p RTSP frames to sharp 4K snapshots. The camera doesn't just patrol anymore β it can hold still and stare at the sky.
Reinforcements arrived the same week: 22 new chicks in the brooder, under heat lamps, next to the Mac Mini that watches over them. Birdadette β the first chick to hatch this season β emerged from her egg on the keyboard, two feet from the machine that would become her guardian.