MQTT Viewer is a simple, configurable & ready to use internet of things (IoT) client. This app has been designed to help you get started with your IoT journey. Simply configure your MQTT server details, and start receiving events in the app immediately. Great for prototyping!

Adeel Javed - IoT Prototyping Mobile App - MQTT Viewer

Learning Objectives

At the end of this post you will be able to:

DIoTY Setup

Step 1: Register with DIoTY and login (they offer a Free plan as well).

Step 2: Click on Get Started, this will take you to the dashboard with connection details.

Note: When you register, an email will be sent to you containing the password.

Adeel Javed - IoT Prototyping Mobile App - MQTT Viewer

App Configurations

Step 1: Download MQTT Viewer from Play Store.

Step 2: Open MQTT Viewer and select Settings from toolbar.

Step 3: In order to configure a new MQTT server, click on Server.

Step 4: Tap on the Host setting to edit. Enter mqtt.dioty.co and click Ok (make sure to copy this information from your DIoTY dashboard).

Step 5: Tap on the Port setting to edit. Enter 1883 and click Ok (make sure to copy this information from your DIoTY dashboard).

Step 6: Tap on the Topic setting to edit. Enter your topic name here, for this post we are using /codifythings@gmail.com/mqtt and click Ok.

Note: DIoTY requires that all your topic names start with /you-username/, for us it was /codifythings@gmail.com/. This information is provided as part of connection details.

Step 7: Tap on the Device setting to edit. Enter your device name, for this post we are using androidClient and click Ok.

Step 8: DIoTY requires clients to authenticate. So tap on Enable Authentication.

Step 9: Tap on the Username setting to edit. Enter the username for the user that your created in the previous step and click Ok.

Step 10: Tap on the Password setting to edit. Enter the password for the user that you received in the email and click Ok.

Leave QoS fields as-is. Your Server settings should look similar to the screenshot below.

Adeel Javed - IoT Prototyping Mobile App - MQTT Viewer

Step 11: Click on the back button, and go to Message setting.

Step 12: If you are sending plain data, then leave the setting as-is i.e. do not enable JSON format and skip step 10. If you are publishing data to MQTT server in JSON format, then enable this setting and follow step 13.

Step 13: Tap on the Data Key setting to edit. You need to specify which field in the JSON message contains your data. For this tutorial we are using temperature and click Ok. For example, if the message being published to MQTT server was {temperature: 45, moisture: 35}, then by specifying temperature in Data Key we are asking the app to use it’s value which in this case will be 45.

Your Message settings should look similar to the screenshot below.

Adeel Javed - IoT Prototyping Mobile App - MQTT Viewer

Step 13: (Optional) Click on the back button, and go to Notifications setting.

Step 14: (Optional) If you want the app to create a notification, then enable this setting.

As soon as you go back to main screen, app will connect to the new MQTT server settings (in case of an error, a snackbar will be displayed with the error message). For this tutorial we also configured the title, color theme, icon and data visualization, screenshot below shows the final product. If you want to change the color theme, icon or data visualization take a look at rest of the settings here.

Adeel Javed - IoT Prototyping Mobile App - MQTT Viewer

Download

Adeel Javed - IoT Prototyping Mobile App - MQTT Viewer

Disclaimer: This mobile app has only been designed for prototyping purposes, and is not production ready.