{"id":28334479,"url":"https://github.com/aimable01/mqtt-based-light-control","last_synced_at":"2026-01-28T15:31:20.284Z","repository":{"id":282213379,"uuid":"947829552","full_name":"Aimable01/mqtt-based-light-control","owner":"Aimable01","description":"an mqtt based light 💡control system","archived":false,"fork":false,"pushed_at":"2025-04-24T13:18:35.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-17T08:42:55.499Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Aimable01.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,"zenodo":null}},"created_at":"2025-03-13T10:10:04.000Z","updated_at":"2025-04-24T13:18:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"26f36cc2-3f8c-4575-8c5f-c193f6ee2f1e","html_url":"https://github.com/Aimable01/mqtt-based-light-control","commit_stats":null,"previous_names":["aimable01/mqtt-based-light-control"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Aimable01/mqtt-based-light-control","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aimable01%2Fmqtt-based-light-control","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aimable01%2Fmqtt-based-light-control/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aimable01%2Fmqtt-based-light-control/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aimable01%2Fmqtt-based-light-control/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Aimable01","download_url":"https://codeload.github.com/Aimable01/mqtt-based-light-control/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aimable01%2Fmqtt-based-light-control/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28846340,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T15:15:36.453Z","status":"ssl_error","status_checked_at":"2026-01-28T15:15:13.020Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2025-05-26T21:19:52.745Z","updated_at":"2026-01-28T15:31:20.266Z","avatar_url":"https://github.com/Aimable01.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MQTT-Based Light Control System\n\nA simple web-based application that allows controlling a virtual light via MQTT. The system consists of two components:\n\n1. **Web Interface**: A browser-based UI with buttons to turn the light on and off\n2. **IoT Device Simulator**: A Python script that simulates an ESP8266 device\n\n## Components\n\n### Web Interface (index.html)\nA simple HTML page with JavaScript that:\n- Connects to a public MQTT broker via WebSockets\n- Provides \"Turn ON\" and \"Turn OFF\" buttons\n- Displays the current light status\n- Publishes messages to the MQTT topic `/student_group/light_control`\n\n### IoT Device Simulator (light_simulation.py)\nA Python script that:\n- Connects to the same MQTT broker\n- Subscribes to the `/student_group/light_control` topic\n- Prints the light status whenever a message is received\n\n## How to Run\n\n### Step 1: Start the IoT Device Simulator\n1. Ensure you have Python installed\n2. Install the required MQTT client library:\n   ```\n   pip install paho-mqtt\n   ```\n3. Run the simulator:\n   ```\n   python light_simulation.py\n   ```\n\n### Step 2: Open the Web Interface\n1. Open `index.html` in a web browser\n2. Wait for the connection status to show \"Connected\"\n3. Click the \"Turn ON\" or \"Turn OFF\" buttons to control the light\n\n### Step 3: Observe the Simulator\nThe Python script will print messages showing the light status changes as you click the buttons on the web interface.\n\n## Technical Details\n\n- **MQTT Broker**: Uses the public broker at broker.emqx.io\n- **Topic**: `/student_group/light_control`\n- **Message Format**: Simple text strings \"ON\" or \"OFF\"\n- **Web Client**: Uses MQTT.js library over WebSockets (WSS)\n- **IoT Simulator**: Uses the Paho MQTT Python client\n\n## Requirements\n\n- Python 3.6+\n- Paho MQTT Python client\n- Web browser with JavaScript enabled","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faimable01%2Fmqtt-based-light-control","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faimable01%2Fmqtt-based-light-control","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faimable01%2Fmqtt-based-light-control/lists"}