What is MQTT?
MQTT (Message Queuing Telemetry Transport) is a lightweight publish/subscribe messaging protocol designed for constrained devices and low-bandwidth networks. It is widely used in smart home and IoT applications.
How It Works
- A broker (server) sits at the center — e.g., Mosquitto
- Devices publish messages to topics (e.g.,
home/living-room/temperature) - Other devices subscribe to topics to receive updates
- The broker routes messages from publishers to subscribers
Why Use MQTT?
- Lightweight: Minimal overhead, suitable for microcontrollers
- Reliable: Supports QoS (Quality of Service) levels 0, 1, and 2
- Real-time: Near-instant message delivery
- Decoupled: Publishers and subscribers don’t need to know about each other
Common Smart Home Uses
- Zigbee2MQTT: Bridges Zigbee devices to MQTT
- Tasmota: ESP-based firmware that speaks MQTT natively
- Home Assistant: Full MQTT integration for device control
- ESPHome: Generates firmware with MQTT support for ESP devices
Related Guides
What is Home Automation?
A complete beginner's guide to understanding home automation, smart devices, and how to get started with your connected home.
Beginner
Introduction to Home Automation
Everything you need to know before starting your smart home journey. From core concepts to planning your first setup.
Beginner