Jump to content

Template:Networking rutos Thingsboard.io: Difference between revisions

no edit summary
No edit summary
No edit summary
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>
<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.10'''] firmware version .</p>


==Introduction==
==Introduction==
Line 53: Line 53:


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:05.png|border|class=tlt-border]]
[[File:Networking_rutos_manual_webui_basic_advanced_mode_75.gif|border|center|class=tlt-border|1102x93px]]
2. Go to <b>Services → Modbus TCP Server</b> page.<br>
2. Go to <b>Services → Modbus → Modbus TCP Server</b> page.<br>
3. Enable <b>Modbus TCP Server</b>.<br>
3. Enable <b>Modbus TCP Server</b>.<br>
[[File:5555555555555555555.png]]
[[File:Networking_RutOS_Thingsboard_config_example_1.png|border|class=tlt-border]]
4. Go to <b>Modbus TCP Client</b> page and add new Server device.<br>
4. Go to <b>Services → Modbus → Modbus TCP Client</b> page and add new Server device.<br>
[[File:20.png]]
[[File:Networking_RutOS_Thingsboard_config_example_2.png|border|class=tlt-border]]
5. Configure <b>Modbus TCP master's Server device</b> as shown below to return device's uptime value.<br>
5. Configure <b>Modbus TCP master's Server device</b>:<br>
[[File:100.png|border|class=tlt-border|1152x525px]]
#'''Enable''' the instance;
6. Configure '''Data Type'''.
#Choose your desired '''Name''' for the instance;
[[File:9.png|border|class=tlt-border|1152x525px]]
#Choose your device's address, in this case, we are using routers address - '''192.168.11.1''';
#Choose the period on how often the data should be sent, in this case we use '''10''';
[[File:Networking_RutOS_Thingsboard_config_example_3.png|border|class=tlt-border]]
6. Add a new instance of request and configure it by your needs. In this example, we will get the devices uptime:
#Click on '''Add''' button;
#Choose the '''Data type''' - 32bit UINT, Byte order 1,2,3,4;
#Choose the '''Function''' - Read holding register (3);
#Write the '''First register number''' - 2;
#Write the '''Register count / Values''' - 2;
#'''Enable''' the request;
#Click on '''Test''' button, to see if the request is configured correctly as shown below;
[[File:Networking_RutOS_Thingsboard_config_example_4.png|border|class=tlt-border|1100px]]


==Configuring data to server with HTTP protocol==
==Configuring data to server with HTTP protocol==
Line 68: Line 79:
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:10.png]]
[[File:Networking_RutOS_Thingsboard_config_example_5.png|border|class=tlt-border|1100px]]


* Configure '''Data'''.
* Configure '''Data''':
#Choose your desired '''Name''' for the instance;
#Choose Type - '''Modbus''';
#Choose Format Type - '''Custom''';
#Choose the '''data''' that you want to send;
#Once done configuring, click on '''Next: collection edit''' button;


[[File:110.png]]
[[File:Networking_RutOS_Thingsboard_config_example_6.png|border|class=tlt-border]]
 
* In Collection configuration, we can leave default settings, so we can move onto '''Server configuration''':
 
[[File:Networking_RutOS_Thingsboard_config_example_7.png|border|class=tlt-border|1100px]]
 
* Configure '''Server instance''':
#Type - '''HTTP''';
#Server address - '''https://thingsboard.cloud/api/v1/<your_access_token_here>/telemetry''';
#HTTP headers - '''Content-Type:application/json'''
[[File:Networking_RutOS_Thingsboard_config_example_7.png|border|class=tlt-border|1100px]]


* 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:13.png]]
[[File:Networking_RutOS_Thingsboard_config_example_5.png|border|class=tlt-border|1100px]]
* Configure '''Data'''.
 
[[File:14.png]]
* Configure '''Data''':
* Configure '''MQTT Server'''.
#Choose your desired '''Name''' for the instance;
[[File:160.png]]
#Choose Type - '''Modbus''';
<ol>
#Choose Format Type - '''Custom''';
    <li> Choose <b>MQTT</b> protocol.</li>
#Choose the '''data''' that you want to send;
    <li> Enter <b>thingsboard.cloud</b> as a host.</li>
#Once done configuring, click on '''Next: collection edit''' button;
    <li> Paste in MQTT topic. </li>
 
    <pre>v1/devices/me/telemetry</pre>
[[File:Networking_RutOS_Thingsboard_config_example_6.png|border|class=tlt-border]]
    <li> Enable <b>Use credentials</b> option. Enter configured username and password from ThingsBoard IoT platform.</li>
 
</ol>
* In Collection configuration, we can leave default settings, so we can move onto '''Server configuration''':
 
[[File:Networking_RutOS_Thingsboard_config_example_9png|border|class=tlt-border|1100px]]
 
* Configure '''Server instance''':
#Type - '''MQTT;
#Server address - '''thingsboard.cloud''';
#Topic - '''/v1/devices/me/telemetry''';
#Client ID - '''Generated ID from ThingsBoard''';
#Username - '''Created Username from ThingsBoard''';
#Password - '''Created Password from ThingsBoard''';
[[File:Networking_RutOS_Thingsboard_config_example_7.png|border|class=tlt-border|1100px]]
==Adding widget to the dashboard==
==Adding widget to the dashboard==