{"id":26914687,"url":"https://github.com/lovnishverma/roomcontrol","last_synced_at":"2025-07-08T10:40:20.820Z","repository":{"id":283139382,"uuid":"950814927","full_name":"lovnishverma/roomcontrol","owner":"lovnishverma","description":"The Room Control System is a real-time, web-based smart home automation system built using NodeMCU (ESP8266), Node.js, MQTT, SQLite, and WebSockets. It allows users to remotely control and monitor IoT-based electrical appliances with instant, real-time feedback via a dynamic web dashboard that updates without requiring page refreshes. ","archived":false,"fork":false,"pushed_at":"2025-06-24T18:30:49.000Z","size":18031,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-24T19:46:05.239Z","etag":null,"topics":["expressjs","iot","mqtt","nodejs","research-project","smarthome"],"latest_commit_sha":null,"homepage":"https://roomcontrol.glitch.me/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lovnishverma.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-18T18:15:17.000Z","updated_at":"2025-06-24T18:30:53.000Z","dependencies_parsed_at":"2025-04-09T08:36:15.652Z","dependency_job_id":null,"html_url":"https://github.com/lovnishverma/roomcontrol","commit_stats":null,"previous_names":["lovnishverma/roomcontrol"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lovnishverma/roomcontrol","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovnishverma%2Froomcontrol","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovnishverma%2Froomcontrol/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovnishverma%2Froomcontrol/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovnishverma%2Froomcontrol/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lovnishverma","download_url":"https://codeload.github.com/lovnishverma/roomcontrol/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovnishverma%2Froomcontrol/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264252289,"owners_count":23579841,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["expressjs","iot","mqtt","nodejs","research-project","smarthome"],"created_at":"2025-04-01T17:39:56.618Z","updated_at":"2025-07-08T10:40:20.810Z","avatar_url":"https://github.com/lovnishverma.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Room Control System (Next-Gen Smart Home Automation)\n\n![poster](https://github.com/user-attachments/assets/2b1131e9-3ba2-44ae-81d6-77204dc058be)\n\n\n## 🚀 Overview\nThe **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. \n\nBuilt 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.\n\n\n[Project Demonstration] [Watch the Demo Video](https://drive.google.com/file/d/12WnC51pWOMC-PsmbNZV4HloxscDCCj8v/view?usp=sharing)  [Watch the Demo Video](https://drive.google.com/file/d/16Wy8lnvUQkwuwW1xyQJ9vPcC_9h-Urk-/view?usp=sharing)\n\n\n### 🌍 Revolutionizing IoT Automation\n- **Completely Open-Source** – No hidden costs, full transparency, and complete control.\n- **Independent \u0026 Decentralized** – Runs **without cloud dependency** for ultimate privacy.\n- **AI-Enabled Voice Commands** – Issue commands directly using **built-in voice recognition**.\n- **Self-Hosting Options** – Run it on **Raspberry Pi, VPS, or personal servers**.\n- **Designed for Scalability** – Adaptable to **industrial automation, smart classrooms, and home automation**.\n\n🔹 **Live Deployment:**  \n🌐 **[Room Control (Live Demo)](https://roomcontrol.glitch.me/login)**  \n📂 **[GitHub Repository](https://github.com/lovnishverma/roomcontrol)**  \n\n**HOMEPAGE:**\n\n![image](https://github.com/user-attachments/assets/de3e47d3-4a68-4458-bebc-0fa3dd9fcd90)\n\n**VOICE CONTROL:**\n\n![image](https://github.com/user-attachments/assets/523c4622-7c8d-4054-a5df-893767ab11d1)\n\n\n\n## 🔥 Key Features\n✅ **Real-Time Web Control** – Instant response via **WebSockets (Socket.IO)**.  \n✅ **MQTT-Based IoT Communication** – Ultra-secure and efficient messaging.  \n✅ **Historical Data Logging** – View **past actions, timestamps, and user activity**.  \n✅ **End-to-End Security** – **bcrypt password hashing, session-based authentication**.  \n✅ **AI-Powered Voice Control** – **No Alexa, No Google Home Needed!** Direct command execution.  \n✅ **Automated Scheduling** – Predefine ON/OFF times for smart appliances.  \n✅ **Mobile-Friendly UI** – Responsive and accessible from any device.  \n✅ **Offline \u0026 Local Hosting Support** – Functions **without an internet connection**.  \n✅ **Lightweight \u0026 Scalable** – Works on low-power devices like ESP8266 \u0026 ESP32.  \n\n**Real-Time Historical Data:**\n\n![image](https://github.com/user-attachments/assets/40585baa-0148-4642-8f9f-1994a9a626e6)\n\n\n## 📌 Why This System is a Game-Changer\n| **Existing Systems** | **Room Control System** |\n|--------------------|-------------------|\n| Requires External Apps (Alexa, Google Home, Blynk IoT) | No additional apps needed – **browser-based** control |\n| Expensive Smart Hubs | Uses **affordable ESP8266/ESP32** modules |\n| Cloud Dependent | Works **offline or online** (self-hosted) |\n| Proprietary \u0026 Limited Customization | Fully **open-source** \u0026 highly customizable |\n| IoT Vendor Lock-In | **Decentralized \u0026 user-controlled** |\n\n## 🛠️ Technologies Used\n- **Backend:** Express.js, SQLite\n- **Frontend:** EJS, Bootstrap  \n- **Communication Protocol:** MQTT, WebSockets  \n- **Embedded:** ESP8266, HiveMQ Cloud MQTT  \n- **Security:** bcrypt, express-session  \n\n## 🏗️ Installation Guide\n### Prerequisites\n- Install **Node.js**\n- Set up **ESP8266** with [Arduino IDE](https://www.arduino.cc/en/software/)\n- Create an account with [HiveMQ Cloud MQTT](https://www.hivemq.com/)\n\n### 1️⃣ Clone the Repository\n```sh\ngit clone https://github.com/lovnishverma/roomcontrol.git\ncd roomcontrol\n```\n\n### 2️⃣ Install Dependencies\n```sh\nnpm install\n```\n\n### 3️⃣ Configure Environment Variables\nCreate a `.env` file and add:\n```ini\nMQTT_BROKER_URL=mqtts://your-hivemq-url\nMQTT_USERNAME=your-username\nMQTT_PASSWORD=your-password\nSESSION_SECRET=your-secret-key\n```\n\n### 4️⃣ Start the Server\n```sh\nnpm start\n```\nServer will run at `http://localhost:3000`.\n\n### 5️⃣ Deploying to a Live Server\n- [Glitch](https://glitch.com/)\n- [Heroku](https://www.heroku.com/)\n- [Vercel](https://vercel.com/)\n\n## ⚙️ ESP8266 Firmware Setup\n### Wiring\n- **Relay Module:** GPIO 4 (D2)\n- **Buzzer:** GPIO 5 (D1)\n\n### Wi-Fi \u0026 MQTT Configuration\n```cpp\nconst char* ssid = \"your_wifi_SSID\";\nconst char* password = \"your_wifi_password\";\nconst char* mqttServer = \"your-mqtt-server\";\nconst int mqttPort = 8883;\nconst char* mqttUser = \"your-mqtt-username\";\nconst char* mqttPassword = \"your-mqtt-password\";\n```\nUpload the firmware using Arduino IDE.\n\n🔹 **Full Code:** [ESP8266 Firmware](https://github.com/lovnishverma/roomcontrol/blob/master/esp8266_code.ino)\n\n## 🌐 API Endpoints\n| Endpoint | Method | Description |\n|----------|--------|-------------|\n| `/toggle-app?state=on` | GET | Turns the switch ON |\n| `/toggle-app?state=off` | GET | Turns the switch OFF |\n| `/app-status` | GET | Retrieves switch status |\n| `/send-command` | POST | Sends command `{ command: '1'  '0' }` |\n| `/historic-data` | GET | Retrieves historical data |\n\n## 📡 WebSocket Events\n- **`newEntry`** → Broadcasts new historical data\n- **`statusUpdate`** → Sends real-time status updates\n\n## 🔄 Future Enhancements\n\n🚀 **[AR-Powered Automation](https://github.com/lovnishverma/arjs-iot-control)** – Integrate **Augmented Reality-based automation**.\n\n🚀 **AI-Powered Automation** – Integrate **machine learning-based automation**.  \n🚀 **Advanced Security** – Implement **OAuth 2.0 \u0026 JWT authentication**.  \n🚀 **Multi-Device Synchronization** – Seamless control across multiple devices.  \n🚀 **Smart Energy Management** – AI-powered power consumption analysis.  \n🚀 **Native Mobile App (Flutter)** – Build an **offline-first PWA \u0026 mobile app**.  \n🚀 **Raspberry Pi Support** – Run locally on a **self-hosted local server**.  \n\n## 🎯 Contribution Guide\n1. Fork the repository.\n2. Create a new branch: `git checkout -b feature-xyz`\n3. Commit changes: `git commit -m \"Add new feature\"`\n4. Push to GitHub: `git push origin feature-xyz`\n5. Submit a pull request.\n\n## 🔗 Deployment \u0026 Hosting\n📌 **Live Deployment:** [Room Control](https://roomcontrol.glitch.me/)  \n📂 **GitHub Repository:** [Room Control](https://github.com/lovnishverma/roomcontrol)  \n🔹 **Self-Hosting Options** – Raspberry Pi, VPS, or local servers.  \n\n## 📝 License\nThis project is open-source under the **MIT License**. Feel free to **use, modify, and distribute**.\n\n## 📖 Research Paper\nThis project is based on the research paper **[IoT-Based Remote Control and Monitoring of Electrical Appliances](https://journal.nielit.edu.in/index.php/01/article/view/107)**.\n\n## 🤝 Contributors\n- **Lovnish Verma** [(@lovnishVerma)](https://github.com/lovnishVerma)\n- **Dr. Sarwan Singh** [(@sarwansingh)](https://github.com/sarwansingh)\n\n## 📬 Contact\nFor any issues or queries, open an issue in the repository or contact: [princelv84@gmail.com](mailto:princelv84@gmail.com).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flovnishverma%2Froomcontrol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flovnishverma%2Froomcontrol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flovnishverma%2Froomcontrol/lists"}