Ever wondered how you can create MQTT data easily, without using your real "thing" or remote device?

Assuming your device is already registered on AirVantage and Assetwolf there are a couple of ways to do this:

  • using MQTTLens, a free extension for Chrome
  • using a manual data upload from Excel

Why would you want to do this? As developers, we often need to create data that looks like it comes from a real device. There can also be a real-world need to, in that an unconnected machine may be recording data offline, rather than M2M, but we want to push that recorded data onto the cloud for analysis and presentation.

Here's how to create your data, and see it immediately on your Assetwolf IoT portal

MQTTLens

Go to your Chrome options tab, and find Extensions. Search for "MQTTLens" and it should appear. Click to install it.

You can launch MQTTLens from the Chrome App Launcher:

Google ChromeScreenSnapz191.png

In MQTTLens, enter connection data like this:

Google ChromeScreenSnapz182.png

The things you need to enter are:

  • Hostname: tcp:// eu.airvantage.net
  • Port: 1883
  • Username: this is the serial number of your system on AirVantage
  • Password: your MQTT password for this system on AirVantage

 

Then create some data like this:

Google ChromeScreenSnapz184.png

 You will need to publish your to the topic [SYSTEM SERIAL NUMBER]/messages/json

Where "[SYSTEM SERIAL NUMBER]" is the serial number of your system on AirVantage.

You will need to put data in the Message field as a JSON string, for example:

{"truck.fuel.level": 16}

Make sure not to have any leading or trailing spaces.

Then press Publish to send the data to the cloud. Note that MQTTLens will not give you any feedback that it has done this, or that the message was successful; I find that a little annoying. 

You should immediately see your data on the portal:

 Google ChromeS Snapz298

 Google ChromeS Snapz299

 

 

Manual data upload from Excel

Assetwolf allows you to manually upload data as well, using XLS and XLSX formats.

In Organizer, just look for the "Upload manual data" button:

Manual data upload.png

You can download an Excel file to use as a template - it has the right columns and column headers. Then, once populated, simply upload your file of data.

The usual database of device data is populated, and the data will be available in maps and graphs in the usual way.

Why would you want to do this?

It's a handy tool when doing IoT development, when it's not always convenient or even possible to create the kind of data you need. Even in a production scenario, there are times when the security arrangements of a site are such that connection to the internet is not possible, or even that there is legacy equipment whose data needs to be evaluated alongside M2M-connected equipment. (Readings may be recorded manually by a machine operator, in a spreadsheet or even on paper!)

 

 

Send us a message

Content

Leave your message in the form below.

Message
Name
Phone
Email
Full details can be found in our privacy policy.
Close