Teaching a Porch to Recognize Delivery Drivers and Accept Packages




Summary
This tutorial builds a computer vision lockbox that automatically unlocks for delivery drivers, combining a Roboflow-trained person and package detection model running on-device via the Roboflow iOS SDK, a serverless Roboflow Workflow that validates detections against a porch zone and logs delivery events, and an ESP32 microcontroller that receives unlock commands over the local network and drives a 12V fail-secure solenoid lock through a relay.
If you've ever watched Mark Rober, you've seen the glitter bomb series. It's the engineering/revenge series where porch pirates steal a booby-trapped package and get instant retaliation in the form of fart sprays and other brilliant ideas for karma. It's great television, but it's payback rather than prevention. The package still gets taken, and you lose quite an expensive prop.
I wanted to engineer another solution for this. Instead of punishing the thief after the theft, what if the porch just never left a package out in the first place?
So I built a lockbox that watches my porch with a computer vision model. When it sees a delivery driver holding a package, it unlocks itself, gives them a few seconds to drop the package inside, locks again, verifies the package actually made it in, and pings my phone with a photo. There's a live dashboard so anyone in my family can check the porch from anywhere, and a push notification for every delivery. There's no glitter involved, and nothing is left out to steal.
The electronics cost about $35-40, the camera is an old iPhone that was sitting in a drawer (properly concealed in your porch to prevent it from being stolen), the AI runs on Roboflow's free tier, and the box is whatever protective container you have.
I’ll show you how you can build it too. Follow along with this github repository.
How it works
The tripwire is the old iPhone at the window. It runs an object detection model on-device at full speed, costing almost nothing.
The judge is a Roboflow workflow in t…