MQTT Toolbox – MQTTLens

Guest blog post by: Sandro Kock

Short Profile

TypeChrome App
LicenseMIT
Operating SystemsWindows, Linux & MacOSX
Websitehttps://chrome.google.com/webstore/detail/mqttlens/

Description

During the Google Summer of Code 2014 I had the opportunity to work for the Eclipse Paho project, the result is MQTTLens. At the beginning I had a lot of very good ideas on how the ultimate MQTT utility should look like – with an integrated MQTT broker to script and emulate different IoT application scenarios. At the end the focus was put on simplicity. With one click – MQTTLens can be installed via the Google Chrome Web Store. Making it easy and convenient to get started.

MQTTLens is build on top of MQTT.js. All UI components are created with HTML and JavaScript, based on Polymer and Web Components. All parts are open source; contributions and suggestions are always welcome. Currently the plan is to upgrade MQTTLens to Polymer 1.X and make use of mqtt-elements, anyone who like to help is welcome.

Feature Overview

MQTT 3.1ok
MQTT 3.1.1nok
LWTok
SSL/TLSnok
Automatic Reconnectok
MQTT over TCPok
QoS 0ok
QoS 1ok
QoS 2ok
Authenticationok
Scriptingnok
MQTT over Websocketsok

Connect

MQTTLens is started via the Chrome App Launcher

MQTTLensConnect1MQTTLensConnect2
A new connection can be added via the symbol in the top left corner.MQTTLensConnext3

The screenshots below show the necessary steps to connect to the iot.eclipse.org MQTT-broker, with the following credentials:

1. Connection name: e.g. MQTT Dashboard or iot.eclipse.org
2. Protocol: tcp:// (default)
3. Hostname: iot.eclipse.org
4. Port: 1883 (default)

MQTTLensConnection4

Optionally a color scheme can be assigned to every connection.

With a click on CREATE CONNECTION [5] the connection is saved and automatically established.

MQTTLensConnect5

After a new connection is added to MQTTLens the connection and its status is displayed on the left. On the right subscriptions to topics can be added and messages can be send via the connection.

Subscribe

Subscriptions can be established to any topic [1], wildcards like + and # are supported. Depending on the support by the MQTT-broker, the QoS [2] can be set to 0, 1 or 2. With a click on the »Subscribe« button, the subscription is made at the MQTT-broker. Messages to subscribed topics are displayed below the »Subscriptions« heading. Each message that was received and matched to a subscription is displayed below the topic. By default MQTTLens displays the last five messages received to a subscription, to show more ore less messages the – or + icon can be clicked. When MQTTLens receives a message a timestamp of the local machine is saved with the message and displayed in addition to the topic, QoS and message payload.

MQTTLensSubscribe1

Currently the payload of a message is parsed to a UTF-8 String by default. If the message is a JSON-Object, the output is formatted, to make is easy to read the message.

MQTTLensSubscribe2

Publish

To publish a message to a topic – the topic [1], QoS [1] and the message [3] can be set. With the current MQTTLens version that is available via the Chrome Store it is not supported to retain a message at the MQTT-broker. A beta version of MQTTLens is available at Github that can be installed manually in Chrome, that supports retained messages. But it is planed to publish that version soon!

MQTTLensPublish

For every click on Publish [4] a MQTT-message is send to the MQTT-broker.

Advanced Options

MQTTLens supports to connect with the Last-Will-and-Testimony (LWT) set in the MQTT-connect packet. When creating a new connection, the LWT can be set in the »Last-Will« section, by expanding the view with a click on the (v) icon in the connection wizard. The LWT topic [1], message payload [2], QoS [3] and retain flag [4] can then be set before creating the connection.

MQTTLensAdvanced

Author Information

sandro_kock
Sandro Kock
Since 2014 Sandro Kock is a mobile developer at SSV Software Systems, responsible for developing mobile solutions, with a focus on IoT/M2M. The maintainer of mqtt-elements, a set of MQTT WebComponents, created with Polymer.
  Website

Leave a Reply

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