MQTT is an open, simple and low overhead communication protocol for sending messages between many clients which are connected to the central MQTT broker.
Every message consists of two parts - topic and payload
The Topic describes the content of the message and identifies it
The Topic name has a directory structure - each level is divided with a symbol
- Topic can be
- Topic can be
MQTT server is called the broker and clients can publish messages and subscribe to topics
The task of the MQTT broker is to deliver messages from publishers to subscribers
You can use two so-called wildcards while subscribing to the MQTT topic
+wildcard will subscribe to all topics in the specified topic
+/light/setwill subscribe to
#wildcard will subscribe to all sub-topics of a specified topic
kitchen/#will subscribe to
The wildcard # can be used only at the end of the topic name
You can read more about the MQTT topics and how to use them.
Mosquitto MQTT broker
IoT Kit uses the open-source Mosquitto MQTT broker. All messages are routed through the MQTT broker. This allows further expansion of the IoT Kit system.
When you connect the Radio Dongle with the connected remote node, you can display all incoming messages using mosquitto-cli package by typing:
You can read how to install Mosquitto MQTT broker on the link above or you can start your server on Raspberry Pi.
mosquitto_sub -t "#" -v
pi@hub:~ $ mosquitto_sub -t "#" -v