I was having some mechanical problems with the previous version of the mailbox notifier where the pieces of mail would not sit flush against the sensor due to getting caught on the PCB box at the rear.
I solved this by building a false floor in the mailbox out of cardboard with the components glued onto the underside of the flooring. I would have been better to buy another mailbox, but I didn’t want to modify the property or the mailbox.
The current modifications are reversible. Plus its also waterproof.
The code is very simple. IFTTT was to slow – taking up to 1 hour to trigger an Android notification. The new version is near instantaneous by using MQTT – but the main let down is the Android software with a lack of good MQTT software with reliable persistent connections and notifications.
My MQTT broker runs on my $5 Digital Ocean droplet running FreeBSD. For a WiFi connection I enabled a hidden guest network on my router that does not have access to the rest of my network.
The ESP8266 goes into deepSleep() for 60 seconds and wakes, upon wake it checks the A0 (analog) pin, if there is mail this triggers the WiFi to connect and a message to be sent to my MQTT broker.
Here is the code:
- WeMos® D1 mini V2.2.0 WIFI Internet Development Board
- IR Line Follow/Track Sensor
- 18650 power supply
- Dupont cables
- WiFi Antenna
- Antenna Cable
I only used a scissors, hot glue gun and soldering iron – so there is not a big tool requirement.
- Doesn’t count mail
- Annoys you by continuously reminding you that you have mail….