<
From version < 193.1 >
edited by Dilisi S
on 2025/03/27 23:31
To version < 196.1 >
edited by Dilisi S
on 2025/03/31 12:46
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -164,13 +164,16 @@
164 164  [[image:ins1.png||height="310" width="500"]]
165 165  
166 166  
167 -= 3. Creating Devices =
167 += 3. Creating Devices (Optional) =
168 168  
169 +{{info}}
170 +**The following procedure is optional. If you haven't created any device in ThingsBoard first, ThingsBoard will automatically create a device for you based on the integration settings (the device name defined in the uplink decoder) just after it receives the first uplink from your device.Type your information message here.**
171 +{{/info}}
169 169  
170 170  First, you need to create devices in ThingsBoard to represent your physical devices. For example, you can name it **Device A**, and the second device could be **Device B** or any name you prefer. The device name should be unique within the **Devices** space.
171 171  
172 172  
173 -In the left navigation, click Entities -> Devices.
176 +In the left navigation, click **Entities -> Devices**.
174 174  
175 175  Click the **Add Device** button (the button with the **+** sign), and from the dropdown menu, click **Add new device**.
176 176  
... ... @@ -364,7 +364,6 @@
364 364  * **Topic: device/a** (The topic can be anything; you can even use just the device name.)
365 365  * **QoS:** 0-At most once
366 366  
367 -
368 368  [[image:add-integartion-connection.png||height="505" width="500"]]
369 369  
370 370  
... ... @@ -494,7 +494,7 @@
494 494  
495 495  First simulate a few messages using MQTT. This time, we have added the 'humidity' field to the payload. Eg:
496 496  
497 -{{code language="none"}}mosquitto_pub -d -q 1 -h 011731f7928xxxxx.s1.eu.hivemq.cloud -p 8883 -t "v1/devices/me/telemetry" -u "xxxxx" -P "xxxxx" -m '{"IMEI": "S31B-NB", "temperature": 22, "humidity":80}'{{/code}}
499 +{{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}}
498 498  
499 499  
500 500  In **ThingsBoard**, from the left navigation menu, click **Dashboards**. Then, click the **+** button and select **Create new dashboard** from the dropdown menu.
... ... @@ -532,7 +532,7 @@
532 532  
533 533  Configure the **Time series chart** widget as follows:
534 534  
535 -* **Datasource** - select S31B-NB device you provisioned.
537 +* **Datasource** - select **Device A** device you provisioned.
536 536  * **Series**:
537 537  ** **temperature** - you can see this key by default.
538 538  ** **humidity** - Click **Add series** button. Then add the **humidity** for the key and then type **%** as its unit.
... ... @@ -553,12 +553,11 @@
553 553  
554 554  
555 555  {{code language="none"}}
556 -mosquitto_pub -d -q 1 -h 011731f7928xxxxx.s1.eu.hivemq.cloud -p 8883 -t "v1/devices/me/telemetry" -u "xxxxx" -P "xxxxx" -m '{"IMEI": "S31B-NB", "temperature": 22, "humidity":70}'
558 +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}'
557 557  
558 -mosquitto_pub -d -q 1 -h 011731f7928xxxxx.s1.eu.hivemq.cloud -p 8883 -t "v1/devices/me/telemetry" -u "xxxxx" -P "xxxxx" -m '{"IMEI": "S31B-NB", "temperature": 27, "humidity":72}'
560 +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}'
559 559  
560 -mosquitto_pub -d -q 1 -h 011731f7928xxxxx.s1.eu.hivemq.cloud -p 8883 -t "v1/devices/me/telemetry" -u "xxxxx" -P "xxxxx" -m '{"IMEI": "S31B-NB", "temperature": 19, "humidity":80}'
561 -
562 +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}'
562 562  {{/code}}
563 563  
564 564  The chart will update with the values in realtime, as shown in the below image.
... ... @@ -589,7 +589,7 @@
589 589  
590 590  
591 591  
592 -The following image shows the uplink payload of a real Dragino device. The publish topic is **TS01-NB**, and the device name is **861275077962896**, which is represented by the **IMEI**.
593 +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.
593 593  
594 594  {{info}}
595 595  The ThingsBoard uses the device's IMEI number included in the payload to create a device in the Devices section.
Copyright ©2010-2024 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0