Using MQTT-Lens- Beginners Guide

mqtt-lensMQTT Lens is an add-on for the chrome browser that lets you publish messages to an MQTT broker and subscribe to MQTT topics and receive messages using the chrome web browser.

Once installed you access it via the url chrome://apps as shown below:



mqtt-lens-1
When MQTT-Lens first opens you should see a blank screen. Click on add connection to create new connection to a broker

mqtt-lens-2
The only item you normally need to add is the broker name or IP address. If you are also monitoring traffic on the broke console then you might want to change the client ID to something easier to spot.

Important -You should remember that the client ID must be unique.

By default clean sessions are enabled.

mqtt-lens-3

By default it uses standard MQTT over TCP but you can also use MQTT over Websockets by selecting the protocol as shown below:

mqtt-lens-connection-settings

Click the create connection button on the button to complete the creation.

mqtt-lens-4

The screen should now display the publish and subscribe screen. On the left the icon should be green if the connection was established OK.

mqtt-lens-5

Now enter a topic (any name will do) and a test message, and then click publish to publish the message.

When publishing you can also set the retain flag using the checkbox.

You can set the QOS on subscribe and publish using the drop down box next to the topic.

It is possible to subscribe to multiple topics.

Received messages are displayed in the window below. Each topic has its own display box.

mqttlens-messages-received

There is also an info icon next toe the received message. If you click it it shows more information about the received message.

mqtt-lens-message-details

Related tutorials and resources:

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