Enginursday: Introduction to MQTT

Check out our newest tutorial!

Favorited Favorite 4

The Messaging Queuing Telemetry Transport (MQTT) protocol is a publish/subscribe messaging protocol that works on top of your home TCP/IP network. It provides a fast and reliable way to connect your IoT devices together and create responses to messages.

MQTT Nodes

Every MQTT network needs a broker. The broker is the heart of the MQTT network and is just a server that receives information from devices, also known as clients, and distributes that information to other clients based on the topic.

Topics are arranged in a directory-like structure. A topic might be “LivingRoom,” or “LivingRoom/Light” if you have multiple clients within that parent topic. The subscriber client will listen for incoming messages from the subscribed topic and react to what was published, such as “on” or “off.” Clients can subscribe to one topic and publish to another as well. If the client subscribes to “LivingRoom/Light,” it might also want to publish to another topic like “LivingRoom/Light/State,” so that other clients can monitor the state of that light.

With home automation services like Home Assistant that can run on a Raspberry Pi, you can easily integrate your own MQTT clients with your commercial IoT devices to create additional temperature nodes for your smart thermostat, or maybe just a basic remote switch to control the lights in your house without having to get up, for maximum laziness.

To see how to do that, stay tuned for a new tutorial dedicated to Home Assistant. In the meantime however, if you'd like to learn more about MQTT and how to get started using just a Raspberry Pi and ESP32 Thing, check out the new tutorial below.

Introduction to MQTT

November 7, 2018

An introduction to MQTT, one of the main communication protocols used with the Internet of Things (IoT).

Comments 3 comments

  • Member #1470573 / about 5 years ago / 1


  • Member #1467856 / about 5 years ago / 1

    Hi Thanks for your simple tutorial and descriptions. Can we use an MQTT server, for different projects? for example i have 4 different buildings and each one has 20 nodes

    • Alex the Giant / about 5 years ago / 1

      You can. In the tutorial I use a Pi as the broker, but there are cloud based brokers as well that you can use.

Related Posts

MicroMod Calendar

Recent Posts

Pete's Super Headphones

The Tech That Made Us



All Tags