Projects / Ideas / MQTT light switch controller

MQTT light switch controller

IntermediateIoTIdeaReviewed
In short

How do you build an MQTT light switch controller?

An ESP32 listens for MQTT messages from a local broker and switches a relay for a low-voltage lamp. You need ESP32 DevKit V1, Relay Module 5V, Tactile push button 6 mm, Resistor 10 kΩ, Breadboard 830 Tie Points and Jumper wires male to male (40 pcs, 20 cm).

Level
Intermediate
Time
About 210 min
Parts
6
An idea, not a guided build yet. Goal, parts and steps; no wiring, code or tests. Copy it to My Garage to plan it.
Goal

Subscribe to MQTT and switch an output.

How to build it

  1. Run a local Mosquitto broker
  2. Connect and subscribe
  3. Switch the relay on messages
  4. Publish the state back
  5. Use a low-voltage lamp only, mains wiring is for a qualified electrician

Related projects

Common questions

What parts do I need for the MQTT light switch controller?

ESP32 DevKit V1, Relay Module 5V, Tactile push button 6 mm, Resistor 10 kΩ, Breadboard 830 Tie Points and Jumper wires male to male (40 pcs, 20 cm).

How long does the MQTT light switch controller take to build?

About 210 minutes for a intermediate maker.