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

From Teltonika Networks Wiki
 
(19 intermediate revisions by 5 users not shown)
Line 1: Line 1:
__TOC__
+
<p style="color:red">The information on this page is updated in accordance with the [https://wiki.teltonika-networks.com/view/FW_%26_SDK_Downloads'''00.07.4'''] firmware version .</p>
 
 
  
 
==Introduction==
 
==Introduction==
Line 9: Line 8:
  
  
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.
+
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>Entities</b> section and simply click on the <b>Device</b> in the navigation menu.
  
[[File:Thingboards_io_Overview_page.png]]
 
 
<ol>
 
<ol>
     <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> Click on one of the marked in red buttons in the overview page <b> Entities → Devices</b>. In this page you can also add additional device in order to distinguish different devices with unique data flows.</li>
 
     <li> 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>
 
</ol>
[[File:Thingboards_io_device_groups.png]]
+
[[File:1111.png]]
 +
 
 +
 
 
<ol>
 
<ol>
 
     <li> In the pop up window set name for your device.</li>
 
     <li> In the pop up window set name for your device.</li>
     <li> Configure your device's <b>Access token</b>(Optional)</li>
+
     <li> Configure your device's <b>Label</b> (Optional)</li>
 
</ol>
 
</ol>
[[File:Thingboards_io_add_new_device.png]]
+
[[File:22222222222.png]]
 +
 
 +
 
  
 
==== Credentials type: Access token (HTTP protocol) ====
 
==== Credentials type: Access token (HTTP protocol) ====
Line 30: Line 34:
 
     <li> Click <b>Add</b> button  to save changes. </li>
 
     <li> Click <b>Add</b> button  to save changes. </li>
 
</ol>
 
</ol>
[[File:Thingboards_io_configuring_credentials.png]]
+
[[File:33333333.png |border|class=tlt-border]]
  
 
=== Credentials type: MQTT Basic ===
 
=== Credentials type: MQTT Basic ===
Line 41: Line 45:
 
     <li>  Click <b>Add</b> button  to save changes. </li>
 
     <li>  Click <b>Add</b> button  to save changes. </li>
 
</ol>
 
</ol>
[[File:Thingboards_io_configuring_credentials_mqtt_basic.png]]
+
[[File:44444444444.png]]
  
 
==Preparing data source==
 
==Preparing data source==
  
  
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 Server</b> with native <b> Modbus TCP Client </b> functionality.
  
 
1. First, change WEBUI mode from <b>basic</b> to <b>advanced</b>.<br>
 
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:05.png|border|class=tlt-border]]
2. Go to <b>Services → Modbus TCP slave</b> page.<br>
+
2. Go to <b>Services → Modbus TCP Server</b> page.<br>
3. Enable <b>Modbus TCP slave</b>.<br>
+
3. Enable <b>Modbus TCP Server</b>.<br>
[[File:Thingboards_io_Modbus_TCP_slave.png]]
+
[[File:5555555555555555555.png]]
4. Go to <b>Modbus TCP master</b> page and add new slave device.<br>
+
4. Go to <b>Modbus TCP Client</b> page and add new Server device.<br>
[[File:Thingboards_io_Modbus_TCP_master.png]]
+
[[File:20.png]]
5. Configure <b>Modbus TCP master's slave device</b> as shown below to return device's uptime value.<br>
+
5. Configure <b>Modbus TCP master's Server device</b> as shown below to return device's uptime value.<br>
[[File:Thingboards_io_Modbus_TCP_master_device.png]]
+
[[File:100.png|border|class=tlt-border|1152x525px]]
 +
6. Configure '''Data Type'''.
 +
[[File:9.png|border|class=tlt-border|1152x525px]]
  
 
==Configuring data to server with HTTP protocol==
 
==Configuring data to server with HTTP protocol==
Line 62: Line 68:
 
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.
  
[[File:Thingboards_io_Thingboards_io_Data_to_server_HTTP.png]]
+
[[File:10.png]]
 +
 
 +
* Configure '''Data'''.
 +
 
 +
[[File:110.png]]
 +
 
 +
* Configure '''HTTP Server'''.
 +
[[File:150.png]]
  
[[File:Thingboards_io_data_sender_configuration.png]]
 
 
<ol>
 
<ol>
 
     <li> Set name for the <b>Data sender</b>.</li>
 
     <li> Set name for the <b>Data sender</b>.</li>
    <li> Set desirable name for your data variable. Make sure that your chosen parameter is shown below JSON format field.</li>
 
 
     <li> Paste connection string with your own <b>Access token</b>.</li>
 
     <li> Paste connection string with your own <b>Access token</b>.</li>
 
     <pre>https://thingsboard.cloud/api/v1/YOUR_ACCESS_TOKEN/telemetry</pre>
 
     <pre>https://thingsboard.cloud/api/v1/YOUR_ACCESS_TOKEN/telemetry</pre>
