MQTTLens - HiveMQ MQTT Toolbox
Short Profile
Type | Chrome App |
---|---|
License | MIT |
Operating Systems | Windows, Linux & MacOSX |
Website | Chrome Webstore: MQTT Lens |
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
Feature | Available |
---|---|
MQTT 3.1 | Yes |
MQTT 3.1.1 | No |
LWT | Yes |
SSL/TLS | No |
Automatic Reconnect | Yes |
MQTT over TCP | Yes |
Feature | Available |
---|---|
QoS 0 | Yes |
QoS 1 | Yes |
QoS 2 | Yes |
Authentication | Yes |
Scripting | No |
MQTT over Websockets | Yes |
Connect
MQTTLens is started via the Chrome App LauncherA new connection can be added via the ➕ symbol in the top left corner.
The screenshots below show the necessary steps to connect to the iot.eclipse.org MQTT-broker, with the following credentials:
Connection name: e.g. MQTT Dashboard or iot.eclipse.org
Protocol: tcp:// (default)
Hostname: iot.eclipse.org
Port: 1883 (default)Optionally a color scheme can be assigned to every connection.
With a click on CREATE CONNECTION [5] the connection is saved and automatically established.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.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.
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!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.
Sandro Kock
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.