Note
Project Status: Archived / Completed. This repository is finalized and is no longer actively maintained. It remains public as a portfolio project.
This project implements a secure, full-stack IoT Edge Node architecture. It captures environmental data (Temperature & Humidity) via an ESP32 and transmits it wirelessly using the MQTT protocol to a containerized backend.
The system is designed with a focus on scalability and security best practices, featuring decoupled credentials, non-blocking I/O, Deep Sleep power optimization, and a Dockerized infrastructure ready for deployment.
- Protocol: MQTT (Lightweight Pub/Sub messaging).
- Data Format: JSON Serialization (
{"device": "id", "temp": 24.0...}) for interoperability with Cloud services. - Resilience: Automatic Wi-Fi and MQTT reconnection logic.
- Security: Credentials decoupled via
secrets.h(GitOps best practice) and sensitive tokens excluded from version control. - Energy Efficiency: Deep Sleep mode integration (10s sleep cycle) for battery-powered operation.
- Infrastructure as Code: Full backend stack (Broker + Logic) defined in
docker-compose.yml.
/ESP32-IoT-Telemetry
├── /backend # Server-side configuration
│ ├── /node_red_data # Logic flows & settings (Pre-configured)
│ └── mosquitto.conf # MQTT Broker configuration
├── /firmware
│ └── /Edge_Telemetry_Node # ESP32 C++ Firmware
│ ├── Edge_Telemetry_Node.ino
│ ├── WifiUtils.h
│ └── secrets_example.h
├── docker-compose.yml # Container orchestration script
└── README.md
- Microcontroller: ESP32 DevKit V1.
- Sensor: DHT11 (Temperature & Humidity).
- Connection: DHT11 Data Pin connected to GPIO 4.
- Clone or Download this repository.
- Configuration:
- Navigate to
/firmware/Edge_Telemetry_Node/. - Rename
SecretsExample.htosecrets.h. - Open
secrets.hand enter your Wi-Fi SSID, Password, and MQTT Broker IP.
- Navigate to
- Deploy:
- Open
Edge_Telemetry_Node.inoin Arduino IDE. - Install required libraries:
PubSubClientandDHT sensor library. - Upload the firmware to the ESP32.
- Open
This project includes a fully containerized infrastructure using Docker Compose. It automatically sets up the MQTT Broker and the Logic Layer (Node-RED).
- Docker Desktop installed.
- Navigate to the project root directory.
- Run the stack:
docker-compose up -d
The project is finalized. The initial roadmap targets were:
- Deep Sleep mode integration for battery optimization (Implemented).
- Implementation of TLS/SSL (MQTTS) for encrypted communication (Out of scope).
- Integration with a Time Series Database (InfluxDB) and Grafana (Out of scope).
- Lead Maintainer: Pablo Rodriguez Jimenez - Finished development (Project Archived).
- Original Co-author: Pedro Alfonso Quiles García - Collaborated on the initial prototype logic for the university course.
Open Source Project for Educational Purposes