LoRa smart mailbox notifier
A battery-powered sensor in your mailbox sleeps until a reed switch sees the door open, then sends a LoRa message up to a few hundred meters to a second board indoors, which pings your phone through Home Assistant. Two Heltec WiFi LoRa 32 V3 boards do the work.

Safety first
- Use a protected LiPo cell and check the plug polarity; a reversed pack can destroy the board or start a fire.
- LiPo cells dislike extreme heat. In hot climates shade the mailbox sensor or move to a lithium primary battery with a suitable regulator.
Rules and laws
- Use the 915 MHz board in the US (902-928 MHz unlicensed band) and keep to the default power. Other regions use 868 MHz or 433 MHz bands with their own limits.
- Only fit the sensor inside a mailbox you own. Do not drill or modify a USPS-owned cluster box.
Parts
| Part | Qty | Approx. each | Subtotal |
|---|---|---|---|
| Heltec WiFi LoRa 32 V3 (915 MHz)One in the mailbox, one indoors as the gateway. Buy the 915 MHz version in the US. Typical $18-26, no verified link.Amazon (search) | 2 | $20 | $40 |
| Magnetic reed switch door sensor, wired (pack)Typical $6-11, no verified link.Amazon (search) | 1 | $8 | $8 |
| 3.7 V 2000 mAh LiPo with JST 1.25 mm plugCheck the plug polarity against the Heltec board before connecting; JST polarity is not standard between sellers. Typical $9-15, no verified link.Amazon (search) | 1 | $11 | $11 |
| 5 V 2 A USB-C wall adapterPowers the indoor gateway. Typical $6-11, no verified link.Amazon (search) | 1 | $8 | $8 |
| Silicone-insulated 26 AWG wire kitTypical $7-13, no verified link.Amazon (search) | 1 | $10 | $10 |
| Estimated total (parts only) | $77 | ||
Typical US prices, checked 2026-11-12. Prices change and multi-packs are often cheaper per piece.
As an Amazon Associate I earn from qualifying purchases. Prices change; check the store.
Filament
PETG (1.75 mm): about 60 g (19.8 m), roughly 4 h of printing.
PETG, 0.2 mm layers, 25% infill, 3 walls; a snug lid with a lip keeps rain out.
AI agents you'll use
- Code helper (ChatGPT, Claude, Gemini or Grok): Writes the mailbox sketch (wake on reed switch, send one short LoRa packet, sleep) and the gateway sketch (receive, publish to MQTT), using RadioLib.
- Battery life estimator: Estimates months of battery life from your measured sleep current and number of mail deliveries.
Tools
- Soldering iron
- Multimeter
- Small screwdrivers
- USB-C data cable
- Double-sided outdoor tape
What you'll learn
- LoRa radio basics: spreading factor, range and airtime
- Deep sleep and wake-on-pin on the ESP32-S3
- Battery life math
- Sending events into Home Assistant over MQTT
Stop walking out to an empty mailbox. A tiny sensor tells you the moment the door opens, and LoRa radio reaches the house even when Wi-Fi does not.
What you'll build
A sensor box inside the mailbox: a Heltec WiFi LoRa 32 V3 in deep sleep, a reed switch on the door and a 2000 mAh LiPo. When the door opens, it wakes, sends one short LoRa packet and sleeps again. A second Heltec board indoors, powered by USB, receives it and publishes an MQTT message that Home Assistant turns into a phone notification.
The cost range is $65-85 for the parts listed below, allowing about 10% either way for price swings.
Print the parts
Print a small box with an antenna slot and a lid. Mount the antenna so it is not pressed against metal. In a metal mailbox, range drops a lot; run the antenna out through a small grommet or put the box on the underside of a plastic lid.
Wiring
| From | To | Notes |
|---|---|---|
| Reed switch (one side) | Heltec GPIO7 (an RTC-capable pin) | Use an RTC GPIO so it can wake the chip from deep sleep. |
| Reed switch (other side) | GND | Enable the internal pull-up in code. |
| Magnet | Mailbox door | Aligned with the switch when closed. |
| LiPo | Heltec battery connector | Check polarity first. |
| Antenna | Heltec IPEX/u.FL connector | Never transmit without the antenna attached. |
Step-by-step
- Flash both boards with a simple LoRa ping-pong test and check range from the mailbox to the house.
- Wire the reed switch to an RTC-capable GPIO and test wake-from-deep-sleep on the bench.
- Measure sleep current with a multimeter; turn the OLED and any LEDs off in sleep.
- Write the gateway sketch to publish an MQTT message on each packet.
- Add a Home Assistant automation that notifies your phone, with a 2-minute cool-down for door bounces.
- Print the box, install it, and test with the mailbox door.
Code
Arduino-ESP32 (ESP32-S3) with RadioLib for the SX1262 radio on the Heltec V3, plus the PubSubClient MQTT library on the gateway.
Prompt for the code helper:
Write two Arduino sketches for Heltec WiFi LoRa 32 V3 boards (ESP32-S3 + SX1262, 915 MHz) using RadioLib.
Sensor: on wake from a reed switch on GPIO7 (pull-up, LOW = door closed), send a 6-byte packet with a counter and the battery voltage, then enter deep sleep with ext0 wake on that pin. Turn off the OLED and Vext before sleeping.
Gateway: receive packets and publish {"count":n,"vbat":x} to MQTT topic mailbox/event over Wi-Fi.
Use the board's documented pin map; tell me which pins to confirm in Heltec's docs.
Troubleshooting
- No packets indoors: The mailbox is metal or the antenna is touching it. Move the antenna outside or use a higher spreading factor.
- Battery dies in days: Something stays on in sleep (OLED, Vext or an LED). Measure sleep current and fix it.
- Several alerts per delivery: The door bounces. Add a cool-down in the sensor or the automation.
Files, code and docs
- RadioLib (jgromes) (MIT)
- heltec_esp32_lora_v3 helper library (ropg) (MIT)
- Home Assistant (Vendor docs)
Last checked 2026-11-12. Double-check parts against your own board and seller listings before you buy.