Changes for page ThingsBoard

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

From version 214.1
edited by Dilisi S
on 2025/04/21 18:30
Change comment: Uploaded new attachment "Screenshot 2025-04-21 122936.png", version {1}
To version 154.1
edited by Dilisi S
on 2025/03/17 00:15
Change comment: Uploaded new attachment "ins1.png", version {1}

Summary

Details

Page properties
Content
... ... @@ -22,10 +22,7 @@
22 22  To complete this tutorial, you need to have the following:
23 23  
24 24  * ThingsBoard cloud account
25 -* MQTT Broker (public or private) such as,
26 -** **[[HiveMQ Cloud>>https://www.hivemq.com]] - You can create a free account to try it or subscribe for a paid account. - We use HiveMQ Cloud as the MQTT broker to build example in this tutorial.**
27 -** [[emqx>>https://www.emqx.com/zh/mqtt/public-mqtt5-broker]] - The public MQTT server is only used for MOTT learning and testing, and should not be used in the production environment.
28 -** [[lns1.thingseye.io>>http://lns1.thingseye.io/]] - This is Dragino's MQTT broker, which requires a CA certificate to use.
25 +* HiveMQ Cloud account
29 29  
30 30  == 2.1 ThingsBoard Cloud ==
31 31  
... ... @@ -69,9 +69,7 @@
69 69  
70 70  == 2.2 HiveMQ Cloud ==
71 71  
72 -=== 2.2.1 HiveMQ Cloud ===
73 73  
74 -
75 75  Go to [[https:~~/~~/www.hivemq.com>>https://www.hivemq.com]]
76 76  
77 77  Click on the **Start Free** button.
... ... @@ -146,128 +146,144 @@
146 146  You will need these MQTT connection parameters when configuring the MQTT integration in the '**Add Integration**' section.
147 147  
148 148  
149 -=== 2.2.2 emqx ===
144 += 3. Data Converters =
150 150  
151 151  
152 -The [[emqx>>https://www.emqx.com/zh/mqtt/public-mqtt5-broker]] public MQTT server is only used for MOTT learning and testing, and should not be used in the production environment.
147 +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.
153 153  
154 154  
155 -[[image:emqx.png||height="420" width="500"]]
150 +== 3.1 Uplink ==
156 156  
157 157  
158 -=== 2.2.3 Ins1.thingseye.io ===
153 +In the left navigation, click **Integrations center**, and then click **Data converters**.
159 159  
160 -[[lns1.thingseye.io>>http://lns1.thingseye.io/]] is the Dragino's MQTT broker, which requires a CA certificate file, Certificate file, and the Private key file to use.
161 161  
162 -If customers need to use this MQTT connection with ThingsBoard, they need to contact the TE team to obtain three license files.
163 163  
164 -[[image:ins1.png||height="310" width="500"]]
157 +[[image:data-converters-list-empty.png]]
165 165  
166 166  
160 +On the **Data converters** page, click on the ‘**+**’ button, and then click on the **Create new converter** from the dropdown menu.
167 167  
168 -= 3. Data Converters =
169 169  
170 170  
171 -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.
164 +[[image:create-new-converter-menu.png||height="259" width="500"]]
172 172  
173 -**In this section, you will create a universal uplink data converter for all Dragino NB-IoT devices. The uplink decoder converts any MQTT message coming from a device into key-value pairs that can be used to display and visualize data using various widgets on the dashboard**.
174 174  
167 +The **Add data converter** window will appear. Name it ‘**MQTT Uplink Converter NB/CB**’ and select the Type as **Uplink**.
175 175  
176 -== 3.1 Uplink ==
169 +Click on the **TBEL** button if not selected it by default. Delete the existing decoder function in the code editor. Now copy and paste the following decoder function written in **TBEL (ThingsBoard Expression Language)** in to the **code editor**. This decoder function is compatible for both NB and CB series devices.
177 177  
171 +{{code language="JavaScript"}}
172 +/** Decoder **/
178 178  
179 -In the left navigation, click **Integrations center**, and then click **Data converters**.
174 +// decode payload to string
175 +var payloadStr = decodeToString(payload);
176 +var data = JSON.parse(payloadStr);
180 180  
178 +var deviceName = metadata.topic.split("/")[3];
179 +// decode payload to JSON
180 +var deviceType = 'sensor';
181 181  
182 -[[image:data-converters-list-empty.png]]
182 +// Result object with device attributes/telemetry data
183 +var result = {
184 + deviceName: deviceName,
185 + deviceType: deviceType,
186 + attributes: {
187 + integrationName: metadata['integrationName'],
188 + },
189 + telemetry: {
190 + temperature: data.temperature,
191 + humidity: data.humidity,
192 + }
193 +};
183 183  
195 +/** Helper functions 'decodeToString' and 'decodeToJson' are already built-in **/
184 184  
185 -On the **Data converters** page, click on the ‘**+**’ button, and then click on **Create new converter** from the dropdown menu.
197 +return result;
198 +{{/code}}
186 186  
187 187  
201 +Click on the **Add** button.
188 188  
189 -[[image:create-new-converter-menu.png||height="259" width="500"]]
190 190  
191 191  
192 -The **Add data converter** window appears.
205 +[[image:add-uplink-data-converter.png||height="529" width="500"]]
193 193  
194 -Name it ‘**MQTT Uplink Converter**’ and select the Type as **Uplink**.
195 195  
196 -Click on the **TBEL** button if it has not been selected by default.
208 +You should see that the newly added **MQTT Uplink converter **NB/CB is listed on the **Data Converters** page.
197 197  
198 -Replace the default TBEL decoder function with the following universal TBEL decoder function, which decodes MQTT payload from any Dragino NB-IoT device.
210 +[[image:data-converter-list-showing-uplink-dc.png]]
199 199  
200 200  
213 +
214 +== 3.2 Downlink ==
215 +
216 +
217 +On the **Data converters** page, click on the ‘**+**’ button, and then click on the **Create new converter** from the dropdown menu.
218 +
219 +
220 +[[image:create-new-converter-menu.png||width="500"]]
221 +
222 +
223 +
224 +The **Add data converter** window will appear. Name it ‘**MQTT Downlink Converter NB/CB**’ and select the Type as **Downlink**.
225 +
226 +Click on the **TBEL** button if not selected it by default. Now copy and paste the following encoder function written in **TBEL (ThingsBoard Expression Language)** in to the **code editor**. This encoder function is compatible for both NB and CB series devices.
227 +
228 +
201 201  {{code language="JavaScript"}}
202 -// decode payload to JSON
203 -var pattern = "yyyy/MM/dd HH:mm:ss";
204 -var objdata = {};
205 -var obj1 = {};
206 -var data = decodeToJson(payload);
207 -var deviceName = data.IMEI;
208 -data.remove("IMEI");
209 -var modelname = "Dragino "+ data.Model;
210 -//var mod = data.mod
211 -data.remove("Model");
212 -//delete data.mod
213 -var timestamp = new Date().getTime();
214 -foreach (entry: data.entrySet()) {
215 - var key = entry.getKey();
216 - var value = entry.getValue();
217 - //objdata[key] = data[key]
218 - if(key.matches("^-?\\d+$")){ //is number
219 - obj1[key]=data[key];
220 - var index = obj1[key].length-1;
221 - obj1[key][index]=new Date(obj1[key][index],pattern).getTime();
230 +// Encode downlink data from incoming Rule Engine message
231 +
232 +// msg - JSON message payload downlink message json
233 +// msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc.
234 +// metadata - list of key-value pairs with additional data about the message
235 +// integrationMetadata - list of key-value pairs with additional data defined in Integration executing this converter
236 +
237 +/** Encoder **/
238 +
239 +var data = {};
240 +
241 +// Process data from incoming message and metadata
242 +
243 +data.tempFreq = msg.temperatureUploadFrequency;
244 +data.humFreq = msg.humidityUploadFrequency;
245 +
246 +data.devSerialNumber = metadata['ss_serialNumber'];
247 +
248 +// Result object with encoded downlink payload
249 +var result = {
250 +
251 + // downlink data content type: JSON, TEXT or BINARY (base64 format)
252 + contentType: "JSON",
253 +
254 + // downlink data
255 + data: JSON.stringify(data),
256 +
257 + // Optional metadata object presented in key/value format
258 + metadata: {
259 + topic: metadata['deviceType']+'/'+metadata['deviceName']+'/upload'
222 222   }
223 - else if (key==="bat"||key==="BAT"){
224 - objdata["battery"] = data[key];
225 - }
226 - else{
227 - objdata[key] = data[key];
228 -}}
229 -var listdata = [{"ts":timestamp,"values":objdata}];
230 -foreach ( entry1: obj1.entrySet()){
231 - var key1 = entry1.getKey();
232 - var value1 = entry1.getValue();
233 - var index = obj1[key1].length-1;
234 - var ts = obj1[key1][index];
235 - if (modelname=="Dragino RS485-NB"){
236 - listdata.push({"ts":ts,"values":{"Payload":obj1[key1][0]}});
237 - }
238 - else{
239 - listdata.push({"ts":ts,"values":{"values":obj1[key1]}});
240 - }
241 -}
242 - var result = {
243 - deviceName: deviceName,
244 - deviceType: modelname,
245 - attributes: {
246 - model: modelname
247 - //customerName: "NB-CB",
248 - //groupName: "NB-CB",
249 - //integrationName: metadata['integrationName']
250 - },
251 - telemetry: listdata
261 +
252 252  };
263 +
253 253  return result;
254 254  {{/code}}
255 255  
256 256  
257 -Once you modify the decoder function, click on the **Add** button.
268 +Click on the **Add** button.
258 258  
259 259  
260 -[[image:mqtt-uplink-converter.png||height="498" width="500"]]
261 261  
272 +[[image:add-downlink-data-converter.png||height="529" width="500"]]
262 262  
263 263  
264 -You should see that the newly added **MQTT Uplink converter **NB/CB is listed on the **Data Converters** page.
275 +You should see that the newly added **MQTT Downlink** Converter NB/CB is listed on the **Data Converters** page.
265 265  
266 266  
267 -
268 268  [[image:data-converters-list.png]]
269 269  
270 270  
281 +
271 271  = 4. Add Integration =
272 272  
273 273  
... ... @@ -288,15 +288,15 @@
288 288  **Basic settings:**
289 289  
290 290  * **Integration type**: MQTT
291 -* **Name**: MQTT integration
302 +* **Name**: MQTT integration NB/CB
292 292  * **Enable integration**: YES
293 -* **Allow create devices or assets**: YES
304 +* **Allows create devices or assets**: YES
294 294  
295 295  Click **Next** button.
296 296  
297 297  
298 298  
299 -[[image:add-integration-part-1.png||height="483" width="500"]]
310 +[[image:add-integration-basic-settings.png||height="511" width="500"]]
300 300  
301 301  
302 302  **Uplink data converter:**
... ... @@ -308,37 +308,35 @@
308 308  
309 309  
310 310  
311 -[[image:add-integration-part-2.png||height="484" width="500"]]
322 +[[image:add-integration-uplink-data-converter.png||height="511" width="500"]]
312 312  
313 313  
314 314  **Downlink data converter:**
315 315  
316 -Dragino NB/CB devices don't require a downlink data converter to decode their payloads, so you can skip this step.
327 +* Click on the **Select existing** button.
328 +* **Downlink data converter**: Select **MQTT Downlink Converter NB/CB **from the dropdown list.
317 317  
318 -* Click on the **Skip **button in the Downlink data converter section.
330 +Click **Next** button.
319 319  
320 -Click **Skip** button.
321 321  
322 322  
323 -[[image:integration-dl-skip.png||height="511" width="500"]]
334 +[[image:add-integration-downlink-data-converter.png||height="511" width="500"]]
324 324  
325 325  
326 -
327 327  **Connection:**
328 328  
329 -* **Host**: Host URL (Eg, **//011731f7xxxxxxxxxxxfbbedfc63f4.s1.eu.hivemq.cloud//**)
330 -* **Port**: 8883 (the port number may differ based on your MQTT broker)
331 -* **Credentials type**: Basic
339 +* **Host**: Cluster URL (Eg. 011731f7928541588a6cdfbbedfc63f4.s1.eu.hivemq.cloud)
340 +* **Port**: 8883
341 +* **Credentials**: Basic
342 +* **Enable SSL**: YES
332 332  * **Username**: Username (from your HiveMQ Cloud Cluster with your credentials)
333 333  * **Password:** Password (from your HiveMQ Cloud Cluster with your credentials)
334 -* **Enable SSL**: YES
335 -* **Topic**: # (the # symbol indicates that it filters all topics).
345 +* **Topic:** tb/mqtt-integration-tutorial/sensors/+/telemetry (the + replaces any 'device name' and creates devices in the Entities -> Devices)
336 336  * **QoS:** 0-At most once
337 337  
348 +[[image:add-integration-connection.png||height="511" width="500"]]
338 338  
339 -[[image:add-integration-4.png||height="484" width="500"]]
340 340  
341 -
342 342  Click on the **Advanced settings** button.
343 343  
344 344  * **Clean session:** YES
... ... @@ -367,7 +367,7 @@
367 367  
368 368  
369 369  
370 -[[image:integrations-pending.png]]
379 +[[image:new-integration-pending.png]]
371 371  
372 372  
373 373  = 5. Verifying the receipt of data from virtual devices =
... ... @@ -378,92 +378,79 @@
378 378  
379 379  We use the Mosquitto MQTT client to simulate MQTT messages, acting as a virtual device. First, install the Mosquitto client on your computer from [[this link>>url:https://mosquitto.org/download/]]. The Mosquitto client publishes messages to the MQTT broker (HiveMQ) on a specified MQTT topic. ThingsBoard subscribes to these messages using the same topic.
380 380  
381 -The Mosquitto client publishes messages (payloads) to a topic - for example, # or device/ts01-nb. You can, of course, use any topic you prefer.
390 +The Mosquitto client publishes messages on the topic v1/devices/[device_name]/telemetry. The [device_name]placeholder can be replaced with any device name, for example, 'S31B-NB'. Then, the MQTT topic would be v1/devices/S31B-NB/telemetry.
382 382  
392 +On the ThingsBoard side, we configure the MQTT topic subscription as v1/devices/+/telemetry. The + wildcard represents any device name and allows ThingsBoard to automatically create (provision) a device with that name, such as S31B-NB, for example.
383 383  
384 -(% id="cke_bm_37386S" style="display:none" %) (%%)The MQTT payload format is as follows. The **IMEI **and **Model **are mandatory fields. For other fields, you can use any number of key-value pairs.
385 385  
386 -{{code language="none"}}
387 -{"IMEI":"350693903995577", "Model":"TS01-NB", "temperature":30, "humidity":80, "pressure":1005}
388 -{{/code}}
395 +**The new device is created the first time the MQTT topic is received. For subsequent MQTT topics with the same device name, no duplicate devices will be created.**
389 389  
390 390  
391 -== 5.2 Sending messages ==
398 +For example, if you send two MQTT messages with different device names in the topic:
392 392  
400 +1. v1/devices/**S31B-NB**/telemetry
401 +1. v1/devices/**LDS25-NB**/telemetry
393 393  
394 -On your computer's terminal, issue the following MQTT command, which simulates the device named '**350693903995577'**. The message payload contains the fields IMEI, Model, temperature, humidity, and pressure, which hold the values 350693903995577,  TS01-NB, 30, 80, and 1005 respectively. This payload is also (technically) known as telemetry.
403 +ThingsBoard will create two devices named **S31B-NB** and **LDS25-NB** in the **//Devices//** section.
395 395  
405 +
406 +The MQTT payload format is as follows, which is common for all ~-~-NB and ~-~-CB series devices:
407 +
396 396  {{code language="none"}}
397 -mosquitto_pub -d -q 1 -h 011731f7928xxxxx.s1.eu.hivemq.cloud -p 8883 -u "xxxxx" -P "xxxxx" -t "device/350693903995577" -m '{"IMEI":"350693903995577", "Model":"TS01-NB", "temperature":30, "humidity":80, "pressure":1005}'
409 +{"temperature":10.4, "humidity":85}
398 398  {{/code}}
399 399  
400 -If the integration was performed without errors, a new device named **350693903995577 **is created in the **Devices **section.
401 401  
413 +== 5.2 Sending messages ==
402 402  
403 -[[image:new-device-1.png]]
404 404  
416 +On the terminal, issue the following MQTT command which simulates the device S31B-NB. The message payload contains the fields temperature and humidity, which hold the values 10.4 and 85, respectively. This payload is also (technically) known as telemetry.
405 405  
406 -The status of the integration also changes to '**Active**' after the first telemetry transmission.
418 +{{code language="none"}}
419 +mosquitto_pub -d -q 1 -h 011731f7928xxxxx.s1.eu.hivemq.cloud -p 8883 -t "tb/mqtt-integration-tutorial/sensors/S31B-NB/telemetry" -u "xxxxx" -P "xxxxx" -m '{"temperature":10.4, "humidity":85}'
420 +{{/code}}
407 407  
422 +If the integration was performed without errors, the status of the integration changes to 'Active' after the first telemetry transmission.
408 408  
409 -[[image:Screenshot 2025-04-21 122154.png]]
410 410  
425 +[[image:integration-active.png]]
411 411  
412 412  
413 -**When ThingsBoard receives this message for the first time, it will automatically create a new device named '350693903995577' in the Devices section. The device name is based on the IMEI number. For subsequent messages with the same IMEI, no duplicate devices will be created. Each new IMEI number will result in a unique entry in the Devices section, representing a physical device.**
428 +Also, a new device named **S31B-NB** will appear under **//Entities -> Devices -> All//**. This means the first MQTT message triggers ThingsBoard to provision a device named **S31B-NB**.
414 414  
415 415  
416 -== 5.3 Viewing messages ==
431 +[[image:device-provision-1.png]]
417 417  
418 418  
419 -Go back to the **Integrations** page.
434 +Click on the device S31B-NB on the devices list to see its details.
420 420  
421 -Click on the **MQTT integration NB/CB** in the **Integrations** page to see its details.
436 +Then go to the **Latest telemetry** tab.
422 422  
423 -Click on the **Edit** button (//**pen icon**//).
438 +You can see the fields temperature and humidity with the values you previously sent using the MQTT message.
424 424  
425 -Click on the **Disabled** button in the upper-right corner.
426 426  
427 -Turn on the **All messages (15 min)** option. This will enable displaying all messages in the **Events** tab. This setting will expire in 15 minutes, and you will need to repeat the same steps if you want to view the messages in the Events tab later.
441 +[[image:telemetry-1.png]]
428 428  
429 -Click on the **Apply** button.
430 430  
431 -Then click on the **Apply changes** (//**tick icon**//) button.
444 +Now, change the values of the fields and send the MQTT message again. For example, set temperature to 20 and humidity to 70. Observe how the values update in //Latest Telemetry//.
432 432  
433 433  
434 -[[image:debug-enabled.png||height="301" width="700"]]
447 +[[image:telemetry-2.png]]
435 435  
436 436  
450 +Let's provision the second device named **LDS25-NB **with initial telemetry. Use the following MQTT message.
437 437  
438 438  
439 -Now go to the **Events** tab.
440 -
441 -Select the **Event type** as **Debug** from the dropdown list.
442 -
443 -Publish another message (of course, you can repeat the previous message by pressing the UP arrow on your keyboard and then press Enter key) to your MQTT broker from your terminal, for example:
444 -
445 445  {{code language="none"}}
446 -mosquitto_pub -d -q 1 -h 011731f7928xxxxx.s1.eu.hivemq.cloud -p 8883 -u "xxxxx" -P "xxxxx" -t "device/a" -m '{"IMEI":"350693903995577", "temperature":30, "humidity":80, "pressure":1005}'
454 +mosquitto_pub -d -q 1 -h 011731f7928541588a6cdfbbedfc63f4.s1.eu.hivemq.cloud -p 8883 -t "tb/mqtt-integration-tutorial/sensors/LDS25-NB/telemetry" -u "pradeeka" -P "Kalpani123@" -m '{"temperature":11, "humidity":87}'
447 447  {{/code}}
448 448  
449 -Now you can see that uplink message in the **Events** tab (Click the **refresh** button if you didn't see any messages in the Events tab). The status should be **OK **if there is no errors in your integration.
457 +Now, refresh the **Devices** page, and you will see the second device, **LDS25-NB**, which was recently provisioned.
450 450  
451 451  
452 -[[image:Screenshot 2025-03-26 at 19.49.31.png]]
460 +[[image:device-provision-2.png]]
453 453  
454 454  
455 -
456 -Then click on the **three dots (...)** in the **Message** column. You can see the uplink message's **payload** in the **Message** window.
457 -
458 -
459 -[[image:Screenshot 2025-03-26 at 19.47.52.png]]
460 -
461 -
462 -
463 -
464 -Now, you have successfully tested your integration with a simulated uplink payload and verified that it is received by ThingsBoard, and the device is provisioned.
465 -
466 -
467 467  = 6. Creating a Dashboard =
468 468  
469 469  ThingsBoard **Dashboards** provide a powerful way to visualize and monitor real-time and historical data from connected devices. They allow users to create interactive, customizable panels displaying telemetry data, device status, and other key metrics. With a variety of widgets, including charts, maps, and tables, dashboards help users gain insights, track trends, and manage IoT deployments efficiently.
... ... @@ -472,11 +472,6 @@
472 472  This section guides you on how to create a dashboard to display temperature and humidity data from the device on a time-series chart. You may also use other widgets in ThingsBoard to display data according to your requirements.
473 473  
474 474  
475 -First simulate a few messages using MQTT. This time, we have added the 'humidity' field to the payload. Eg:
476 -
477 -{{code language="none"}}mosquitto_pub -d -q 1 -h 011731f7928xxxxx.s1.eu.hivemq.cloud -p 8883 -u "xxxxx" -P "xxxxx" -t "device/a" -m '{"IMEI":"350693903995577", "temperature":22, "humidity":80, "pressure":1005}'{{/code}}
478 -
479 -
480 480  In **ThingsBoard**, from the left navigation menu, click **Dashboards**. Then, click the **+** button and select **Create new dashboard** from the dropdown menu.
481 481  
482 482  
... ... @@ -512,19 +512,15 @@
512 512  
513 513  Configure the **Time series chart** widget as follows:
514 514  
515 -* **Datasource** - select **Device A** device you provisioned.
506 +* **Datasource** - select S31B-NB device you provisioned.
516 516  * **Series**:
517 517  ** **temperature** - you can see this key by default.
518 518  ** **humidity** - Click **Add series** button. Then add the **humidity** for the key and then type **%** as its unit.
519 519  * Click on the **Add** button.
520 520  
521 -{{info}}
522 -You can add only the relevant fields from the device's payload to display data on a widget. These fields are called 'keys'.
523 -{{/info}}
512 +[[image:timeseries-1.png||height="491" width="700"]]
524 524  
525 -[[image:Screenshot 2025-03-31 at 06.51.15.png||height="485" width="700"]]
526 526  
527 -
528 528  The time-series chart will appear in edit mode. Resize it by clicking and dragging the lower-right corner.
529 529  
530 530  Click the **Save** button to add the widget to the dashboard.
... ... @@ -537,11 +537,12 @@
537 537  
538 538  
539 539  {{code language="none"}}
540 -mosquitto_pub -d -q 1 -h 011731f7928xxxxx.s1.eu.hivemq.cloud -p 8883 -u "xxxxx" -P "xxxxx" -t "device/a" -m '{"IMEI":"350693903995577", "temperature":22, "humidity":70, "pressure":1005}'
527 +mosquitto_pub -d -q 1 -h 011731f7928xxxxx.s1.eu.hivemq.cloud -p 8883 -t "tb/mqtt-integration-tutorial/sensors/S31B-NB/telemetry" -u "xxxxx" -P "xxxxx" -m '{"temperature":20, "humidity":70}'
541 541  
542 -mosquitto_pub -d -q 1 -h 011731f7928xxxxx.s1.eu.hivemq.cloud -p 8883 -u "xxxxx" -P "xxxxx" -t "device/a" -m '{"IMEI":"350693903995577", "temperature":27, "humidity":72, "pressure":1005}'
529 +mosquitto_pub -d -q 1 -h 011731f7928xxxxx.s1.eu.hivemq.cloud -p 8883 -t "tb/mqtt-integration-tutorial/sensors/S31B-NB/telemetry" -u "xxxxx" -P "xxxxx" -m '{"temperature":22, "humidity":71}'
543 543  
544 -mosquitto_pub -d -q 1 -h 011731f7928xxxxx.s1.eu.hivemq.cloud -p 8883 -u "xxxxx" -P "xxxxx" -t "device/a" -m '{"IMEI":"350693903995577", "temperature":19, "humidity":80, "pressure":1005}'
531 +mosquitto_pub -d -q 1 -h 011731f7928xxxxx.s1.eu.hivemq.cloud -p 8883 -t "tb/mqtt-integration-tutorial/sensors/S31B-NB/telemetry" -u "xxxxx" -P "xxxxx" -m '{"temperature":18, "humidity":79}'
532 +
545 545  {{/code}}
546 546  
547 547  The chart will update with the values in realtime, as shown in the below image.
... ... @@ -550,10 +550,10 @@
550 550  [[image:timeseries-4.png||height="316" width="700"]]
551 551  
552 552  
553 -= 8. Configure Physical NB-IoT Sensor =
541 += 7. Configure NB-IoT Sensor =
554 554  
555 555  
556 -Now, let's experiment with sending data to ThingsBoard using a real NB-IoT device. For example, we will use the **TS01-NB**.
544 +Now, let's experiment with sending data to ThingsBoard using a real NB-IoT device. For example, we will use the **S31B-NB**.
557 557  
558 558  First, configure the NB-IoT device with the necessary MQTT settings using AT commands. Below is a list of AT commands you can use.
559 559  
... ... @@ -561,8 +561,8 @@
561 561  **AT Commands**
562 562  
563 563  * **AT+PRO=3,3    **~/~/ Use MQTT to connect to ThingsBoard. Payload Type set to 3.
564 -* **AT+SUBTOPIC=<MQTT subscribe topic> Eg: TS01-NB**
565 -* **AT+PUBTOPIC=<MQTT publish topic> Eg: TS01-NB**
552 +* **AT+SUBTOPIC=<MQTT topic>**
553 +* **AT+PUBTOPIC=<MQTT topic>**
566 566  * **AT+CLIENT=null**
567 567  * **AT+UNAME=<MQTT Username>**
568 568  * **AT+PWD=<MQTT Password>**
... ... @@ -569,10 +569,3 @@
569 569  * **AT+SERVADDR=<Broker address, Port>**
570 570  
571 571  Test your uplink by pressing the ACT button for 1 second.
572 -
573 -
574 -
575 -The following image shows the uplink payload of a real Dragino device. The publish topic is '**TS01-NB' that contains fields in the payload, IMEI, IMSI, Model, temperature, etc**. Note that we have created a device named **TS01-NB** in the **Devices** section in advance.
576 -
577 -
578 -[[image:image-4.png]]
Screenshot 2025-03-16 at 18.38.59.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.pradeeka
Size
... ... @@ -1,1 +1,0 @@
1 -221.2 KB
Content
Screenshot 2025-03-16 at 18.39.12.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.pradeeka
Size
... ... @@ -1,1 +1,0 @@
1 -211.9 KB
Content
Screenshot 2025-03-18 at 09.23.10.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.pradeeka
Size
... ... @@ -1,1 +1,0 @@
1 -78.7 KB
Content
Screenshot 2025-03-26 at 18.15.08.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.pradeeka
Size
... ... @@ -1,1 +1,0 @@
1 -92.2 KB
Content
Screenshot 2025-03-26 at 19.47.52.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.pradeeka
Size
... ... @@ -1,1 +1,0 @@
1 -168.4 KB
Content
Screenshot 2025-03-26 at 19.49.31.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.pradeeka
Size
... ... @@ -1,1 +1,0 @@
1 -133.0 KB
Content
Screenshot 2025-03-31 at 06.51.15.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.pradeeka
Size
... ... @@ -1,1 +1,0 @@
1 -179.5 KB
Content
Screenshot 2025-04-21 122154.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.pradeeka
Size
... ... @@ -1,1 +1,0 @@
1 -21.2 KB
Content
Screenshot 2025-04-21 122936.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.pradeeka
Size
... ... @@ -1,1 +1,0 @@
1 -72.0 KB
Content
add-integartion-connection.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.pradeeka
Size
... ... @@ -1,1 +1,0 @@
1 -110.3 KB
Content
add-integartion-connetcion.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.pradeeka
Size
... ... @@ -1,1 +1,0 @@
1 -146.0 KB
Content
add-integration-4.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.pradeeka
Size
... ... @@ -1,1 +1,0 @@
1 -63.1 KB
Content
add-integration-basic-settings.png
Size
... ... @@ -1,1 +1,1 @@
1 -123.8 KB
1 +122.5 KB
Content
add-integration-connection.png
Size
... ... @@ -1,1 +1,1 @@
1 -158.1 KB
1 +124.4 KB
Content
add-integration-part-1.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.pradeeka
Size
... ... @@ -1,1 +1,0 @@
1 -48.6 KB
Content
add-integration-part-2.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.pradeeka
Size
... ... @@ -1,1 +1,0 @@
1 -47.7 KB
Content
add-integration-ul-data-converter.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.pradeeka
Size
... ... @@ -1,1 +1,0 @@
1 -121.2 KB
Content
data-converters-list.png
Size
... ... @@ -1,1 +1,1 @@
1 -19.0 KB
1 +212.2 KB
Content
debug-enabled.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.pradeeka
Size
... ... @@ -1,1 +1,0 @@
1 -196.3 KB
Content
device-1.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.pradeeka
Size
... ... @@ -1,1 +1,0 @@
1 -34.5 KB
Content
image-4.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.pradeeka
Size
... ... @@ -1,1 +1,0 @@
1 -96.0 KB
Content
integration-active.png
Size
... ... @@ -1,1 +1,1 @@
1 -64.1 KB
1 +64.2 KB
Content
integration-added.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.pradeeka
Size
... ... @@ -1,1 +1,0 @@
1 -196.2 KB
Content
integration-dl-skip.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.pradeeka
Size
... ... @@ -1,1 +1,0 @@
1 -105.5 KB
Content
integrations-pending.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.pradeeka
Size
... ... @@ -1,1 +1,0 @@
1 -19.8 KB
Content
mqtt-uplink-converter.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.pradeeka
Size
... ... @@ -1,1 +1,0 @@
1 -75.3 KB
Content
mqtt-uplink.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.pradeeka
Size
... ... @@ -1,1 +1,0 @@
1 -175.1 KB
Content
new-device-1.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.pradeeka
Size
... ... @@ -1,1 +1,0 @@
1 -34.7 KB
Content
new-device.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.pradeeka
Size
... ... @@ -1,1 +1,0 @@
1 -143.3 KB
Content
ul-data-converter-added.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.pradeeka
Size
... ... @@ -1,1 +1,0 @@
1 -189.4 KB
Content
ul-data-converter-device-a.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.pradeeka
Size
... ... @@ -1,1 +1,0 @@
1 -168.3 KB
Content