A WiFi-based Smart Light system using ESP8266 (NodeMCU) and a Relay Module.
This project creates a modern captive portal web interface to turn a light ON/OFF from any phone or PC — no internet required.
- 📶 ESP8266 SoftAP (No router needed)
- 🌐 Captive portal style web control
- 💡 Relay-based AC light control
- 🎨 Modern animated UI with glowing bulb
- ⚡ Fast response & lightweight code
- 📱 Mobile-friendly interface
- ESP8266 (NodeMCU / ESP-12)
- 1-Channel Relay Module
- AC Bulb / Load
- Jumper Wires
- External power supply (recommended)
| Component | ESP8266 Pin |
|---|---|
| Relay IN | D1 (GPIO5) |
⚠️ Relay works in LOW trigger mode
- ESP8266 creates a WiFi hotspot named MH2 LIGHT
- User connects via phone or PC
- Captive portal opens automatically
- ON/OFF buttons send commands to ESP8266
- Relay switches the light accordingly
- Upload the code to ESP8266
- Power the board
- Connect to WiFi:
