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

  1. Plan the safety

    Mains wiring is dangerous. Test with low-voltage lamps first and have any mains work done by a qualified electrician.

  2. Wire the relay board

    Relay IN1-IN4 to ESP32 GPIO 16, 17, 18, 19; VCC to 5V (VIN) and GND to GND.

  3. Create the web server

    Use the ESP32 WebServer or an MQTT broker to toggle each GPIO from a web page or app.

  4. 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.