This is a simple arduino script that notifies if some new mail is delivered to the Mailbox. It works by detecting if the mailbox door/hatch is opened. Then a simple microcontroller turns on, connects to a WiFi and sends a message to a desired Telegram chat or channel. it's made to run really power efficient. Thats achived due to deep-sleep. 99% of the day the microcontroller is running in deep-sleep. And only about 60 seconds, during sending and connecting to a WiFi the microcontroller is running. Until it goes back to sleep, waiting for the next mail.
- Power efficient (99% of the day in deep-sleep)
- Can be run from a 1S lipo and/or off solar power for ages
- Sends Telegram messages to specifig chats/channels
- Sends Telegram battery information to admin chats/channels (optional)
- configurable GPIO or onboard LED for indicating WiFi status (optional)
- Lolin D32 microcontroller1 (Or use your own ESP32. Pin mapping may differ.)2 (Would be happy if anyone attributes tested hardware.)
- NC-switch for detecting opening of the mailbox door/hatch. I used this reed-switch with the corresponding actuator magnet.
- 1S lipo with about 300-1000mA
- 5V solar panel
- Breadboard, cables, enclosure and maybe some soldering stuff
- Arduino IDE or VSCode with PlatformIO <-- prefered methode
- witnessmenow/UniversalTelegramBot
- Clone repository
git clone https://github.com/dimschlukas/mailio.git
- Check for missing libraries
- UniversalTelegramBot needs to be installed, if PlatformIO does not install it automatically
- Edit include/configuration.h
- You need a Telegram bot API token. Follow this guide to acquire a token. And use an IDBot to get your chats/channels id.
- Comment out unwanted optional features
- Flash microcontroller