AdvancedSmart Home about 150 min
Smart Home Relay Controller
Control four appliances from your phone with an ESP32 and a 4-channel relay board.
Steps
Plan the safety
Mains wiring is dangerous. Test with low-voltage lamps first and have any mains work done by a qualified electrician.
Wire the relay board
Relay IN1-IN4 to ESP32 GPIO 16, 17, 18, 19; VCC to 5V (VIN) and GND to GND.
Create the web server
Use the ESP32 WebServer or an MQTT broker to toggle each GPIO from a web page or app.
Enclose it
Mount everything in an insulated enclosure with strain relief on all cables.
Notes. Relay boards are usually active-LOW: writing LOW switches the relay ON.