{"id":26295637,"url":"https://github.com/nylaurent/brainy-bulb","last_synced_at":"2026-04-17T00:02:24.330Z","repository":{"id":282306643,"uuid":"948153172","full_name":"NyLaurent/Brainy-Bulb","owner":"NyLaurent","description":"This app simulates an IoT light control system using MQTT. A web interface allows users to turn a simulated light ON or OFF, while a Python script acts as an IoT device, receiving commands via an MQTT broker. The web client connects via WebSocket, and the Python client uses MQTT over TCP to communicate. 🚀💡","archived":false,"fork":false,"pushed_at":"2025-03-13T21:02:28.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-13T21:39:07.610Z","etag":null,"topics":["css3","esp8266","html5","javascript","mqtt-broker","paho-mqtt","python3","websocket"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NyLaurent.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2025-03-13T20:52:58.000Z","updated_at":"2025-03-13T21:05:24.000Z","dependencies_parsed_at":"2025-03-13T23:45:30.008Z","dependency_job_id":null,"html_url":"https://github.com/NyLaurent/Brainy-Bulb","commit_stats":null,"previous_names":["nylaurent/brainy-bulb"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NyLaurent%2FBrainy-Bulb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NyLaurent%2FBrainy-Bulb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NyLaurent%2FBrainy-Bulb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NyLaurent%2FBrainy-Bulb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NyLaurent","download_url":"https://codeload.github.com/NyLaurent/Brainy-Bulb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243681077,"owners_count":20330155,"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":["css3","esp8266","html5","javascript","mqtt-broker","paho-mqtt","python3","websocket"],"created_at":"2025-03-15T04:14:36.235Z","updated_at":"2026-04-17T00:02:24.134Z","avatar_url":"https://github.com/NyLaurent.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🧠💡 Brainy-Bulb\n\n![Brainy-Bulb Smart Control System](./image.png)\n\n## Overview\n\nBrainy-Bulb is an elegant IoT-based smart lighting system that demonstrates real-time control using the MQTT protocol. Experience the future of home automation with this interactive simulation of connected lighting technology.\n\n## Features\n\n- **Real-time Control**: Instantly toggle lights with zero perceptible delay\n- **Status Monitoring**: Visual feedback showing current bulb state\n- **MQTT Communication**: Industry-standard messaging protocol for IoT applications\n- **Cross-platform**: Works across devices and operating systems\n\n## System Architecture\n\nBrainy-Bulb consists of two main components that communicate through a dedicated MQTT broker:\n\n| Component | Purpose |\n|-----------|---------|\n| Web Interface | User-facing control panel to manage lighting |\n| IoT Device Simulation | Python-based simulation of an ESP8266 microcontroller |\n\n## Getting Started\n\n### Prerequisites\n\n- Python 3.6 or newer\n- Modern web browser (Chrome, Firefox, Safari, Edge)\n- Internet connection to access the MQTT broker\n- Basic understanding of web technologies\n\n### Installation\n\n1. Clone this repository:\n   ```bash\n   git clone https://github.com/yourusername/brainy-bulb.git\n   cd brainy-bulb\n   ```\n\n2. Install the required Python package:\n   ```bash\n   pip install paho-mqtt\n   ```\n\n### Running the System\n\n1. **Start the IoT device simulation:**\n\n   ```bash\n   python light_simulation.py\n   ```\n   \n   The terminal will display connection status and incoming commands.\n\n2. **Launch the web interface:**\n\n   Open `index.html` using Live Server in VS Code:\n   - Install Live Server extension if you haven't already\n   - Right-click on `index.html`\n   - Select \"Open with Live Server\"\n   \n   \n\n3. **Control your virtual smart bulb:**\n   - Click the ON/OFF buttons to change the bulb state\n   - Watch the status indicator update in real-time\n   - Check the Python terminal to see the simulated device receiving commands\n\n## Technical Details\n\n### MQTT Configuration\n\n- **Broker Address**: 157.173.101.159\n- **Port**: 1883 (default MQTT port)\n- **Topics**:\n  - `home/light/command`: For sending commands to the light\n  - `home/light/status`: For receiving status updates from the light\n\n### Extending the Project\n\nThis simulation provides a foundation for more advanced IoT projects. Consider these extensions:\n\n- Add brightness control and color adjustment\n- Implement user authentication\n- Create scheduled lighting routines\n- Add multiple simulated devices\n- Develop a mobile application using frameworks like React Native\n\n## Troubleshooting\n\n- **Connection Issues**: Ensure the MQTT broker is accessible from your network\n- **Command Failures**: Verify that both components are running and connected to the broker\n- **Interface Not Updating**: Check browser console for potential JavaScript errors\n\n## License\n\n[MIT License](LICENSE) - Feel free to use, modify, and distribute this code for personal or commercial projects.\n\n## Acknowledgments\n\n- The MQTT community for developing an efficient IoT communication protocol\n- All contributors who helped make Brainy-Bulb shine\n\nAuthor: Nyumbayire Laurent\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnylaurent%2Fbrainy-bulb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnylaurent%2Fbrainy-bulb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnylaurent%2Fbrainy-bulb/lists"}