IoT-Based Temperature & Humidity Monitoring with Remote LED Control
Developed by Gestell Company - Professional Embedded Solutions
- Overview
- System Architecture
- Features
- Hardware Components
- Software Components
- Getting Started
- Project Structure
- Development Team
- Documentation
- License
The Smart Room Monitor System is an IoT solution for real-time temperature and humidity monitoring with remote LED control. It targets two hardware flavors—ESP32 (professional, FreeRTOS + WiFi Manager) and ESP8266 (economy, loop-based)—and a Flutter mobile app for live visualization and control over MQTT (HiveMQ Cloud).
- 🌡️ Real-time Monitoring: Temperature and humidity via DHT11
- 💡 Remote Control: LED on/off through MQTT commands
- 📶 WiFi Provisioning: ESP32 captive portal WiFi Manager
- ☁️ Cloud Messaging: HiveMQ Cloud MQTT broker
- 📱 Mobile Dashboard: Flutter app for Android/iOS
- ⏱️ Low Latency: Target LED response <1 second
┌───────────────────────────────────────────────────────┐
│ USER INTERFACE │
├───────────────────────────┬───────────────────────────┤
│ Flutter Mobile App │ (Future) Web Dashboard │
│ 📱 MQTT over WiFi │ 🌐 MQTT over Internet │
└───────────────┬───────────┴───────────────┬──────────┘
│ │
│ MQTT │ MQTT
│ │
┌─────────▼─────────┐ ┌────────▼────────┐
│ MQTT Broker │ │ MQTT Broker │
│ (HiveMQ Cloud) │ │ (HiveMQ Cloud)│
└─────────┬─────────┘ └────────┬────────┘
│ │
MQTT Tx/Rx MQTT Tx/Rx
│ │
┌───────────────▼───────────────────────────▼──────────────┐
│ EMBEDDED DEVICES (ESP32/ESP8266) │
├──────────────────────────────────────────────────────────┤
│ Sensor: DHT11 (Temp/Humidity) │
│ Actuator: LED (GPIO) │
│ ESP32: FreeRTOS tasks + WiFi Manager (AP + portal) │
│ ESP8266: Lightweight loop firmware │
└──────────────────────────────────────────────────────────┘
- Temperature and humidity readings every 2–3 seconds
- JSON payloads with timestamps
- MQTT topics for telemetry (
room/temperature,room/humidity)
- Remote LED toggle via
room/led/set - Optional state mirror on
room/led/state - Target command-to-action latency <1s
- ESP32 WiFi Manager: AP
SmartRoom_Config, captive portal, NVS storage - Auto-reconnect for WiFi and MQTT
- Supports HiveMQ Cloud (TLS-capable)
- 24h stability target without crash/memory leak
- Backoff/retry on network loss
- Configurable QoS 0/1 with retain for state if needed
| Component | Specification | Quantity |
|---|---|---|
| MCU (Pro) | ESP32 (Dual-core, FreeRTOS) | 1 |
| MCU (Eco) | ESP8266 | 1 |
| Sensor | DHT11 (Temp/Humidity) | 1 |
| Actuator | LED (GPIO) | 1 |
| Power | 5V USB | 1 |
| Interface | USB-to-UART for flashing | 1 |
| Function | ESP32 Pin | ESP8266 Pin | Note |
|---|---|---|---|
| DHT11 Data | GPIO4 | GPIO4 | Single-wire |
| LED | GPIO2 | GPIO2 | Active HIGH |
| UART TX/RX | GPIO1/GPIO3 | GPIO1/GPIO3 | Flash/monitor |
- Tasks:
SensorTask,MQTTPublisherTask,MQTTSubscriberTask,WiFiManagerTask - WiFi Manager AP + captive portal with NVS credential storage
- MQTT JSON publish/subscribe at 2–3s cadence
- Loop-based firmware for sensor read + MQTT publish/subscribe
- Direct WiFi credentials (no portal)
- Same MQTT topics/payloads as ESP32
- Live dashboard for temperature/humidity
- LED toggle control and (optional) state mirror
- Auto-reconnect MQTT client (HiveMQ Cloud)
- HiveMQ Cloud
- Topics:
- Publish:
room/temperature,room/humidity - Subscribe:
room/led/set(optional publishroom/led/state)
- Publish:
- JSON payloads:
{"value": <float>, "unit": "C|%", "ts": <ms>},{"on": true|false}
- ESP32: ESP-IDF v4.x+, Python 3, CMake/Make/Ninja, esptool.py, USB-UART driver
- ESP8266: ESP8266 RTOS SDK (
IDF_PATH), make, esptool.py, USB-UART driver - Mobile: Flutter 3.x+, Android Studio/Xcode, connected device/emulator
cd firmware/esp32
idf.py set-target esp32
idf.py menuconfig # WiFi + MQTT
idf.py build
idf.py -p /dev/ttyUSB0 flash monitorcd firmware/esp8266
export IDF_PATH=/path/to/ESP8266_RTOS_SDK
make menuconfig
make -j4
make -j4 flash ESPPORT=/dev/ttyUSB0
make monitor ESPPORT=/dev/ttyUSB0cd mobile-app
flutter pub get
flutter run # set MQTT broker creds/topics in configsmart-room-monitor/
├── firmware/
│ ├── esp32/ # Professional (FreeRTOS + WiFi Manager)
│ └── esp8266/ # Economy (loop-based)
├── mobile-app/ # Flutter dashboard + LED control
└── docs/
└── technical/ # Project management & technical docs
- Founder: Hesham Ahmed (Gestell)
- Delivery: Development Team & Mobile Team
- Project management & backlog:
docs/technical/FullProjectHandbook(SCRUM Edition).md - Technical requirements & testing plan:
docs/technical/Smart_Room_Monitor_System_FullProfessionalDocumentation.md - User guide:
docs/user/(to be completed) - Firmware/App guides:
- ESP32 firmware:
firmware/esp32/README.md - ESP8266 firmware:
firmware/esp8266/README.md - Flutter app:
mobile-app/README.md
- ESP32 firmware:
Proprietary Software – All rights reserved by Gestell Company
For licensing inquiries, contact: Hisham4Ahmed@gmail.com