Check out the live demo:
Video Demonstration
This project demonstrates a simple web-based control panel using an ESP8266 or ESP32.
It lets you wirelessly turn a relay module ON or OFF using a browser, no internet needed!
- The ESP8266/ESP32 creates a Wi-Fi Access Point with a custom SSID and password.
- A simple web server runs on port 80.
- The server displays an HTML interface with ON/OFF buttons.
- Clicking a button sends a GET request to toggle GPIO12 (D4 on ESP8266).
This project is for educational and experimental purposes only.
- Do not connect high-voltage mains power unless you are fully trained and aware of electrical safety.
- Improper use of relay modules or incorrect wiring can cause fire, electric shock, or damage to devices.
- Always use low-voltage testing before connecting mains appliances, and follow local safety regulations.
- The author is not responsible for any damage, injury, or loss caused by using this project. Always handle electronics safely and operate the device in a controlled environment..
| Component | ESP8266 Pin | GPIO | Description |
|---|---|---|---|
| Relay IN | D4 | 2 | Controls device ON/OFF |
| Relay VCC | 5V | — | Power supply |
| Relay GND | GND | — | Common ground |
Schematic Diagram Screenshot
- ESP8266 NodeMCU or ESP32
- 1× Relay Module
- Jumper wires, USB cable
- Connect the components as per the schematic above.
- Upload the Arduino code using the Arduino IDE.
- Use the correct board (ESP8266 or ESP32).
- Install the required libraries.
- Connect to the Wi-Fi Access Point created by the device:
- SSID:
HOME AUTOMATION_AP
- SSID:
- Open your browser and go to
192.168.4.1. - Use the web interface to toggle the relay.
This project is licensed under the MIT License.
See the LICENSE file for details.
Created by Roy Cuadra
