Template:Networking rutos Thingsboard.io: Difference between revisions
Template:Networking rutos Thingsboard.io (view source)
Revision as of 07:22, 31 January 2024
, 31 Januaryno edit summary
No edit summary |
No edit summary |
||
(24 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
<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== | |||
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== | |||
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. | |||
<ol> | |||
<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> | |||
</ol> | |||
[[File:1111.png]] | |||
<ol> | |||
<li> In the pop up window set name for your device.</li> | |||
<li> Configure your device's <b>Label</b> (Optional)</li> | |||
</ol> | |||
[[File:22222222222.png]] | |||
==== Credentials type: Access token (HTTP protocol) ==== | ==== Credentials type: Access token (HTTP protocol) ==== | ||
---- | ---- | ||
<ol> | |||
<li> | <li> Enable <b>Add credentials</b> option.</li> | ||
<li> | <li> Set desirable <b>Access token</b>. | ||
<li> | <li> Click <b>Add</b> button to save changes. </li> | ||
[[File: | </ol> | ||
[[File:33333333.png |border|class=tlt-border]] | |||
=== Credentials type: MQTT Basic === | === Credentials type: MQTT Basic === | ||
---- | ---- | ||
<ol> | |||
<li> | <li> Enable <b>Add credentials</b> option.</li> | ||
<li> | <li> Choose Credentials type:<b>MQTT Basic</b>.</li> | ||
<li> | <li> Set username which will be used in MQTT authorization.</li> | ||
<li> | <li> Set password which will be used in MQTT authorization.</li> | ||
<li> | <li> Click <b>Add</b> button to save changes. </li> | ||
[[File: | </ol> | ||
[[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 | 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> | |||
[[File: | [[File:05.png|border|class=tlt-border]] | ||
2. Go to <b>Services → Modbus TCP Server</b> page.<br> | |||
3. Enable <b>Modbus TCP Server</b>.<br> | |||
[[File: | [[File:5555555555555555555.png]] | ||
4. Go to <b>Modbus TCP Client</b> page and add new Server device.<br> | |||
[[File: | [[File:20.png]] | ||
5. Configure <b>Modbus TCP master's Server device</b> as shown below to return device's uptime value.<br> | |||
[[File: | [[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 57: | 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: | [[File:10.png]] | ||
* Configure '''Data'''. | |||
[[File:110.png]] | |||
* Configure '''HTTP Server'''. | |||
[[File:150.png]] | |||
<ol> | |||
<li> Set name for the <b>Data sender</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> | |||
<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. | ||
[[File: | [[File:13.png]] | ||
[[File: | * Configure '''Data'''. | ||
[[File:14.png]] | |||
<li> | * Configure '''MQTT Server'''. | ||
<li> | [[File:160.png]] | ||
<ol> | |||
<li> | <li> Choose <b>MQTT</b> protocol.</li> | ||
<pre>v1/devices/me/telemetry</pre> | <li> Enter <b>thingsboard.cloud</b> as a host.</li> | ||
<li> | <li> Paste in MQTT topic. </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> | <ol> | ||
<li> | <li> Click on the configured device. </li> | ||
[[File: | <li> From the pop-up menu select <b>Latest telemetry </b> option. There you should see collected data.</li> | ||
</ol> | |||
[[File:500.png]] | |||
In order to display data in the widget you should: | In order to display data in the widget you should: | ||
<li> | <ol> | ||
<li> | <li> Click on the gathered data row.</li> | ||
[[File: | <li> Press <b>Show on widget </b> button.</li> | ||
<li> | </ol> | ||
<li> | [[File:600.png]] | ||
<li> | <ol> | ||
[[File: | <li> Choose bundle accordingly to your data.</li> | ||
<li> | <li> Choose suitable chart for your data visualization.</li> | ||
<li> | <li> Add widget to dashboard.</li> | ||
<li> | </ol> | ||
[[File: | [[File:700.png]] | ||
<ol> | |||
<li> Create new dashboard. </li> | |||
<li> With this option enabled after addition you will be redirected to newly created dashboard</li> | |||
<li> Adds widget to dashboard.</li> | |||
</ol> | |||
[[File:1000000.png]] | |||
[[File: | [[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/ |