Line 76: Line 87:
 
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.
  
[[File:Thingboards_io_Thingboards_io_Data_to_server_mqtt.png]]
+
[[File:13.png]]
[[File:Thingboards_io_data_sender_configuration_mqtt.png]]
+
* Configure '''Data'''.
 +
[[File:14.png]]
 +
* Configure '''MQTT Server'''.
 +
[[File:160.png]]
 
<ol>
 
<ol>
    <li> Set name for the <b>Data sender</b>.</li>
 
 
     <li> Choose <b>MQTT</b> protocol.</li>
 
     <li> Choose <b>MQTT</b> protocol.</li>
    <li> Set desirable name for your data variable. Make sure that your chosen parameter is shown below JSON format field.</li>
 
 
     <li> Enter <b>thingsboard.cloud</b> as a host.</li>
 
     <li> Enter <b>thingsboard.cloud</b> as a host.</li>
 
     <li> Paste in MQTT topic. </li>
 
     <li> Paste in MQTT topic. </li>
Line 94: Line 106:
 
     <li> From the pop-up menu select <b>Latest telemetry </b> option. There you should see collected data.</li>
 
     <li> From the pop-up menu select <b>Latest telemetry </b> option. There you should see collected data.</li>
 
</ol>
 
</ol>
[[File:Thingboards_io_latest_telemetry.png]]
+
[[File:500.png]]
 +
 
 +
 
  
 
In order to display data in the widget you should:
 
In order to display data in the widget you should:
Line 101: Line 115:
 
     <li> Press <b>Show on  widget </b> button.</li>
 
     <li> Press <b>Show on  widget </b> button.</li>
 
</ol>
 
</ol>
[[File:Thingboards_io_latest_telemetry_data.png]]
+
[[File:600.png]]
 
<ol>
 
<ol>
 
     <li> Choose bundle accordingly to your data.</li>
 
     <li> Choose bundle accordingly to your data.</li>
Line 107: Line 121:
 
     <li> Add widget to dashboard.</li>
 
     <li> Add widget to dashboard.</li>
 
</ol>
 
</ol>
[[File:Thingboards_io_charts.png]]
+
[[File:700.png]]
 
<ol>
 
<ol>
 
     <li> Create new dashboard. </li>
 
     <li> Create new dashboard. </li>
Line 113: Line 127:
 
     <li> Adds widget to dashboard.</li>
 
     <li> Adds widget to dashboard.</li>
 
</ol>
 
</ol>
[[File:Thingboards_io_adding_widget.png]]
+
[[File:1000000.png]]
  
  
[[File:Thingboards_io_dashboard.png]]
+
[[File:2- Dashbord.png]]
  
 
==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 07:22, 31 January 2024

The information on this page is updated in accordance with the 00.07.4 firmware version .

Introduction

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

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 Entities section and simply click on the Device in the navigation menu.

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

1111.png


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

22222222222.png


Credentials type: Access token (HTTP protocol)


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

33333333.png

Credentials type: MQTT Basic


  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.

44444444444.png

Preparing data source

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

1. First, change WEBUI mode from basic to advanced.
05.png 2. Go to Services → Modbus TCP Server page.
3. Enable Modbus TCP Server.
5555555555555555555.png 4. Go to Modbus TCP Client page and add new Server device.
20.png 5. Configure Modbus TCP master's Server device as shown below to return device's uptime value.
100.png 6. Configure Data Type. 9.png

Configuring data to server with HTTP protocol

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.

10.png

  • Configure Data.

110.png

  • Configure HTTP Server.

150.png

  1. Set name for the Data sender.
  2. Paste connection string with your own Access token.
  3. https://thingsboard.cloud/api/v1/YOUR_ACCESS_TOKEN/telemetry
  4. Add value to Custom header.
  5. Content-Type:application/json

Configuring data to server with MQTT protocol

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.

13.png

  • Configure Data.

14.png

  • Configure MQTT Server.

160.png

  1. Choose MQTT protocol.
  2. Enter thingsboard.cloud as a host.
  3. Paste in MQTT topic.
  4. v1/devices/me/telemetry
  5. Enable Use credentials option. Enter configured username and password from ThingsBoard IoT platform.

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 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.

500.png


In order to display data in the widget you should:

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

600.png

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

700.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.

1000000.png


2- Dashbord.png

See also