Difference between revisions of "Template:Networking rutos Thingsboard.io"

From Teltonika Networks Wiki
 
(10 intermediate revisions by 2 users not shown)
Line 4: Line 4:
 
==Introduction==
 
==Introduction==
  
This article contains instructions on how to configure Thingsboard IoT platform and connect a Teltonika-Networks devices.
+
This article contains instructions on how to configure ThingsBoard IoT platform and connect Teltonika-Networks devices. [https://thingsboard.io/ ThingsBoard IoT platform ] is an open-source IoT platform for data collection, processing, visualization, and device management. It enables device connectivity via industry standard IoT protocols - MQTT, CoAP and HTTP and supports both cloud and on-premises deployments. ThingsBoard combines scalability, fault-tolerance and performance so you will never lose your data.
  
==Configuring Thingsboard IoT platform==
+
==Configuring ThingsBoard IoT platform==
  
  
The goal of this tutorial is to demonstrate the basic usage of the most popular ThingsBoard features which helps monitor Teltonika-Networks devices.First, you need to login into the platform. Next, you will see an overview window, scroll down to <b>Device managment</b> section or simply click on the <b>Device group</b> in the navigation  menu.
+
The goal of this tutorial is to demonstrate the basic usage of the most popular ThingsBoard features which helps monitor Teltonika-Networks devices. First, you need to login into the platform. Next, you will see an overview window, scroll down to <b>Device management</b> section or simply click on the <b>Device group</b> in the navigation  menu.
  
 
[[File:Thingboards_io_Overview_page.png]]
 
[[File:Thingboards_io_Overview_page.png]]
 
+
<ol>
<li>1. Click on one of the marked in red buttons in the <b>Device groups</b> overview page. In this page you can also add additional device groups in order to distinguish different devices with unique data flows.</li>
+
    <li> Click on one of the marked in red buttons in the <b>Device groups</b> overview page. In this page you can also add additional device groups in order to distinguish different devices with unique data flows.</li>
<li>2. Click marked "<b>+</b>" buttons to add new device to the group.</li>
+
    <li> Click marked "<b>+</b>" buttons to add new device to the group.</li>
 +
</ol>
 
[[File:Thingboards_io_device_groups.png]]
 
[[File:Thingboards_io_device_groups.png]]
<li>1. In the pop up window set name for your device.</li>
+
<ol>
<li>2. Configure your device's <b>Access token</b>(Optional)</li>
+
    <li> In the pop up window set name for your device.</li>
[[File:Thingboards_io_add_new_device.png]]
+
    <li> Configure your device's <b>Access token</b>(Optional)</li>
 +
</ol>
 +
[[File:Thingboards_io_add_new_device.png|border|class=tlt-border]]
  
==== Credentials type:HTTP (Access token) ====
+
==== Credentials type: Access token (HTTP protocol) ====
 
----
 
----
 +
<ol>
 +
    <li> Enable <b>Add credentials</b> option.</li>
 +
    <li> Set desirable <b>Access token</b>.
 +
    <li> Click <b>Add</b> button  to save changes. </li>
 +
</ol>
 +
[[File:Thingboards_io_configuring_credentials.png|border|class=tlt-border]]
  
<li>1. Enable <b>Add credentials</b> option.</li>
+
=== Credentials type: MQTT Basic ===
<li>2. Set desirable <b>Access token</b>.
 
<li>3. Click <b>Add</b> button  to save changes. </li>
 
[[File:Thingboards_io_configuring_credentials.png]]
 
 
 
=== Credentials type:MQTT Basic ===
 
 
----
 
----
 
+
<ol>
<li>1. Enable <b>Add credentials</b> option.</li>  
+
    <li> Enable <b>Add credentials</b> option.</li>  
<li>2. Choose Credentials type:<b>MQTT  Basic</b>.</li>
+
    <li> Choose Credentials type:<b>MQTT  Basic</b>.</li>
<li>3. Set username which will be  used in MQTT authorization.</li>
+
    <li> Set username which will be  used in MQTT authorization.</li>
<li>4. Set password which will be  used in MQTT authorization.</li>
+
    <li> Set password which will be  used in MQTT authorization.</li>
<li>5. Click <b>Add</b> button  to save changes. </li>
+
    <li>  Click <b>Add</b> button  to save changes. </li>
[[File:Thingboards_io_configuring_credentials_mqtt_basic.png]]
+
</ol>
 +
[[File:Thingboards_io_configuring_credentials_mqtt_basic.png|border|class=tlt-border]]
  
 
==Preparing data source==
 
==Preparing data source==
Line 43: Line 48:
 
Different data streams can be selected depending on the device's supported functionality's. In this example we will be using <b>Modbus TCP slave</b> with native <b> Modbus TCP master </b> functionality.
 
Different data streams can be selected depending on the device's supported functionality's. In this example we will be using <b>Modbus TCP slave</b> with native <b> Modbus TCP master </b> functionality.
  
<li>1. First, change WEBUI mode from <b>basic</b> to <b>advanced</b>.</li>
+
1. First, change WEBUI mode from <b>basic</b> to <b>advanced</b>.<br>
 
[[File:Networking_rutx_manual_webui_basic_advanced_mode.gif|border|class=tlt-border]]
 
[[File:Networking_rutx_manual_webui_basic_advanced_mode.gif|border|class=tlt-border]]
<li>2. Go to <b>Services → Modbus TCP slave</b> page.</li>
+
2. Go to <b>Services → Modbus TCP slave</b> page.<br>
<li>3. Enable <b>Modbus TCP slave</b>.</li>
+
3. Enable <b>Modbus TCP slave</b>.<br>
 
[[File:Thingboards_io_Modbus_TCP_slave.png]]
 
[[File:Thingboards_io_Modbus_TCP_slave.png]]
<li>4. Go to <b>Modbus TCP master</b> page and add new slave device.</li>
+
4. Go to <b>Modbus TCP master</b> page and add new slave device.<br>
 
[[File:Thingboards_io_Modbus_TCP_master.png]]
 
[[File:Thingboards_io_Modbus_TCP_master.png]]
<li>5. Configure <b>Modbus TCP master's slave device</b> as shown below to return device's uptime value.</li>
+
5. Configure <b>Modbus TCP master's slave device</b> as shown below to return device's uptime value.<br>
 
[[File:Thingboards_io_Modbus_TCP_master_device.png]]
 
[[File:Thingboards_io_Modbus_TCP_master_device.png]]
  
Line 60: Line 65:
  
 
[[File:Thingboards_io_data_sender_configuration.png]]
 
[[File:Thingboards_io_data_sender_configuration.png]]
<li>1. Set name for the <b>Data sender</b>.</li>
+
<ol>
<li>2. Set desirable name for your data variable. Make sure that your chosen parameter is shown below JSON format field.</li>
+
    <li> Set name for the <b>Data sender</b>.</li>
<li>3. Paste connection string with your own <b>Access token</b>.</li>
+
    <li> Set desirable name for your data variable. Make sure that your chosen parameter is shown below JSON format field.</li>
<pre>https://thingsboard.cloud/api/v1/YOUR_ACCESS_TOKEN/telemetry</pre>
+
    <li> Paste connection string with your own <b>Access token</b>.</li>
<li>4. Add value to Custom header. </li>
+
    <pre>https://thingsboard.cloud/api/v1/YOUR_ACCESS_TOKEN/telemetry</pre>
<pre>Content-Type:application/json</pre>
+
    <li> Add value to Custom header. </li>
 
+
    <pre>Content-Type:application/json</pre>
 +
</ol>
 
==Configuring data to server with MQTT protocol==
 
==Configuring data to server with MQTT protocol==
 
After configuring the data source, you can add a data sender configuration. Data sender functionality is located  <b>Services → Data to server</b>. You can add data sender by clicking <b>Add</b> button.
 
After configuring the data source, you can add a data sender configuration. Data sender functionality is located  <b>Services → Data to server</b>. You can add data sender by clicking <b>Add</b> button.
Line 72: Line 78:
 
[[File:Thingboards_io_Thingboards_io_Data_to_server_mqtt.png]]
 
[[File:Thingboards_io_Thingboards_io_Data_to_server_mqtt.png]]
 
[[File:Thingboards_io_data_sender_configuration_mqtt.png]]
 
[[File:Thingboards_io_data_sender_configuration_mqtt.png]]
<li>1. Set name for the <b>Data sender</b>.</li>
+
<ol>
<li>2. Choose <b>MQTT</b> protocol.</li>
+
    <li> Set name for the <b>Data sender</b>.</li>
<li>3. Set desirable name for your data variable. Make sure that your chosen parameter is shown below JSON format field.</li>
+
    <li> Choose <b>MQTT</b> protocol.</li>
<li>4. Enter <b>thingsboard.cloud</b> as a host.</li>
+
    <li> Set desirable name for your data variable. Make sure that your chosen parameter is shown below JSON format field.</li>
<li>5. Paste in MQTT topic. </li>
+
    <li> Enter <b>thingsboard.cloud</b> as a host.</li>
<pre>v1/devices/me/telemetry</pre>
+
    <li> Paste in MQTT topic. </li>
<li>6. Enable <b>Use credentials</b> option. Enter configured username and password from Thingsboard IoT platform.</li>
+
    <pre>v1/devices/me/telemetry</pre>
 +
    <li> Enable <b>Use credentials</b> option. Enter configured username and password from ThingsBoard IoT platform.</li>
 +
</ol>
 
==Adding widget to the dashboard==
 
==Adding widget to the dashboard==
  
 
The collected data can be displayed using various a widgets. To create one you should be able to see gathered data in the <b>Latest telemetry </b> section. To access it you should follow these steps:
 
The collected data can be displayed using various a widgets. To create one you should be able to see gathered data in the <b>Latest telemetry </b> section. To access it you should follow these steps:
<li>1. Click on the configured device. </li>
+
<ol>
<li>2. From the pop-up menu select <b>Latest telemetry </b> option. There you should see collected data.</li>
+
    <li> Click on the configured device. </li>
 +
    <li> From the pop-up menu select <b>Latest telemetry </b> option. There you should see collected data.</li>
 +
</ol>
 
[[File:Thingboards_io_latest_telemetry.png]]
 
[[File:Thingboards_io_latest_telemetry.png]]
  
 
In order to display data in the widget you should:
 
In order to display data in the widget you should:
<li>1. Click on the gathered data row.</li>
+
<ol>
<li>2. Press <b>Show on  widget </b> button.</li>
+
    <li> Click on the gathered data row.</li>
 +
    <li> Press <b>Show on  widget </b> button.</li>
 +
</ol>
 
[[File:Thingboards_io_latest_telemetry_data.png]]
 
[[File:Thingboards_io_latest_telemetry_data.png]]
<li>1. Choose bundle accordingly to your data.</li>
+
<ol>
<li>2. Choose suitable chart for your data visualization.</li>
+
    <li> Choose bundle accordingly to your data.</li>
<li>3. Add widget to dashboard.</li>
+
    <li> Choose suitable chart for your data visualization.</li>
 +
    <li> Add widget to dashboard.</li>
 +
</ol>
 
[[File:Thingboards_io_charts.png]]
 
[[File:Thingboards_io_charts.png]]
<li>1. Create new dashboard. </li>
+
<ol>
<li>2. With this option enabled after addition you will be redirected to newly created dashboard</li>
+
    <li> Create new dashboard. </li>
<li>3. Adds widget to dashboard.</li>
+
    <li> With this option enabled after addition you will be redirected to newly created dashboard</li>
[[File:Thingboards_io_adding_widget.png]]
+
    <li> Adds widget to dashboard.</li>
 +
</ol>
 +
[[File:Thingboards_io_adding_widget.png|border|class=tlt-border]]
  
  
[[File:Thingboards_io_dashboard.png]]
+
[[File:Thingboards_io_dashboard.png|border|class=tlt-border]]
  
 
==See also==
 
==See also==
  
 
* https://thingsboard.io/docs/getting-started-guides/helloworld-pe/
 
* https://thingsboard.io/docs/getting-started-guides/helloworld-pe/

Latest revision as of 22:02, 7 January 2021


Introduction[edit source]

This article contains instructions on how to configure ThingsBoard IoT platform and connect Teltonika-Networks devices. ThingsBoard IoT platform is an open-source IoT platform for data collection, processing, visualization, and device management. It enables device connectivity via industry standard IoT protocols - MQTT, CoAP and HTTP and supports both cloud and on-premises deployments. ThingsBoard combines scalability, fault-tolerance and performance so you will never lose your data.

Configuring ThingsBoard IoT platform[edit source]

The goal of this tutorial is to demonstrate the basic usage of the most popular ThingsBoard features which helps monitor Teltonika-Networks devices. First, you need to login into the platform. Next, you will see an overview window, scroll down to Device management section or simply click on the Device group in the navigation menu.

Thingboards io Overview page.png

  1. Click on one of the marked in red buttons in the Device groups overview page. In this page you can also add additional device groups in order to distinguish different devices with unique data flows.
  2. Click marked "+" buttons to add new device to the group.

Thingboards io device groups.png

  1. In the pop up window set name for your device.
  2. Configure your device's Access token(Optional)

Thingboards io add new device.png

Credentials type: Access token (HTTP protocol)[edit source]


  1. Enable Add credentials option.
  2. Set desirable Access token.
  3. Click Add button to save changes.

Thingboards io configuring credentials.png

Credentials type: MQTT Basic[edit source]


  1. Enable Add credentials option.
  2. Choose Credentials type:MQTT Basic.
  3. Set username which will be used in MQTT authorization.
  4. Set password which will be used in MQTT authorization.
  5. Click Add button to save changes.

Thingboards io configuring credentials mqtt basic.png

Preparing data source[edit source]

Different data streams can be selected depending on the device's supported functionality's. In this example we will be using Modbus TCP slave with native Modbus TCP master functionality.

1. First, change WEBUI mode from basic to advanced.
Networking rutx manual webui basic advanced mode.gif 2. Go to Services → Modbus TCP slave page.
3. Enable Modbus TCP slave.
Thingboards io Modbus TCP slave.png 4. Go to Modbus TCP master page and add new slave device.
Thingboards io Modbus TCP master.png 5. Configure Modbus TCP master's slave device as shown below to return device's uptime value.
Thingboards io Modbus TCP master device.png

Configuring data to server with HTTP protocol[edit source]

After configuring the data source, you can add a data sender configuration. Data sender functionality is located Services → Data to server. You can add data sender by clicking Add button.

Thingboards io Thingboards io Data to server HTTP.png

Thingboards io data sender configuration.png

  1. Set name for the Data sender.
  2. Set desirable name for your data variable. Make sure that your chosen parameter is shown below JSON format field.
  3. Paste connection string with your own Access token.
  4. https://thingsboard.cloud/api/v1/YOUR_ACCESS_TOKEN/telemetry
  5. Add value to Custom header.
  6. Content-Type:application/json

Configuring data to server with MQTT protocol[edit source]

After configuring the data source, you can add a data sender configuration. Data sender functionality is located Services → Data to server. You can add data sender by clicking Add button.

Thingboards io Thingboards io Data to server mqtt.png Thingboards io data sender configuration mqtt.png

  1. Set name for the Data sender.
  2. Choose MQTT protocol.
  3. Set desirable name for your data variable. Make sure that your chosen parameter is shown below JSON format field.
  4. Enter thingsboard.cloud as a host.
  5. Paste in MQTT topic.
  6. v1/devices/me/telemetry
  7. Enable Use credentials option. Enter configured username and password from ThingsBoard IoT platform.

Adding widget to the dashboard[edit source]

The collected data can be displayed using various a widgets. To create one you should be able to see gathered data in the Latest telemetry section. To access it you should follow these steps:

  1. Click on the configured device.
  2. From the pop-up menu select Latest telemetry option. There you should see collected data.

Thingboards io latest telemetry.png

In order to display data in the widget you should:

  1. Click on the gathered data row.
  2. Press Show on widget button.

Thingboards io latest telemetry data.png

  1. Choose bundle accordingly to your data.
  2. Choose suitable chart for your data visualization.
  3. Add widget to dashboard.

Thingboards io charts.png

  1. Create new dashboard.
  2. With this option enabled after addition you will be redirected to newly created dashboard
  3. Adds widget to dashboard.

Thingboards io adding widget.png


Thingboards io dashboard.png

See also[edit source]