MailTonBox is a distributed IoT system based on ESP32 to digitize traditional mailboxes, detecting the arrival of mail and notifying the user in real time via Telegram.
The system includes:
- Physical detection via ultrasonic sensors
- Long-range wireless communication (LoRa)
- Automatic notifications via Telegram bot
- Environmental monitoring with embedded AI model
- Configuration interface via web app (PWA)
- MailTon: Central node connected to the Internet via Wi-Fi, receives messages from remote nodes and manages communication with Telegram and the AI model.
- CtrlMailBox: Remote node inside the mailbox, detects the presence of letters and sends reports via LoRa.
- TonyBot: Integrated Telegram bot to receive notifications and configure the system remotely.
- Web App: PWA interface for configuring devices in Access Point mode.
The system implements a multi-task model that simultaneously executes:
- Regression: CO value estimation (ppm)
- Classification: environmental conditions (temp/humidity)
- Classification: air quality
The ESP32 firmware is divided into two main components:
MailTon/: code for the Central UnitCtrlMailBox/: code for remote knots
- Available on GitHub Pages:
👉
https://alessandroferrante.github.io/IoT/MailTonBox
For a complete description of architecture, operation, tests and artificial intelligence embedded, consult the complete technical report:
Mailton (left) and Ctrlmailbox (right)
- Visual Studio Code with the PlatformIO;
iot_boardlibrary provided by the course to implement the protocols using the components with Arduino Nano Esp32;
| Libreria | Descrizione | Link |
|---|---|---|
Arduino.h |
Basic bookcase of Arduino | 🔗Arduino Core |
WiFi.h |
Wi-Fi connection management for ESP32 | 🔗WiFi |
iot_board.h |
Specific bookcase for the board used (IoTboard Unict) | 🔗IoTBoard Library |
AsyncTCP.h |
Asinnant TCP for ESP32 | 🔗AsyncTCP |
ESPAsyncWebServer.h |
Asynchronous web server for ESP32 | 🔗ESPAsyncWebServer |
DNSServer.h |
Server DNS locale per captive portal | 🔗DNSServer |
Preferences.h |
Non volatile memory management (NVS) | 🔗Preferences |
WiFiClientSecure.h |
HTTPS connections with certificates | 🔗WiFiClientSecure |
UniversalTelegramBot.h |
Bot Telegram per ESP8266/ESP32 | 🔗UniversalTelegramBot |
ArduinoJson.h |
Parsing and generation of Json | 🔗ArduinoJson |
DHT.h |
DHT11/DHT22 sensor management | 🔗DHT Sensor Library |
EloquentTinyML.h |
Execution tinyml models on microcontrolleri | 🔗EloquentTinyML |
This repository is licensed under the MIT license. See the LICENSE file for more details.
