Idea
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.
Parts list
- Development Boards
- Interfaces
- Switches
- Passives
- Prototyping
- Prototyping
How to build it
- Run a local Mosquitto broker
- Connect and subscribe
- Switch the relay on messages
- Publish the state back
- Use a low-voltage lamp only, mains wiring is for a qualified electrician
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.
