Easily Visualize LoRaWAN® Sensor Data On Your Mobile Phone

Overview of this Activity

One of the basic needs in any sensor project is to be able to visualize the collected sensor data. In this activity we will display the data collected in the Hello LoRaWAN® and ThingPark cookbook on an Android phone, using only free tools. We will follow simple steps to visualize the collected data. The main differences from the previous cookbook are:

– The use of MQTT protocol instead of HTTP as communication protocol to the backend service.
– The use of mosquitto.org instead of webhook.site as backend service.

We will also discover new features:
– ThingParkX to easily convert binary sensor payload to JSON-formatted information.
– Display the collected data on Android devices using the MQTT Dashboard –IoT and Node-app.

There is no need for new equipment in this activity. Only configuration changes and customization of a mobile phone app will be performed. Finally, although the steps described here are based on the previous cookbooks, they can easily be adapted to any other sensor for visualization: ThingPark X supports CoDecs for most sensors out-of-the-box.

Solution Overview

You will prepare a simple solution to visualize the collected sensor data explained in Hello LoRaWAN® and ThingPark cookbook. For this solution, no technical or programming skills are needed. A general outline of the solution is shown below.

Previously…

The environment shown below was prepared in the Hello LoRaWAN® and ThingPark cookbook, and the collected data was displayed in its native binary form on the webhook website. However, this environment cannot be used for the end user to actually view the collected measurements, which need to be decoded and graphed.

Now…

In this activity, you will extend this solution, as shown in the figure below. So that collected data can be displayed on a mobile phone without any programming needed.

Solution Flow…

The flow of the collected sensor data is shown in the figure. Flow steps 1~3 are described at Hello LoRaWAN® and ThingPark. In this activity flow steps (4 ~7) are added.

Requirements

ThingPark X IoTFlow (TPX) Service

Actility believes in a radically more efficient and sustainable world through ubiquitous digital-twin technology. Digital twins are software representation of physical devices. ThingPark X is the cornerstone of Actility’s vision to make digital twins common place. Positioned at the edge of the LoRaWAN® network, ThingPark X simplifies the interface between LPWAN-connected sensors and IoT application, transforming sensors raw data into application-friendly actionable information, that can be fed into digital twins object of various IoT Platforms.

Actility ThingPark X IoTFlow -in short TPX- is the dataflow module of the ThingPark platform. It processes both uplinks (sensor to network) and downlink (commands to sensors and actuators).

  • In the uplink direction TPX decodes the binary payload to JSON format (using a standard library of CoDecs or custom ones), it optionally reformats or normalizes the data to a uniform ontlogy, and finally can feed the uplink data to 3rd party services (e.g. a MQTT broker) or platforms (e.g. Azure IoThub).
  • In the downlink direction it can encore REST commands to the proper binary payload format, and manage the secure connection with the Network Server for transmission.
    TPX is continuously expanding and provides many other services, for more informatin refer to TPX documentation portal.
 

MQTT Broker Service Provider

We will use Eclipse Mosquitto as our MQTT Broker service provider. Mosquitto is an open source (EPL/EDL licensed) message broker . The mosquitto website provides both MQTT Broker Server and MQTT Broker Client software for download. This site also hosts an MQTT Broker Service that helps you test your client application.

We will use the free MQTT Broker Service provided at test.mosquitto.org within the scope of this activity. To use that service, you do not need to make a registration or any definitions to use this service. Alternatively, you can download the MQTT server software and install it on your machine.

IoT MQTT Panel Mobile Phone Application

 

To visualize the collected data without any programming, you will utilize an Android application called IoT MQTT Panel.

The IoT MQTT Panel application is free to install and use. Alternatively, you can use other application platforms, like Node-RED, for this purpose.

Activity Steps

In this activity, we are going to implement the dataflow by configuring a TPX Connection and then updating the configuration of the device to porperly use the TPX dadaflow and select the appropriate payload decoder (steps 1-5). We will then learn how to monitor the flow of data and the status of the connection to the MQTT broker (steps 6-8). Even though monitoring looks trivial, it is essential to know how to “follow the footsteps of the data” in case of any issue.

Please notice that no activity is required to set up the MQTT Backend service since wenwill use a test MQTT Broker.