Get Smarter With Thingsboard Dashboard

Homepage Get Smarter With Thingsboard Dashboard

Thingsboard is an open-source IoT solutions platform for data collection, processing, visualization and management. It allows to create advanced dashboards. This tool offers device connectivity through industry-standard IoT protocols—MQTT, CoAP and HTTP—and supports cloud and on-premises deployment. Thingsboard combines scalability, fault tolerance and performance to ensure that you never lose your data.

There are many different services on offer:

  • Provision and management of devices and assets
  • Data collection and visualization
  • Processes and reactions
  • Micro-services

There is also a free community version, which allows you to test these different features.

Thingsboard is the ideal solution for setting up complex dashboards in a short space of time.

Thingsboard is reliable and easy to deploy.

To illustrate the service, the Thingsboard website demonstrates the management of a fleet of buses, showing their routes, fuel levels and the number of miles traveled. This detailed system could be implemented in any city around the world.

Thingsboard dashboard fleet management 1

After several trials and a production launch as part of a PoC for a major manufacturer, I was able to form my own opinion of this tool:

Turnkey: no development

Customizable: you can add many widgets and even design your own

Large community

Clear and easy-to-use interface

Choice of database (SQL/NoSQL)

Stores its own data: could lead to duplication if it is already stored in another database/service

Cumbersome installation

As you can see, the pros outweigh the cons!

Get smart with Thingsboard dashboard

Logging information is good, but alerts are better!

As we have seen, Thingsboard offers a variety of services:

  • Management of incoming data via HTTP, MQTT and CoAP
  • Data backups in your own database
  • Dashboard design

And that’s not all! Each of Thingsboard’s basic features is also backed by smart capabilities.

Knowing that the water temperature is rising is all well and good, but being warned when it hits a critical threshold could be a real lifesaver!

On a graph like this, it can be hard to tell if the temperature has exceeded 42.4°C:

Thingsboard dashboard temperature rising 2

With one of the alarms or indicators shown below, the situation is as clear as day:

Thingsboard dashboard temperature alarm 3

Thingsboard dashboard temperature alarm with LED 4

In the next section, we will explore how you can use Thingsboard’s smart features to build dashboards warning you about potentially worrying data.

Alarms and LEDs: a practical Thingsboard dashboard setup guide

Before you get your Thingsboard dashboard started, you will need to install Thingsboard as stand-alone software or via Docker if you are a fan of containers.

>Create a new device in the Thingsboard interface

First things first, create a new device in the Thingsboard interface. This device, named « WRpi », is the one that will send the data. You must retrieve this device’s unique token in order to communicate on its behalf with the Thingsboard API:

Thingsboard dashboard token 5

Example token: « cpgBS96SheX1M2mHYZxn »

 From now on, you will be using Postman to send data to Thingsboard, which will store it in its database. Use the « http://{{url}}:{{port}}/api/v1/{{accessToken}}/telemetry  » endpoint to send new data (replacing the sections in red with real values).

Create a dedicated Thingsboard dashboard for the device

Now you need to create a dedicated dashboard for the device. This will display all the data received, namely the temperature of the device in question. Thingsboard is extremely comprehensive, so it’s a fairly straightforward process.

 >Move to setting up the alarms

Then you can move on to setting up the alarms! Go to the « Rule Chain » section and open the « Root Rule Chain ». You should be presented with the following:

Thingsboard dashboard root rule chain 6

If you are familiar with Node-RED, the interface is very similar. Start by adding a script to carry out a simple test: Is the temperature too high?

Thingsboard dashboard script 7

Insert the following test within the script of your Thingsboard dashboard:

Thingsboard dashboard test 8

42 is a completely arbitrary value; you can choose an appropriate value for your situation. This test will return « True » or « False ». You need to create a new alarm for « True » and clear the alarm for « False ».

You will therefore obtain the following diagram:

Thingsboard dashboard rule chain diagram 9

The « create alarm » node allows you to define the type of alarm. In this case, it will be « Temperature High ». You will then be able to sort and delete the different alarms by type.

Thingsboard dashboard create alarm node 10

You also need to specify the alarm type for the « clear alarm » node.

Simply send a value greater than 42 (or whichever value you selected) via Postman… and voila! Your alarm will appear!

Thingsboard dashboard set up alarm 11

>Move on to the LED

Now you can move on to the LED!

For the LED, place the widget with the same name on your Thingsboard dashboard, then select the « Advanced » tab for this widget. You will be presented with a variety of different settings.

In this example, the LED should turn red when the temperature exceeds 42.4°C.

Start by changing the color and unchecking « Perform RPC device status check » to control the color yourself:

Thingsboard dashboard set up LED 12

Then you have to explain to the widget how to choose whether it is on or not:

Thingsboard dashboard true false set up 13

You therefore need to choose the telemetry on which the test will be carried out, in this case « temperature ». Then change the test for the function « f », which is called when the value changes. That’s all there is to it!

Thingsboard dashboard telemetry 14

Thingsboard dashboard telemetry 15

Of course, you can always improve on the basic concept by sending an email or SMS directly to the concerned party/parties. It’s up to you 😉

For smart dashboard Thingsboard is a very flexible and high-quality tool that deserves recognition!

The possibilities seem endless, and that’s what really draws me to this kind of technology. I can imagine a variety of use cases in the world of industry. For example, a fully-connected factory using MQTT could provide real-time tracking of tank levels and furnace temperatures, with alerts when they go out or are consuming too much energy. Not to mention the potential domestic applications! If you like to tinker, you could connect your home to this tool to make graphs of the temperature, humidity and sunlight in each of your rooms. You could even automate certain actions! Too hot in one of the rooms? Automatically close the blinds and notify the users.

With Thingsboard for your dashboards, the world is at your fingertips!


  • To get your hands on Thingsboard :

  • To read some other articles about Thingsboard dashboards

Kevin Sibué - Software Engineer
11 juin 2019