Combine that with a reflective layer on the bottom of the mailbox that gets covered by any mail, and point your TOF emitting device at an angle so the signal reflects around inside off that surface before coming back to the receiver, and you may have a winner, especially if the incoming mail is only a single sheet of thin paper advertising with virtually no measurable thickness.
I love group engineering. Now you got me looking at my metal mailbox too! Mine is across the road ~150 ft out from the house.
Using Amazon: Amazon.com : ToF sensor
I use a door sensor with reed switch that sends signal on both opening and closing mail box slot. Same one as Sir_Goodenough uses.
Glad it helped! Since I live on the top floor of a 5-story apartment building with 40–50 cm of reinforced concrete floors, standard Wi-Fi or Zigbee was out of the question. I had to go the LoRa route to punch through all that metal and concrete. My signal strength sits around 25%, not amazing, but it has been rock solid. If this were a typical suburban setup with a mailbox a few hundred meters away in open air, it would be a breeze.
Here is the hardware breakdown of my setup:
- Mailbox Node: LilyGO TTGO LoRa V2.1 connected to a VL53L0X ToF sensor.
- Gateway: You will need a second LilyGO TTGO LoRa V2.1 indoors to act as a gateway, receiving the LoRa packets and forwarding them to Home Assistant via Wi-Fi.
- Power: 2000mAh LiPo battery (for the mailbox node).
- Enclosure: Custom 3D-printed case to house the sensor and board inside the mailbox.
Lessons learned & future improvements: Right now, the mailbox node wakes up to take a reading every two hours and then goes back into deep sleep. With this schedule, I get about 50 days of battery life. I’m pretty happy with that, but it could definitely be optimized.
If I were to rebuild it today, I would choose Heltec boards instead of LilyGO. They use the newer SX1262 LoRa chip, which is much more power-efficient and offers way better performance than the older SX1276 on the TTGO V2.1.
What's the deepsleep current for that?
To be honest, I haven't measured the exact deep sleep current with a multimeter on my specific node, but the LilyGO TTGO V2.1 is notorious for not being the most power-efficient board out of the box.
Due to the onboard voltage regulator, the USB-to-UART chip, and the older SX1276 setup, these boards usually pull around 1 to 2 mA during deep sleep (assuming you properly put the LoRa chip to sleep and turn off the OLED via code).
That sleep current matches my real-world testing: waking up once every two hours with a 2000mAh battery yields roughly 50 days of battery life.
This is another big reason why I would go with a newer board (like Heltec's SX1262-based options) if I were to rebuild it today, as their deep sleep optimization is supposed to be significantly better.
2mA. That sucks.
The ToF only adds 5 micro Amps if it does go into standby.
I have used a few LORA heltec devices and the antenna that comes with them is terrible. Might improve your battery time if you can get a better antenna and then turn down the transmit power.
Does it run on Esphome. How long does it remain awake?
I'll definitely keep that in mind for future builds, especially if I move over to the Heltec boards.
To answer your questions: yes, it runs on ESPHome, and the wake time per cycle is around 4 seconds before the node goes back to sleep.
Honestly, instead of diving deep into optimizing the ESPHome code, tweaking transmit power, or risking the stability of a setup that currently works flawlessly, I'm thinking of taking a much simpler route. I actually have enough room in my 3D-printed case to swap out the current 2000mAh battery for a 5000mAh battery.
It's definitely a "low-effort, high-return" solution, but it should easily push my battery life way past 100 days without having to change a single line of code or dig into the hardware. If it ain't broke, don't fix it, just give it a bigger battery ![]()
Don’t know how things have been going here, but my solution, as I have a plasitc heavy duty standard shaped, side/front flap mailbox, was put a zooz motion sensor way in the back, glue a magnet down and set the sensor on top of that, and then any time the door opens, it shows motion. Mailbox is across the street, about 150ft, and zwave LRange works great. Also could detect someone opening mailbox more than once a day, so I woujld then check cameras. The only drawback, albeit rare (2 a month) a big enough vehicle driving fast enough and close enough set off the inertia part of the sensor. Otherwise good way to see when the mail comes, and what time of day.
