------- OmnIoT SoftHub to Thingsboard Dashboard Series (Part 1) -------

   This is the Thingsboard specific guide that builds on the base example found HERE. As mentioned in the base example, we assume you are familiar with the OmnIoT SoftHub and Thingsboard platforms, and have an understanding of MQTT in general. In this guide we'll modify the base example to publish our packet data to a cloud based Thingsboard dashboard. We'll also illustrate how to "on the fly" reformat the default JSON packets output by the SoftHub to meet the Thingsboard input requirements. Like the base example, the video below is done in "real time". As you will see, to modify our base example to graphically display our sensor data on a Thingsboard dashboard takes only a few minutes from start to finish. 

------- EXAMPLE VIDEO -------



------- VIDEO RECAP -------


   To visualize our sensor data on our Thingsboard dashboard, there were three sets of changes we needed to make on the SoftHub. The first was to modify the "Publish Data" action object to connect to the Thingsboard broker (instead of the eclipse broker) and to associate the connection with a .mcfg (MQTT extended options) file. Next we created the .mcfg file which is needed to specify any .jff (JSON filter/format) files we require to transform our outgoing packets. And lastly we created a single .jff file, in which we specified the transformation to be made on our outgoing packet in order to be compatible with the Thingsboard broker's requirements. Specifically, we made the following changes - 

Changed the RuleEngine.xml file (all updates to the Publish Data action object only) -

  1. Message Topic: changed to message topic per the Thingsboard documentation

  2. Server User Name: changed the server user name per the Thingsboard documentation

  3. Server Password: changed to pass a null string value per the Thingsboard documentation

  4. Server Client ID: changed to pass a null string value per the Thingsboard documentation

  5. Server Address: changed the server address to point to the Thingsboard MQTT broker

  6. Extended Options File: add a reference to thingsboardDemo.mcfg

Created thingsboardDemo.mcfg from template.mcfg, enabled/changed the following options -

  1. FlattenJson: enabled the flattening of all outgoing JSON packets

  2. PublishUnformatted : disabled publishing of any packet not transformed

  3. JffFile01: added a reference to thingsboardDemo01.jff

Created thingsboardDemo01.jff from template.jff, enabled/changed the following options -

  1. FormatDataLabel01: specified the label associated with the packet timestamp

  2. FormatDataLabel02: specified the label associated with the temperature value variable

  3. FormatDataLabel03: specified the label associated with the humidity value variable

  4. OutputFormatStr:   specified the packet template to be used to generate outgoing packets


You can download the files used in the example video HERE.

------- SUMMARY -------

   In this video we made all the required changes to get our data displaying on a Thingsboard dashboard in just a couple of minutes. Check out our part two video HERE where we take this example and extend it further by adding a control widget to our dashboard allowing us to remotely control our SoftHub device directly from our Thingsboard dashboard.