Template:Networking rutos Thingsboard.io: Difference between revisions
No edit summary |
No edit summary |
||
Line 4: | Line 4: | ||
==Introduction== | ==Introduction== | ||
This article contains instructions on how to configure Thingsboard | This article contains instructions on how to configure Thingsboard IoT platform and connect a Teltonika-Networks devices. | ||
== | ==Configuring Thingsboard IoT platform== | ||
Line 19: | Line 19: | ||
<li>2. Configure your device's <b>Access token</b>(Optional)</li> | <li>2. Configure your device's <b>Access token</b>(Optional)</li> | ||
[[File:Thingboards_io_add_new_device.png]] | [[File:Thingboards_io_add_new_device.png]] | ||
==== Credentials type:HTTP (Access token) ==== | |||
---- | |||
<li>1. Enable <b>Add credentials</b> option.</li> | <li>1. Enable <b>Add credentials</b> option.</li> | ||
<li>2. Set desirable <b>Access token</b>. | <li>2. Set desirable <b>Access token</b>. | ||
<li>3. Click <b>Add</b> button to save changes. </li> | <li>3. Click <b>Add</b> button to save changes. </li> | ||
[[File:Thingboards_io_configuring_credentials.png]] | [[File:Thingboards_io_configuring_credentials.png]] | ||
== | === Credentials type:MQTT Basic === | ||
---- | |||
<li>1. Enable <b>Add credentials</b> option.</li> | |||
<li>2. Choose Credentials type:<b>MQTT Basic</b>.</li> | |||
<li>3. Set username which will be used in MQTT authorization.</li> | |||
<li>4. Set password which will be used in MQTT authorization.</li> | |||
<li>5. Click <b>Add</b> button to save changes. </li> | |||
[[File:Thingboards_io_configuring_credentials_mqtt_basic.png]] | |||
==Preparing data source== | |||
Line 39: | Line 53: | ||
[[File:Thingboards_io_Modbus_TCP_master_device.png]] | [[File:Thingboards_io_Modbus_TCP_master_device.png]] | ||
==Configuring data to server== | ==Configuring data to server with HTTP 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:Thingboards_io_Thingboards_io_Data_to_server_HTTP.png]] | [[File:Thingboards_io_Thingboards_io_Data_to_server_HTTP.png]] | ||
[[File:Thingboards_io_data_sender_configuration.png]] | |||
<li>1. Set name for the <b>Data sender</b>.</li> | <li>1. Set name for the <b>Data sender</b>.</li> | ||
<li>2. Set desirable name for your data variable. Make sure that your chosen parameter is shown below JSON format field.</li> | <li>2. Set desirable name for your data variable. Make sure that your chosen parameter is shown below JSON format field.</li> | ||
Line 50: | Line 66: | ||
<li>4. Add value to Custom header. </li> | <li>4. Add value to Custom header. </li> | ||
<pre>Content-Type:application/json</pre> | <pre>Content-Type:application/json</pre> | ||
==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. | |||
[[File:Thingboards_io_Thingboards_io_Data_to_server_mqtt.png]] | |||
[[File:Thingboards_io_data_sender_configuration_mqtt.png]] | |||
<li>1. Set name for the <b>Data sender</b>.</li> | |||
<li>2. Choose <b>MQTT</b> protocol.</li> | |||
<li>3. Set desirable name for your data variable. Make sure that your chosen parameter is shown below JSON format field.</li> | |||
<li>4. Enter <b>thingsboard.cloud</b> as a host.</li> | |||
<li>5. Paste in MQTT topic. </li> | |||
<pre>v1/devices/me/telemetry</pre> | |||
<li>6. Enable <b>Use credentials</b> option. Enter configured username and password from Thingsboard IoT platform.</li> | |||
==Adding widget to the dashboard== | ==Adding widget to the dashboard== | ||
Revision as of 13:16, 7 January 2021
Introduction
This article contains instructions on how to configure Thingsboard IoT platform and connect a Teltonika-Networks devices.
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 Device managment section or simply click on the Device group in the navigation menu.
Credentials type:HTTP (Access token)
Credentials type:MQTT Basic
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 slave with native Modbus TCP master functionality.
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.
https://thingsboard.cloud/api/v1/YOUR_ACCESS_TOKEN/telemetry
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.
v1/devices/me/telemetry
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:
In order to display data in the widget you should: