This project implements an ESP32-based asynchronous web server to monitor temperature and humidity data from a DHT11 sensor in real-time. Additionally, the server sends automated WhatsApp notifications of sensor readings to specified contacts.
- Real-Time Data Monitoring: Live temperature and humidity data available via a web server.
- WhatsApp Notifications: Automated updates sent through the CallMeBot API.
- Statistical Analysis: Script for extended analysis of collected sensor data, including mean, variance, standard deviation, median, and mode.
- ESP32 MCU (MicroController Unit)
- DHT11 temperature and humidity sensor
- Breadboard and connecting wires
- Resistor (1kΩ)
-
Arduino Library Setup:
- Install the "DHT library" and "Adafruit Unified Sensor" library from Arduino Library Manager.
- Include the ESP32 board package by adding the following URL to Additional Board Manager URLs in Arduino Preferences:
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
-
Arduino Code Upload:
- Use
ESP32_WebServer_DHT11_WhatsApp.ino
as the main code for uploading to ESP32. extra_StatisticalAnalysis.ino
contains additional statistical analysis.
- Use
-
WhatsApp API Setup:
Note: Replace personal information in the code (such as SSID, Wi-Fi password, phone number, and API key) with your own details, and ensure you keep this information secure.
The web server allows users to view current temperature and humidity readings on any device with a browser.
For extended data insights, the additional script performs statistical analysis on the sensor readings, providing:
- Mean
- Variance
- Standard Deviation
- Median
- Mode
-
Serial Monitor Output:
The data streamed from the ESP32 for debugging. -
Real-Time Plots:
Graphical data representations using Arduino’s Serial Plotter.
The ESP32 Weather Notifier demonstrates an IoT application with real-time data monitoring and automated messaging. The flexibility of the ESP32 and DHT11 sensor combination allows for numerous IoT applications.
- Truong, Hong Kha. “Temperature and humidity monitor with ESP8266.” Theseus
- ESP32-DHT11 Web Server Tutorial
- CallMeBot WhatsApp API Guide
This project was completed as part of my MTech mini-project.