Mailbox sensor running on batteries

Hi there!
I’m fairly new to Home Assistant and ESPHome. My first project will be a battery powered mailbox sensor. Here’s the hardware I’ve got:

  • Various controllers (ESP32C6, C3, H2 and classic ESP32, also ESP8266)
  • Reed switch
  • Li-Ion battery pack

My idea is to use the switch as a wake-up signal on the controller. When the mailbox is opened, the controller shall wake up and send a notification to my mobile phone.
I already tested that with a small bit of C+±code and MQTT for messeging, and it works quite well.

Now I would like to migrate my project to ESPHome and Home Assistant. But the following is not clear to me:

  • How can I make the device deep sleep indefinitely with ESPHome (until a wakeup pin kicks in)?
  • How can I only trigger a single notification via ESPHome and then go back to deep sleep?
  • What kind of notification mechanism can be used from ESPHome to Home Assistant to the HomeAssistant smartphone app? Or would it be better send an E-Mail or something?

Thanks!


Check out the esphome documents. Lots of good tips there.

1 Like

While not a ESPHome based solution, I 've had two mailboxes being monitored for 6 months with this Zigbee based solution. It was easy to setup, very low cost and has been very reliable.

Good hunting!

It’s much easier to use some battery rf device on your mailbox and plug powered Esphome receiving that signal. It could be modified remote control fob, or wireless doorbell or @dproffer vibration sensor. Idea is same.

1 Like

RF door sensors can be a good fit (reed switch).

There’s plenty around.

1 Like

I’ve seen quite a lot of similar projects around the forum, so it’s worth searching a bit more.

I agree, even easier with that . But range is often not so good (for my experiences).
Anyway, the concept is same.
Rf remote fob can have a range of few hundred feets and battery life of few years. Try to beat that with “deep sleep battery esphome setup”…

1 Like

I’ve seen people house the sensor (and therefore antenna) outside the letterbox and then rewire a new reed switch on a length of wire to help with that. Especially if metal letterboxes are blocking signal.

I don’t have practical experience with that particular type of sensor though.

And by that point I guess a fob etc becomes a comparable mod?

1 Like

Lora is good for this, and very low power.

I use esphome a fair bit here, but I chose an Aqare Zigbee door sensor for this exact task.

Small, battery powered, reliable and a battery lasts 2 or 3 years.

For the HA automation, I use Telegraf to send a notification to my phone.

When the postman comes I get an email with a couple of pictures too - again, aqara but this time a PIR mounted under the mailbox which triggers a still from two cctv cameras. The pir triggers a script that grabs the stills and emails them to me. So I get a movement alert, and if I’m curious, can open an email and see who’s there. Not as fancy or 2-way as Ring, but private and cheap to implement.

The OP really should search the forum as there are dozens of Mailbox projects. A 2 minute read would give you a idea of what’s already been done.

1 Like