The Room Control System is a next-generation, open-source IoT-based automation platform designed to control and monitor electrical appliances in real-time. Unlike traditional smart home systems, this solution is cost-effective, cloud-independent, and fully customizableβempowering users with unparalleled control and security over their smart environments.
Built on a modern tech stack leveraging MQTT, WebSockets, SQLite, and Express.js, this system delivers seamless automation, real-time feedback, and AI-driven voice control without requiring proprietary apps like Alexa, Google Home, or Blynk IoT.
[Project Demonstration] Watch the Demo Video Watch the Demo Video
- Completely Open-Source β No hidden costs, full transparency, and complete control.
- Independent & Decentralized β Runs without cloud dependency for ultimate privacy.
- AI-Enabled Voice Commands β Issue commands directly using built-in voice recognition.
- Self-Hosting Options β Run it on Raspberry Pi, VPS, or personal servers.
- Designed for Scalability β Adaptable to industrial automation, smart classrooms, and home automation.
πΉ Live Deployment:
π Room Control (Live Demo)
π GitHub Repository
HOMEPAGE:
VOICE CONTROL:
β
Real-Time Web Control β Instant response via WebSockets (Socket.IO).
β
MQTT-Based IoT Communication β Ultra-secure and efficient messaging.
β
Historical Data Logging β View past actions, timestamps, and user activity.
β
End-to-End Security β bcrypt password hashing, session-based authentication.
β
AI-Powered Voice Control β No Alexa, No Google Home Needed! Direct command execution.
β
Automated Scheduling β Predefine ON/OFF times for smart appliances.
β
Mobile-Friendly UI β Responsive and accessible from any device.
β
Offline & Local Hosting Support β Functions without an internet connection.
β
Lightweight & Scalable β Works on low-power devices like ESP8266 & ESP32.
Real-Time Historical Data:
Existing Systems | Room Control System |
---|---|
Requires External Apps (Alexa, Google Home, Blynk IoT) | No additional apps needed β browser-based control |
Expensive Smart Hubs | Uses affordable ESP8266/ESP32 modules |
Cloud Dependent | Works offline or online (self-hosted) |
Proprietary & Limited Customization | Fully open-source & highly customizable |
IoT Vendor Lock-In | Decentralized & user-controlled |
- Backend: Express.js, SQLite
- Frontend: EJS, Bootstrap
- Communication Protocol: MQTT, WebSockets
- Embedded: ESP8266, HiveMQ Cloud MQTT
- Security: bcrypt, express-session
- Install Node.js
- Set up ESP8266 with Arduino IDE
- Create an account with HiveMQ Cloud MQTT
git clone https://github.com/lovnishverma/roomcontrol.git
cd roomcontrol
npm install
Create a .env
file and add:
MQTT_BROKER_URL=mqtts://your-hivemq-url
MQTT_USERNAME=your-username
MQTT_PASSWORD=your-password
SESSION_SECRET=your-secret-key
npm start
Server will run at http://localhost:3000
.
- Relay Module: GPIO 4 (D2)
- Buzzer: GPIO 5 (D1)
const char* ssid = "your_wifi_SSID";
const char* password = "your_wifi_password";
const char* mqttServer = "your-mqtt-server";
const int mqttPort = 8883;
const char* mqttUser = "your-mqtt-username";
const char* mqttPassword = "your-mqtt-password";
Upload the firmware using Arduino IDE.
πΉ Full Code: ESP8266 Firmware
Endpoint | Method | Description |
---|---|---|
/toggle-app?state=on |
GET | Turns the switch ON |
/toggle-app?state=off |
GET | Turns the switch OFF |
/app-status |
GET | Retrieves switch status |
/send-command |
POST | Sends command { command: '1' '0' } |
/historic-data |
GET | Retrieves historical data |
newEntry
β Broadcasts new historical datastatusUpdate
β Sends real-time status updates
π AR-Powered Automation β Integrate Augmented Reality-based automation.
π AI-Powered Automation β Integrate machine learning-based automation.
π Advanced Security β Implement OAuth 2.0 & JWT authentication.
π Multi-Device Synchronization β Seamless control across multiple devices.
π Smart Energy Management β AI-powered power consumption analysis.
π Native Mobile App (Flutter) β Build an offline-first PWA & mobile app.
π Raspberry Pi Support β Run locally on a self-hosted local server.
- Fork the repository.
- Create a new branch:
git checkout -b feature-xyz
- Commit changes:
git commit -m "Add new feature"
- Push to GitHub:
git push origin feature-xyz
- Submit a pull request.
π Live Deployment: Room Control
π GitHub Repository: Room Control
πΉ Self-Hosting Options β Raspberry Pi, VPS, or local servers.
This project is open-source under the MIT License. Feel free to use, modify, and distribute.
This project is based on the research paper IoT-Based Remote Control and Monitoring of Electrical Appliances.
- Lovnish Verma (@lovnishVerma)
- Dr. Sarwan Singh (@sarwansingh)
For any issues or queries, open an issue in the repository or contact: princelv84@gmail.com.