ideas.
July 14, 2026 2 min read hardwareconsumeraiautomation

Smart mail slot package detector

An ESP32-CAM sensor that watches your mail slot or porch, classifies deliveries versus junk mail with a small vision model, and pushes a notification only when it matters.

The idea

A battery-powered camera module that clips onto a mail slot, mailbox, or porch overhang and wakes on motion or a door-open switch. It captures a burst of frames, runs a small on-device vision model to classify what just arrived (letter, package, flyer, nothing), and only pushes a notification for the categories you care about. No cloud video streaming, no monthly camera subscription — just a filtered "package arrived" ping.

Why build this

Doorbell cameras notify on every passerby and squirrel, training people to ignore them. Meanwhile most package-theft and missed-delivery anxiety is really about one narrow question: did something worth carrying inside just show up? Cheap ESP32-CAM boards and quantized vision models (MobileNet-class classifiers, or a distilled YOLO variant) are now small enough to run inference in a few hundred milliseconds on-device or on a Raspberry Pi hub, so the "is this a package" decision doesn't need a round trip to the cloud. Renters and apartment dwellers in particular want something they can self-install without rewiring a doorbell.

Stack sketch

  • ESP32-CAM (or ESP32-S3 with a camera module) for the sensor node, woken by a PIR sensor or magnetic door switch to save battery
  • TensorFlow Lite Micro or a quantized ONNX model for on-device frame classification (package / envelope / flyer / empty), falling back to a Raspberry Pi hub over local Wi-Fi for heavier models if the ESP32 alone isn't accurate enough
  • MQTT for sensor-to-hub messaging, since it's the de facto standard for this kind of home automation and plays well with Home Assistant
  • A lightweight Flask or FastAPI hub service that stores event thumbnails and metadata in SQLite
  • Push notifications via ntfy.sh or a Pushover integration — deliberately not another account-gated mobile app
  • Optional: a Home Assistant custom integration so events show up alongside other smart-home automations

Scope for v1

  • One sensor node, hub, and phone notification path — no multi-camera fleet management
  • Three-class classifier (package / mail / nothing), trained on a small labeled dataset the user captures during a setup week
  • Local-only storage of images and events, retained for 7 days, no cloud upload
  • Manual model retraining via a script, not an in-app feedback loop
  • Out of scope for v1: person re-identification, package theft alerts, video streaming, multi-user households

Where it could go

The natural next step is a feedback loop where tapping "wrong" on a notification saves the misclassified frame for retraining, slowly personalizing the model to the household's actual mail carrier, lighting, and delivery patterns. After that, integrating with carrier tracking APIs (USPS, UPS, FedEx) would let the system cross-reference "a package should arrive today" with "a package was detected," suppressing false positives and catching missed deliveries. A stretch goal is a small e-ink display near the door showing the day's detected events, so the camera's value doesn't only live inside a phone notification.

Watch out for

On-device models trained on too few examples will overfit to one lighting condition or one mail carrier's uniform, so the setup week of data collection matters more than model architecture choice; budget real time for that instead of assuming a stock classifier will generalize out of the box.