Skip to content
/ IoT Public

Embedded systems codes and hands-on projects

Notifications You must be signed in to change notification settings

Mchiir/IoT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ’‘ Light Scheduler

πŸ“ Overview

A smart light scheduling system that allows users to set ON/OFF times via a web UI.
The schedule is sent over WebSocket β†’ MQTT β†’ Arduino, controlling an LED accordingly.

πŸ› οΈ Tech Stack

  • Frontend: HTML, CSS, JavaScript (WebSocket client)
  • Backend: Python (WebSocket server, MQTT publisher)
  • IoT: Arduino (LED control), MQTT (Mosquitto broker)
  • Protocol: WebSocket, MQTT, Serial

πŸš€ How to Run

  1. Start MQTT Broker
    Run Mosquitto on localhost:1883.

  2. Connect Arduino
    Upload the Arduino sketch and ensure it's on the correct serial port (e.g., COM3).

  3. Run Subscriber
    python subscriber.py (receives MQTT messages, sends commands to Arduino)

  4. Run WebSocket Server
    python backend.py (listens on ws://localhost:8765)

  5. Open client.html
    In a browser to set the light ON/OFF schedule.

⚠️ Make sure you installed all python packages, by

python install -r requirements.txt

πŸ•’ LED will toggle based on the scheduled times!

Releases

No releases published

Packages

No packages published