ThingsBoard is an open-source IoT platform designed for device management, data collection, processing, and visualization. It supports a variety of communication protocols, including MQTT, CoAP, and HTTP, allowing seamless integration with diverse devices and sensors. The platform offers powerful tools for monitoring and controlling devices, as well as visualizing sensor data through customizable dashboards.
ThingsBoard provides essential features such as device provisioning, real-time data processing, and rule engine capabilities for automated actions based on data inputs. It also supports user role management, enabling secure access control. With its scalable architecture, ThingsBoard can be deployed on-premises or in the cloud, making it suitable for a wide range of IoT applications, from smart cities to industrial IoT use cases. The platform is highly extensible, supporting integration with third-party systems and services, ensuring flexibility for developers and businesses alike.
What is an IoT Platform ?
Many people confuse LNS and IoT platforms. An LNS (LoRaWAN Network Server), or more generally NS (Network Server), is a software component that manages the connection of devices to the network. The NS handles the transition from a device-friendly network protocol like LoRaWAN to the IP and Cloud world, which allows for data processing. Its functional scope is to manage the routing of devices to the appropriate recipients and services, handle subscriptions, enrich data with technical parameters from the network, and visualize communications at the lowest level.
An IoT platform, downstream from the NS, processes the data. The IoT platform is a business component that provides functional meaning to the data received from devices. A good IoT platform also supports lifecycle management processes for devices (association, monitoring, alarming, support…) and, as a result, will be interfaced with the NS for control.
An end user of an IoT solution, regardless of who they are, should not have to connect directly to an IoT platform. I have many slides detailing the features an IoT platform should provide, and you can review them.
ThingsBoard is an IoT platform, so it is focused on data processing and display.
Docker quick installation
For individual use or testing purposes, it is not necessary to set up too much infrastructure, as Docker versions are available. In my opinion, they are a bit too integrated, including the database and the MQTT server, but the advantage is that they are simple to deploy.
Firstly let’s create a directory structure for storing the data out of the container
mkdir -p /www/thingsboard/mytb-data && chown 799:799 /www/thingsboard/mytb-data mkdir -p /www/thingsboard/mytb-logs && chown 799:799 /www/thingsboard/mytb-logs mkdir -p /www/thingsboard/htdocs mkdir -p /www/thingsboard/logs |
Now we can have a a docker-compose file to configure the container
version: '3.0' services: mytb: restart: always image: "thingsboard/tb-postgres" ports: - "127.0.0.1:11000:9090" - "127.0.0.1:1883:1883" volumes: - /www/thingsboard/mytb-data : /data - /www/thingsboard/mytb-logs : /var/log/thingsboard |
From this point we can run the solftware and it will be accessible locally in http mode. so the next step will be to expose it with a nginx. It could be integrated into the docker-compose but in my case the nginx is deployed on the underlaying server. Let’s run the container:
$ docker compose up -d |
So here is my nginx configuration file:
upstream tb { server localhost:11000; } server { listen 80 http2; gzip on; gzip_types text /plain text /css application /x-javascript text /xml application /xml application /xml +rss text /javascript application /json ; server_name thingsboard.foo.bar; root /www/thingsboard/htdocs ; error_log /www/thingsboard/logs/error .log; access_log /www/thingsboard/logs/access .log; location ~ ^/ { proxy_pass http: //tb $request_uri; proxy_redirect off; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade" ; } } |
Enable the website on your nginx and use certbot to switch it to ssl. So you can access it with a valid certificate. The container comes with some default account & password so the first thing to do is to change these password. The admin account is sysadmin@thingsboard.org / sysadmin
The next steps are the following:
- Setup your email & password by editing the sysadmin profile
- In the Setting tab you may change some of the setup:
- Update the service URL
- Enable the HTTP device connectivity, then enable HTTPS with the server public url
- Setup the SMTP when required
- In the Security tab:
- Better to genrate a new JWT signing key (not sure if preset in the container)
To use the thingsboard, you need to be manager of a tenant; the role of user is based on email and basically the admin is not a tenant owner and you can’t reuse the same email for a tenant manager. So you need a different email for using ThingsBoard as a tenant manager.
You can go to the tenant Tab, then click on the User Icon and add a new user. Then you can remove the default preset user to avoid security issue.

The tenant will be accessible to different Customer. The default tenant have some preset account it’s better to delete to make sure the access will be protected against default profiles. We can also remove the preset Devices in the Entity tab.
Integrate a Chirpstack / Helium device on thingsboard (South Face – with native connector)
Select ThingsBoard native integration on Chirpstack, you can use Helium HeyIot.xyz service
Setup the ThingsBoard server, but as the authentication is made per device you will set the Authentication Key at the device level.
Create a new device on ThingsBoard

Create a new device on ThingsBoard, from your existing Chirpstack device
![]() | ![]() |
On Chirpstack, you need to configure the device to add the Access Token Key as a Device Variable.
After some time, you may see the device becoming active on ThingsBoard

To get your metrics directly decoded in ThingsBoard, you need to have decoder on Chiprstack to process them and get the corresponding variables.
Display / Debug the integration
What’s complex in Chirpstack is to get the integration details and apparently in ThingsBoard it’s not really easy also. But when you click on a device, you can find an option Check Connectivity where you can see live the integration and you can push data using a curl command.
Process the data and make a dashboard
When the data decoding is made on Chirpstack side, we can directly construct a dashboard for the device.

Creating dashboards is not necessarily very intuitive. Of course, there are quite useful widgets, and you can select data, but for example, when working with gauges (values that always increase), you are forced to use formulas. Nothing too complex, but you need to get used to it. When you want to perform calculations on multiple pieces of data, it will be necessary to use a processing flow. However, what bothered me the most is that creating a dashboard associated with a fleet of devices is not native. I haven’t explored this in depth yet, but it seems a bit complicated, and above all, the documentation is not very educational. Overall, my feeling after a few hours is that the tool is powerful, with a lot of options, but at the cost of user experience. Eventually, we will likely become experts with the tool and appreciate the complexity that makes us dashboard superheroes on ThingsBoard. But for non-tech and beginner users, in my opinion, it can quickly become confusing and demotivating.
n the example above, which displays electrical consumption data, I would like to create a graphic for the cost and another for the CO2 impact. For the cost, it’s simply the addition of different values with a different price multiplier for each. So, in the end, it’s a simple operation to generate a calculated variable, which can be done on the fly (there’s no need to store this information unless the price changes). However, I feel like I’ll need to add a data processing flow for this. Not for the price itself, which is calculable on each variable, but to sum several variables into a single entity for display.
Also, to visualize data initially, I am forced to aggregate over short time periods, otherwise nothing is displayed (which, in itself, doesn’t have a clear explanation). The widgets do not offer dynamic aggregation of data based on zoom. It’s a minor detail but a bit disappointing, as for time series, it’s quite important. Moreover, to change the aggregation, you have to edit the dashboard.
These are the limitations I have encountered at first glance. An expert might tell me that there are solutions, but for me, it’s the somewhat frustrating aspect of the solution. If there are solutions, they need to be sought… extensively.
Make a custom processing for incoming data
I will try to resolve the previous issues by creating a specific processing chain for my devices, which will be able to enrich the received data, and possibly (if possible) retrieve data from external sources.
The simplest approach is to create a new rule chain and copy/paste the content of the root chain into it. Then, we can create a specific chain. This way, we don’t modify the default configuration.

The second step is to create a second rule chain and name it EDF_SUB. Once this is done, we can add a flow node of the rule chain type to the first chain created and link it with the telemetry data so that each new piece of data enters this chain and can be enriched.

We can then create a profile for the devices we want to target, which will need to go through this processing chain. We associate this profile with the rule we just created.
Finally, we need to associate the device with this profile by editing the device and modifying its profile. Be careful, if the default value is present in the input, it must be removed in order to see all the available options.
Now, we can make the changes we want to the data coming from the devices. As an exemple with gauge, it’s interesting to compute a delta from the last received message. This can be made with the following structure:

The Calculate delta bloc will do the job automatically by selecting the variable you wan to use and the name of the target data. Once all the delta computed, I have a Script bloc to compute the cost based on the different price per category.

You simply create new data into msg structure to be saved by the last node with the data coming from the device.
Now we can enrich with data from an external API, here I want to get the eCO2 g / KWh from RTE (French electricity producer); The RTE API is providing XML making it impossible to parse with ThingsBoard. Fortunatelly I found a json api from opendatasoft. Now the problem is to merge the flow from the API with the flow from the device.
The following flows creates two parallel messages we will agregate thanks to the Deduplication Bloc waiting for 5 seconds with an ALL strategy. So the output will be a table of messages from the two sources.

The following Fusion Bloc will merge this into a single message concidering to risk : we don’t know the message order and we can have a single message. This scripts gives you an idea on how it works.
var oMsg = {}; var oMeta = {}; if ( msg.length == 1 ) { if ( msg[0].msg.dr != undefined ) { oMsg = msg[0].msg; oMsg.co2 = 50; oMsg.co2emit = 50 * msg[0].msg.delta_kw; oMeta = msg[0].metadata; return {msg: oMsg, metadata: oMeta, msgType: msgType}; } return undefined; } else { if ( msg[0].msg.dr != undefined ) { // msg 0 is from device oMsg = msg[0].msg; oMsg.co2 = msg[1].msg.co2; oMsg.co2emit = msg[1].msg.co2 * msg[0].msg.delta_kw; oMeta = msg[0].metadata; } else { oMsg = msg[1].msg; oMsg.co2 = msg[0].msg.co2; oMsg.co2emit = msg[0].msg.co2 * msg[1].msg.delta_kw; oMeta = msg[1].metadata; } return {msg: oMsg, metadata: oMeta, msgType: msgType}; } |
Now we have a enriched message with cost of energy from the previous message received and CO2 emission based on real time data. It’s time to update the dashboard. Where I can track my energy consumption, with cost & CO2 emission, also showing the current power and the current energy eCO2 impact.
