Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔥 Smart Room Monitor System

Status Platform License

IoT-Based Temperature & Humidity Monitoring with Remote LED Control

Developed by Gestell Company - Professional Embedded Solutions


📋 Table of Contents


🎯 Overview

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).

Key Capabilities

  • 🌡️ 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

🏗️ System Architecture

┌───────────────────────────────────────────────────────┐
│                    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                      │
└──────────────────────────────────────────────────────────┘

✨ Features

🌡️ Monitoring & Telemetry

  • Temperature and humidity readings every 2–3 seconds
  • JSON payloads with timestamps
  • MQTT topics for telemetry (room/temperature, room/humidity)

💡 Control

  • Remote LED toggle via room/led/set
  • Optional state mirror on room/led/state
  • Target command-to-action latency <1s

🔗 Connectivity

  • ESP32 WiFi Manager: AP SmartRoom_Config, captive portal, NVS storage
  • Auto-reconnect for WiFi and MQTT
  • Supports HiveMQ Cloud (TLS-capable)

🛡️ Reliability & Ops

  • 24h stability target without crash/memory leak
  • Backoff/retry on network loss
  • Configurable QoS 0/1 with retain for state if needed

🛠️ Hardware Components

Core Components

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

Pin Mapping (example, adjust per board)

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

💻 Software Components

1) ESP32 Firmware (FreeRTOS)

  • Tasks: SensorTask, MQTTPublisherTask, MQTTSubscriberTask, WiFiManagerTask
  • WiFi Manager AP + captive portal with NVS credential storage
  • MQTT JSON publish/subscribe at 2–3s cadence

2) ESP8266 Firmware (Economy)

  • Loop-based firmware for sensor read + MQTT publish/subscribe
  • Direct WiFi credentials (no portal)
  • Same MQTT topics/payloads as ESP32

3) Mobile Application (Flutter/Dart)

  • Live dashboard for temperature/humidity
  • LED toggle control and (optional) state mirror
  • Auto-reconnect MQTT client (HiveMQ Cloud)

4) MQTT Broker

  • HiveMQ Cloud
  • Topics:
    • Publish: room/temperature, room/humidity
    • Subscribe: room/led/set (optional publish room/led/state)
  • JSON payloads: {"value": <float>, "unit": "C|%", "ts": <ms>}, {"on": true|false}

🚀 Getting Started

Prerequisites

  • 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

Install & Flash – ESP32 (Pro)

cd firmware/esp32
idf.py set-target esp32
idf.py menuconfig       # WiFi + MQTT
idf.py build
idf.py -p /dev/ttyUSB0 flash monitor

Install & Flash – ESP8266 (Eco)

cd firmware/esp8266
export IDF_PATH=/path/to/ESP8266_RTOS_SDK
make menuconfig
make -j4
make -j4 flash ESPPORT=/dev/ttyUSB0
make monitor ESPPORT=/dev/ttyUSB0

Run – Flutter App

cd mobile-app
flutter pub get
flutter run   # set MQTT broker creds/topics in config

📁 Project Structure

smart-room-monitor/
├── firmware/
│   ├── esp32/       # Professional (FreeRTOS + WiFi Manager)
│   └── esp8266/     # Economy (loop-based)
├── mobile-app/      # Flutter dashboard + LED control
└── docs/
    └── technical/   # Project management & technical docs

👥 Development Team

  • Founder: Hesham Ahmed (Gestell)
  • Delivery: Development Team & Mobile Team

📚 Documentation

  • 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

📄 License

Proprietary Software – All rights reserved by Gestell Company
For licensing inquiries, contact: Hisham4Ahmed@gmail.com

About

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).

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages