If you’ve spent any time poking at a smart home, you’ve bumped into MQTT whether you meant to or not. Zigbee2MQTT, ESPHome, Tasmota, Home Assistant’s own internal bus — they all lean on it. It’s worth understanding properly, because once you do, an awful lot of “magic” stops being magic and starts being a handful of topics and a tiny broker process.
MQTT is a publish/subscribe messaging protocol. It was designed in 1999 by Andy Stanford-Clark of IBM and Arlen Nipper for monitoring oil pipeline telemetry over expensive, unreliable satellite links, which tells you everything about its priorities: tiny payloads, low overhead, and tolerance for flaky connections. When every byte over the satellite costs money and the connection might drop mid-sentence, you design a protocol that says as little as possible and copes gracefully when it’s cut off. Those constraints turned out to describe a battery-powered wireless sensor in a spare bedroom almost perfectly, which is why a two-decade-old industrial protocol quietly became the backbone of the consumer smart home. Devices don’t talk to each other directly. They talk to a broker — a small server that receives messages and fans them out to whoever has subscribed.