MQTT Tools and Resources

Suitable tools are an important part of setting up and testing an MQTT installation.

Tools are available for Windows,Linux,Android and IPhone

In this tutorial I will give you an overview of popular tools that are available for download on the Internet, and also some of my own tools that I have created that may also be of use

Client Simulation Tools

There are a variety of tools available for use on a PC and also smart phone/tablet.

  • Command Line tools
  • Browser Tools
  • Smart Phone and Tablet Tools

Command Line Tools

These tools are part of the mosquitto broker install on Windows but are a separate install on Linux (Raspberry Pi).

Mosquitto_sub – Simple subscribe utility for testing. This comes with the Mosquitto broker.

Mosquitto_pub – Simple publish utility for testing. This comes with the Mosquitto broker.

See Using Mosquitto_pub and Mosquitto_sub tutorial

Browser Tools – Chrome

MQTT-LensChrome add-on for publishing and subscribing to an MQTT broker. –Using MQTT-Lens- Beginners Guide

MQTT-BoxChrome add-on for publishing and subscribing. More feature rich than MQTT-Lens. Supports Websockets.

Android Tools-Smart Phone and Tablet

MQTT Dashboard – Simple tool to publishing and subscribing.

MQTT Dash- Create MQTT dashboards for the smart home

Broker Testing Tools

$SYS Topic Monitor

This node red flow will monitor the $SYS topic of the selected broker and produce a display as shown below:

mosquitto-broker-topic-monitor

Benchmark Testing

Node.js tools

Broker Configuration File Viewing

If you have edited the default mosquitto.conf file and have difficulty finding your edits then this script will be of use.

It scans the file and prints the line number and contents of any uncommented line.

It only takes one argument -f filename if this is omitted it will check the mosquitto.conf file if available.

using-check-config-mosquitto

My Python Script Test Tools

These scripts are scripts that I’ve written while experimenting with MQTT.

MQTT Ping

mqtt-ping-iconThis test tool is a simple python script that tests if a broker is up and how long messages take, just like the traditional IP ping utility.

MQTT Ping Usage

The utility is designed to be run from the command line.

The script requires only a single parameter which is the broker IP or domain name.Type python mqtt-ping.py -h

mqtt-ping-usage

Examples

  • 1.use -c 10 for 10 pings
  • 2. Use -d 5 for 5 second delay between pings
  • use -s to only print end result

Example Run:

MQTT-Ping-Example

Retained Messages Utility

Two scripts one for displaying and optionally deleting retained messages on a topic tree. The other is used for creating topics with retained messages for testing purposes.

Tutorial here. includes link to download the scripts

MQTT- Monitor -Monitors Selected topics

This is very useful tool for monitoring topics on a broker. I use it frequently when testing.

By default it only display changed messages.

Usage:

Type python mqtt-monitor.py -h

mqtt-monitor-usage mqtt-monitor-usage

Examples

    • Can add multiple topics by repeated use of -t option
    • Use -v no to display only changed messages
    • Use -c 100 to stop after 100 seconds
    • Use -q value (0 or 1 or 2) to set the QOS of all topics
    • Use -d yes to turn on debugging mode

mqtt-monitor-example-use

The script is designed to be run from the command line.

Links to External Tools

Hive have a list of useful tools here and here

Related Tutorials and resources:

 

Save

Save

Save

Save

Save

Save

Please rate? And use Comments to let me know more
[Total: 0   Average: 0/5]

7 comments

  1. Hi Steve,
    I try to use the $SYS Topic Monitor, but when i import the txt file in node-red, the dashboard give for result:

    Imported unrecognised types:
    ui_template
    ui_group
    ui_tab

    And the deploy isn’t ready, do you know what is the problem?
    Thanks for all

    1. Amazing tool, nice job and thank you for sharing. I do recommend this tool to anyone doing a deployment and need to keep an eye on the broker.

  2. Hi Steve, here is Wim speaking.

    Question:
    Did you ever publish something about mosquitto_sub running onder PHP?
    I got mosquitto_pub working under PHP but I can’t get a working subscribe.
    I have seen a lot of examples but non of them work for me…
    My broker and Apache2 webserver run on a Raspberry PI zero.
    Thanks for reading this.
    Wim.

    1. No never tried it but if you send me the code for both subscribe and publish using the ask steve page I’ll take a look
      rgds
      steve

Leave a Reply to steve Cancel reply

Your email address will not be published. Required fields are marked *