Changes for page ThingsBoard

Last modified by Dilisi S on 2025/04/23 19:23

From version 60.1
edited by Dilisi S
on 2025/03/06 13:07
Change comment: Uploaded new attachment "mqtt-command-2.png", version {1}
To version 67.1
edited by Dilisi S
on 2025/03/08 03:35
Change comment: Deleted image "add-integration-connection.png"

Summary

Details

Page properties
Content
... ... @@ -6,26 +6,29 @@
6 6  Draft Document
7 7  {{/warning}}
8 8  
9 -= Introduction =
10 10  
10 +
11 +
12 += 1. Introduction =
13 +
14 +
11 11  This document guides you on integrating Dragino **-NB** and **-CB** series devices data with ThingsBoard. For this guide, we use ThingsBoard Cloud, which is one of the ThingsBoard versions that allows you to try it for free.
12 12  
13 13  The **NB series** devices end with the suffix **-NB**, and the **CB series** devices end with the suffix **-CB**. For example, **S31B-NB** is an **NB device**, and **S31-CB** is a **CB device**.
14 14  
15 15  
16 -= Add New Device =
20 += 2. Add New Device =
17 17  
22 +
18 18  First, we will add a device to simulate data using MQTT. This device does not represent a real physical device but serves as a common virtual device for all Dragino NB/CB devices.
19 19  
20 20  In the left navigation, click **Entities** and then click **Devices**.
21 21  
22 -
23 23  [[image:device-list-empty.png]]
24 24  
25 25  
26 26  On the **Devices **page, click on the ‘**+**’ button, and then click on the **Add new device **from the dropdown menu.
27 27  
28 -
29 29  [[image:ThingsBoard-add-new-device.png||height="279" width="500"]]
30 30  
31 31  
... ... @@ -33,7 +33,6 @@
33 33  
34 34  Click on the **Next: Credentials** button.
35 35  
36 -
37 37  [[image:new-device-device-details.png||height="529" width="500"]]
38 38  
39 39  
... ... @@ -61,34 +61,46 @@
61 61  [[image:new-device-check-connectivity.png||height="522" width="500"]]
62 62  
63 63  
64 -On the terminal, enter the command you copied. This command sends the MQTT payload **{temperature:25}** as telemetry data from a virtual device named **'me'**.
66 +On the terminal, enter the command you copied. This command sends the MQTT payload **{temperature:25}** as telemetry data from a virtual device named **'me'**. Of course, you can replace **'me'** with a device name or use the wildcard character **'+'** to match any device name.
65 65  
66 66  
67 67  [[image:mqtt-command-1.png||height="228" width="700"]]
68 68  
69 69  
72 +If the command is successful, you can see the telemetry data you sent under the **Latest telemetry** section. Note that the **State** is now **'Active'** in the **Latest telemetry** section.
70 70  
71 71  
72 72  [[image:new-device-telemetry-test.png||height="520" width="500"]]
73 73  
74 74  
78 +Send the same command again, only changing the **temperature** value, to see how the **Latest telemetry** section updates its data.
75 75  
76 -= Data Converters =
80 +Once you are done experimenting with this, close the window by clicking the **Close** button.
77 77  
82 +
83 +[[image:mqtt-command-2.png||height="227" width="700"]]
84 +
85 +
86 +
87 +[[image:virtual-device-active.png]]
88 +
89 +
90 += 3. Data Converters =
91 +
92 +
78 78  In **ThingsBoard**, **Data Converters** are components used to transform incoming or outgoing data between different formats, typically to convert raw telemetry data from devices into a structured format that ThingsBoard can understand, or vice versa.
79 79  
80 80  
81 -== Uplink ==
96 +== 3.1 Uplink ==
82 82  
98 +
83 83  In the left navigation, click **Integrations center**, and then click **Data converters**.
84 84  
85 -
86 86  [[image:data-converter-list-page.png]]
87 87  
88 88  
89 89  On the **Data converters** page, click on the ‘+’ button, and then click on the **Create new converter** from the dropdown menu.
90 90  
91 -
92 92  [[image:ThingsBoard-new-data-converter.png||height="282" width="500"]]
93 93  
94 94  
... ... @@ -219,24 +219,22 @@
219 219  
220 220  {{/code}}
221 221  
236 +
222 222  Click on the **Add** button.
223 223  
224 -
225 225  [[image:uplink-data-converter.png||height="529" width="500"]]
226 226  
227 227  
228 -
229 229  You should see that the newly added **uplink data converter** is listed on the **Data Converters** page.
230 230  
231 -
232 232  [[image:data-converter-list-showing-uplink-dc.png]]
233 233  
234 234  
235 -== Downlink ==
247 +== 3.2 Downlink ==
236 236  
249 +
237 237  On the **Data converters** page, click on the ‘**+**’ button, and then click on the **Create new converter** from the dropdown menu.
238 238  
239 -
240 240  [[image:ThingsBoard-new-data-converter.png||height="282" width="500"]]
241 241  
242 242  
... ... @@ -277,24 +277,21 @@
277 277  
278 278  Click on the **Add** button.
279 279  
280 -
281 281  [[image:downlink-data-converter.png||height="530" width="500"]]
282 282  
283 283  
284 -
285 285  You should see that the newly added **downlink data converter** is listed on the **Data Converters** page.
286 286  
287 -
288 288  [[image:data-converter-list.png]]
289 289  
290 290  
291 -= Add Integration =
300 += 4. Add Integration =
292 292  
302 +
293 293  In the left navigation, click **Integrations center**, and then click **Integrations**.
294 294  
295 295  On the **Integrations** page, click on the '**+**' button.
296 296  
297 -
298 298  [[image:data-converter-list-page.png]]
299 299  
300 300  
... ... @@ -310,11 +310,9 @@
310 310  
311 311  Click **Next** button.
312 312  
313 -
314 314  [[image:add-integration-basic-settings.png||height="511" width="500"]]
315 315  
316 316  
317 -
318 318  **Uplink data converter:**
319 319  
320 320  * Click on the **Select existing** button.
... ... @@ -322,11 +322,9 @@
322 322  
323 323  Click **Next** button.
324 324  
325 -
326 326  [[image:add-integration-uplink-data-converter.png||width="500"]]
327 327  
328 328  
329 -
330 330  **Downlink data converter:**
331 331  
332 332  * Click on the **Select existing** button.
... ... @@ -334,11 +334,9 @@
334 334  
335 335  Click **Next** button.
336 336  
337 -
338 338  [[image:add-integration-downlink-data-converter.png||height="510" width="500"]]
339 339  
340 340  
341 -
342 342  **Connection:**
343 343  
344 344  * **Host**: mqtt.eu.thingsboard.cloud (This is the host name you copied from the device - See section xxxxx for more information)
... ... @@ -351,7 +351,6 @@
351 351  
352 352  Click on the **Check connection** button to verify the MQTT connection using the provided parameters.
353 353  
354 -
355 355  [[image:add-integration-connection.png||width="500"]]
356 356  
357 357  
... ... @@ -359,7 +359,6 @@
359 359  
360 360  Click on the **Add** button.
361 361  
362 -
363 363  [[image:add-connection-success.png||height="511" width="500"]]
364 364  
365 365  
... ... @@ -367,11 +367,18 @@
367 367  
368 368  Since we haven't received data from a device yet, the integration **Status** is shown as **Pending.**
369 369  
371 +[[image:integrations-list-added-pending.png]]
370 370  
371 371  
372 -[[image:integrations-list-added-pending.png]]
374 += 5. Verifying the receipt of data from the device =
373 373  
374 374  
375 -= Verifying the receipt of data from the device =
377 +On the terminal, issue the following MQTT command which simulates the device S31B-NB.
376 376  
377 -Connect **S31B-NB** to transfer information. If the integration was performed without errors, after the transmission of the first telemetry, a new device with the name “xxxxx” will appear in the Devices → All. Also, you can verify the input and output data, respectively, before and after conversion in Data converters → UDP Uplink Converter NB/CB → Events.
379 +{{code language="none"}}
380 +mosquitto_pub -d -q 1 -h mqtt.eu.thingsboard.cloud -p 1883 -t v1/devices/S31B-NB/telemetry -u "24vk3w9h7sqdld1me5eh" -m "{temperature:20}"
381 +{{/code}}
382 +
383 +If the integration was performed without errors, after the transmission of the first telemetry, a new device with the name “S31B-NB” will appear in the Devices → All. Also, you can verify the input and output data, respectively, before and after conversion in Data converters → UDP Uplink Converter NB/CB → Events.
384 +
385 +
add-connection-success.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.pradeeka
Size
... ... @@ -1,1 +1,0 @@
1 -202.8 KB
Content
add-integration-connection.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.pradeeka
Size
... ... @@ -1,1 +1,0 @@
1 -124.4 KB
Content
virtual-device-active.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.pradeeka
Size
... ... @@ -1,0 +1,1 @@
1 +202.8 KB
Content