Last modified by Alec Chen on 2025/04/02 18:03

From version 2.1
edited by Alec Chen
on 2025/04/02 14:49
Change comment: There is no comment for this version
To version 7.1
edited by Alec Chen
on 2025/04/02 17:18
Change comment: There is no comment for this version

Summary

Details

Page properties
Title
... ... @@ -1,1 +1,1 @@
1 -How to integrating Dragino -NB and -CB series devices data with Thingseye
1 +How to Uplink -NB and -CB series devices data by MQTT with Thingseye
Content
... ... @@ -12,132 +12,22 @@
12 12  
13 13  To complete this tutorial, you need to have certificate files. [[lns1.thingseye.io>>url: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.
14 14  
15 -If customers need to use this MQTT connection with Thingseye, they need to contact the TE team to obtain three license files.
15 +If customers need to use this MQTT connection with Thingseye, they need to contact TE team to obtain three license files or click this [[link>>url:https://www.dropbox.com/scl/fo/d5s1wf36f4syv30a8laup/AK8FjVpNXYXCWodRnnQ1Hig?rlkey=jrz1ip0f0xwwq5z2m2gu1tuij&e=1&st=kl4caub0&dl=0]] to download the certificates..
16 16  
17 17  [[image:https://wiki.dragino.com/xwiki/bin/download/Main/ThingsBoard/ins1.png?width=500&height=310&rev=1.1||alt="ins1.png" height="310" width="500"]]
18 18  
19 19  
20 -= 3. Creating Devices (Optional) =
20 += (% style="color:#333333; font-family:inherit; font-size:max(23px, min(29px, 12.3333px + 1.38889vw))" %)3. Configure Thingseye's Integration(%%) =
21 21  
22 -**The following procedure is optional. If you haven't created any device in Thingseye first, Thingseye 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.**
22 +== 3.1 Creat new MQTT integration ==
23 23  
24 -First, you need to create devices in Thingseye 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.
25 -
26 -In the left navigation, click **Entities -> Devices**.
27 -
28 -Click the **Add Device** button (the button with the **+** sign), and from the dropdown menu, click **Add new device**.
29 -
30 -In the **Add new device** dialog box, enter the device name in the **Name** text box. For example, we will use **Device A**.
31 -
32 -Click the **Add** button.
33 -
34 -Skip the **connectivity testing** by clicking the **Close** button.
35 -
36 -The device is created and listed on the **Devices** page. Note that its initial state is **Inactive** because it has not received any data yet.
37 -
38 -= 4. Data Converters =
39 -
40 -In **Thingseye**, **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 Thingseye can understand, or vice versa.
41 -
42 -== 4.1 Uplink ==
43 -
44 -In the left navigation, click **Integrations center**, and then click **Data converters**.
45 -
46 -[[image:https://wiki.dragino.com/xwiki/bin/download/Main/ThingsBoard/data-converters-list-empty.png?rev=1.1||alt="data-converters-list-empty.png"]]
47 -
48 -On the **Data converters** page, click on the ‘**+**’ button, and then click on the **Create new converter** from the dropdown menu.
49 -
50 -[[image:https://wiki.dragino.com/xwiki/bin/download/Main/ThingsBoard/create-new-converter-menu.png?width=500&height=259&rev=1.1||alt="create-new-converter-menu.png"]]
51 -
52 -The **Add data converter** window will appear.
53 -
54 -Let's create an uplink data converter for the device named '**Device A**'. Name it ‘**MQTT Uplink Converter - Device A**’ and select the Type as **Uplink**.
55 -
56 -Click on the **TBEL** button if it has not been selected by default.
57 -
58 -Modify the default TBEL function to match with your device as described below:
59 -
60 -* Uncomment** line 11**:
61 -
62 -//var data = decodeToJson(payload)//
63 -
64 -* **Line 13**: Assign your device name to the **deviceName** field. - We used **Device A** as it is to match with our device, **Device A **in the Devices section.
65 -* From **line 38**: Modify the telemetry section to allow parsed data to be assigned to the fields.
66 -
67 -//telemetry: {
68 - temperature: data.temperature,
69 - humidity: data.humidity,
70 - rawData: payloadStr
71 - }//
72 -
73 -The modified uplink decoder function to match with **Device A** is shown below.
74 -
75 -{{code language="nono"}}
76 -// Decode an uplink message from a buffer
77 -// payload - array of bytes
78 -// metadata - key/value object
79 -
80 -/** Decoder **/
81 -
82 -// decode payload to string
83 -var payloadStr = decodeToString(payload);
84 -
85 -// decode payload to JSON
86 -var data = decodeToJson(payload);
87 -
88 -var deviceName = 'Device A';
89 -var deviceType = 'thermostat';
90 -var customerName = 'Customer C';
91 -var groupName = 'thermostat devices';
92 -var manufacturer = 'Example corporation';
93 -// use assetName and assetType instead of deviceName and deviceType
94 -// to automatically create assets instead of devices.
95 -// var assetName = 'Asset A';
96 -// var assetType = 'building';
97 -
98 -// Result object with device/asset attributes/telemetry data
99 -var result = {
100 -// Use deviceName and deviceType or assetName and assetType, but not both.
101 -  deviceName: deviceName,
102 -   deviceType: deviceType,
103 -// assetName: assetName,
104 -// assetType: assetType,
105 -// customerName: customerName,
106 -  groupName: groupName,
107 -   attributes: {
108 -       model: 'Model A',
109 -       serialNumber: 'SN111',
110 -       integrationName: metadata['integrationName'],
111 -       manufacturer: manufacturer
112 -   },
113 -   telemetry: {
114 -       temperature: data.temperature,
115 -       humidity: data.humidity,
116 -       rawData: payloadStr
117 -   }
118 -};
119 -
120 -/** Helper functions 'decodeToString' and 'decodeToJson' are already built-in **/
121 -
122 -return result;
123 -{{/code}}
124 -
125 -Once you modify the decoder function, click on the **Add** button.
126 -
127 -[[image:https://wiki.dragino.com/xwiki/bin/download/Main/ThingsBoard/ul-data-converter-device-a.png?width=500&height=524&rev=1.1||alt="ul-data-converter-device-a.png"]]
128 -
129 -You should see that the newly added **MQTT Uplink converter **NB/CB is listed on the **Data Converters** page.
130 -
131 -[[image:https://wiki.dragino.com/xwiki/bin/download/Main/ThingsBoard/ul-data-converter-added.png?height=257&rev=1.1||alt="ul-data-converter-added.png"]]
132 -
133 -= 5. Add Integration =
134 -
135 135  In the left navigation, click **Integrations center**, and then click **Integrations**.
136 136  
137 -[[image:https://wiki.dragino.com/xwiki/bin/download/Main/ThingsBoard/integrations-list-empty.png?rev=1.1||alt="integrations-list-empty.png"]]
138 -
139 139  On the **Integrations** page, click on the '**+**' button.
140 140  
28 +[[image:1743578691561-822.png]]
29 +
30 +
141 141  The **Add integration** window appears.
142 142  
143 143  In the **Add integration** window, configure the following settings:
... ... @@ -145,222 +145,151 @@
145 145  **Basic settings:**
146 146  
147 147  * **Integration type**: MQTT
148 -* **Name**: MQTT integration - Device A
38 +* **Name**: MQTT integration
149 149  * **Enable integration**: YES
40 +* **Debug mode**:YES
150 150  * **Allows create devices or assets**: YES
151 151  
152 152  Click **Next** button.
153 153  
154 -[[image:https://wiki.dragino.com/xwiki/bin/download/Main/ThingsBoard/add-integration-basic-settings.png?width=500&height=504&rev=1.2||alt="add-integration-basic-settings.png"]]
45 +[[image:1743578960106-916.png||height="549" width="547"]]
155 155  
156 -**Uplink data converter:**
157 157  
158 -* Click on the **Select existing** button.
159 -* **Uplink data converter**: Select **MQTT Uplink Converter NB/CB **from the dropdown list.
48 +**Uplink/downlink  data converter:**
160 160  
50 +* (((
51 +Next, directly select to create a new Uplink data converter .
52 +)))
53 +
161 161  Click **Next** button.
162 162  
163 -[[image:https://wiki.dragino.com/xwiki/bin/download/Main/ThingsBoard/add-integration-ul-data-converter.png?width=500&height=505&rev=1.1||alt="add-integration-ul-data-converter.png"]]
56 +[[image:1743581191958-140.png||height="547" width="543"]]
164 164  
165 -**Downlink data converter:**
166 166  
167 -Dragino NB/CB devices don't require a downlink data converter to decode their payloads, so you can skip this step.
168 168  
169 -* Click on the **Skip **button in the Downlink data converter section.
60 +**Downlink data converter:**
170 170  
62 +* Next, directly select to create a new Uplink data converter .
63 +
171 171  Click **Skip** button.
172 172  
173 -[[image:https://wiki.dragino.com/xwiki/bin/download/Main/ThingsBoard/integration-dl-skip.png?width=500&height=511&rev=1.1||alt="integration-dl-skip.png"]]
66 +[[image:1743581287837-189.png||height="547" width="542"]]
174 174  
68 +
175 175  **Connection:**
176 176  
177 -* **Host**: Host URL (Eg. **//011731f7xxxxxxxxxxxfbbedfc63f4.s1.eu.hivemq.cloud//**)
71 +* **Host**: [[lns1.thingseye.io>>url:http://lns1.thingseye.io/]]
178 178  * **Port**: 8883
179 -* **Credentials type**: Basic
180 -* **Username**: Username (from your HiveMQ Cloud Cluster with your credentials)
181 -* **Password:** Password (from your HiveMQ Cloud Cluster with your credentials)
73 +* **Credentials **: PEM(Paste 3 certificates to boxs below)Click this [[link>>url:https://www.dropbox.com/scl/fo/d5s1wf36f4syv30a8laup/AK8FjVpNXYXCWodRnnQ1Hig?rlkey=jrz1ip0f0xwwq5z2m2gu1tuij&e=1&st=kl4caub0&dl=0]] to download the certificates.
74 +* **Password:** Password or nothng
182 182  * **Enable SSL**: YES
183 -* **Topic: device/a** (The topic can be anything; you can even use just the device name.)
184 -* **QoS:** 0-At most once
76 +* **Topic: ** **It needs to align with the device's topic.**
77 +* **QoS:** 0-At most once or an MQTT QoS level
185 185  
186 -[[image:https://wiki.dragino.com/xwiki/bin/download/Main/ThingsBoard/add-integartion-connection.png?width=500&height=505&rev=1.1||alt="add-integartion-connection.png"]]
79 +Click **Skip** button.
187 187  
188 -Click on the **Advanced settings** button.
81 +[[image:1743579352961-586.png||height="507" width="502"]]
189 189  
190 -* **Clean session:** YES
191 -* **Retained**: YES
83 +[[image:1743584347047-327.png]]
192 192  
193 -[[image:https://wiki.dragino.com/xwiki/bin/download/Main/ThingsBoard/add-integration-connection-advanced-settings.png?width=500&height=510&rev=1.2||alt="add-integration-connection-advanced-settings.png"]]
194 194  
195 -Click on the **Check connection** button to verify the MQTT connection using the provided parameters.
196 -
197 -[[image:https://wiki.dragino.com/xwiki/bin/download/Main/ThingsBoard/check-connection.png?width=300&height=83&rev=1.1||alt="check-connection.png"]]
198 -
199 -If the connection is successful, you will see the **Connected** message. If not, check your connection parameters again.
200 -
201 -[[image:https://wiki.dragino.com/xwiki/bin/download/Main/ThingsBoard/connection-success.png?width=500&height=511&rev=1.1||alt="connection-success.png"]]
202 -
203 203  Click on the **Add** button.
204 204  
205 205  You should see that the newly added integration is listed on the **Integrations** page.
206 206  
207 -Since we haven't received data from a device yet, the integration **Status** is shown as **Pending.**
90 +Since we haven't received data from a device yet, the integration **Status** is shown as **Pending,  Active  instead if it have.**
208 208  
209 -[[image:https://wiki.dragino.com/xwiki/bin/download/Main/ThingsBoard/integration-added.png?rev=1.1||alt="integration-added.png"]]
92 +[[image:1743580606618-281.png||height="495" width="504"]]
210 210  
211 -= 6. Verifying the receipt of data from virtual devices =
212 212  
213 -== 6.1 How does it work? ==
95 += 4. Configure Thingseye's Data Converters =
214 214  
215 -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.
97 +First, you need to download the [[**MQTT uplink/downlink JS** **code**>>url:https://www.dropbox.com/scl/fo/d5s1wf36f4syv30a8laup/AK8FjVpNXYXCWodRnnQ1Hig?rlkey=jrz1ip0f0xwwq5z2m2gu1tuij&e=1&st=kl4caub0&dl=0]].
216 216  
217 -The Mosquitto client publishes messages (payloads) on the topic **/device/a**. Of course, you can use any topic for testing.
99 +In **Thingseye**, **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 Thingseye can understand, or vice versa.
218 218  
219 -The MQTT payload format is as follows:
101 +== 4.1 Uplink ==
220 220  
221 -{{code language="none"}}
222 -{"IMEI": "350693903995577", "temperature":25, "humidity":80, "pressure":1005}
223 -{{/code}}
103 +* **Uplink Converter**
224 224  
225 -Once Thingseye receives this message, it forwards this payload to the matching device through the integration.
105 +The purpose of the decoder function ito parsthincoming data and metadata to a format that ThingsBoard can consume.
226 226  
227 -== 5.2 Sending messages ==
107 +Go to the **Integrations center** -> **Data converters** page, and find that MQTT uplink converter that was newly created when the integration was created.
228 228  
229 -On your computer's terminal, issue the following MQTT command which simulates the device '**Device A'**. The message payload contains the fields IMEI, temperature, humidity, and pressure, which hold the values 350693903995577, 30, 80, and 1005 respectively. This payload is also (technically) known as telemetry.
109 +[[image:1743581830822-223.png]]
230 230  
231 -{{code language="none"}}
232 -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}'
233 -{{/code}}
234 234  
235 -If the integration was performed without errors, the status of the integration changes to 'Active' after the first telemetry transmission.
112 +Enter edit mode and apply **MQTT uplink JS code** to this uplink converter.
236 236  
237 -[[image:https://wiki.dragino.com/xwiki/bin/download/Main/ThingsBoard/integration-active.png?rev=1.2||alt="integration-active.png"]]
114 +[[image:1743581965585-763.png]]
238 238  
239 -== 6.3 Viewing messages ==
240 240  
241 -Go back to the **Integrations** page.
117 +== 4.2 Downlink ==
242 242  
243 -Click on the **MQTT integration NB/CB** in the **Integrations** page to see its details.
119 +* (((
120 +**Downlink Converter**
121 +)))
244 244  
245 -Click on the **Edit** button (//**pen icon**//).
123 +Go to the **Integrations center** -> **Data converters** page, and find that MQTT downlink converter that was newly created when the integration was created.
246 246  
247 -Click on the **Disabled** button in the upper-right corner.
248 248  
249 -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.
126 +Enter edit mode and apply **MQTT downlink JS code** to this downlink converter.
250 250  
251 -Click on the **Apply** button.
128 +[[image:1743582084494-111.png]]
252 252  
253 -Then click on the **Apply changes** (//**tick icon**//) button.
254 254  
255 -[[image:https://wiki.dragino.com/xwiki/bin/download/Main/ThingsBoard/debug-enabled.png?width=700&height=301&rev=1.1||alt="debug-enabled.png"]]
131 +== 4.3 Simulate with MQTT.fx ==
256 256  
257 -Now go to the **Events** tab.
133 +[[image:https://wiki.dragino.com/xwiki/bin/download/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/WebHome/image-20241126191118-18.png?width=835&height=605&rev=1.1||alt="image-20241126191118-18.png"]]
258 258  
259 -Select the **Event type** as **Debug** from the dropdown list.
135 +[[image:https://wiki.dragino.com/xwiki/bin/download/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/WebHome/image-20241126193252-25.png?width=803&height=663&rev=1.1||alt="image-20241126193252-25.png"]]
260 260  
261 -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:
262 262  
263 -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}'
138 += 5. Configure Physical NB-IoT Sensor =
264 264  
265 -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.
140 +First you need to configure the certificate to the -NB node. Follow the instructions in this **[[link>>url:https://wiki.dragino.com/xwiki/bin/view/Dragino%20NB%20device%20connection%20to%20AWS%20platform%20instructions/#H4.1.2Configurecertificate]]** to configure the certificate.
266 266  
267 -[[image:https://wiki.dragino.com/xwiki/bin/download/Main/ThingsBoard/Screenshot%202025-03-26%20at%2019.49.31.png?rev=1.1||alt="Screenshot 2025-03-26 at 19.49.31.png"]]
142 +Screenshot of successful certificate configuration:
268 268  
269 -Then click on the **three dots (...)** in the **Message** column. You can see the uplink message's **payload** in the **Message** window.
144 +* Configuring the CA Certificate
270 270  
271 -[[image:https://wiki.dragino.com/xwiki/bin/download/Main/ThingsBoard/Screenshot%202025-03-26%20at%2019.47.52.png?rev=1.1||alt="Screenshot 2025-03-26 at 19.47.52.png"]]
146 +[[image:https://wiki.dragino.com/xwiki/bin/download/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/WebHome/image-20241126192009-19.png?width=697&height=431&rev=1.1||alt="image-20241126192009-19.png" height="431" width="697"]]
272 272  
273 -Now, you have successfully tested your integration with a simulated uplink payload and verified that it is received by Thingseye, and the device is provisioned.
148 +[[image:https://wiki.dragino.com/xwiki/bin/download/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/WebHome/image-20241126192130-21.png?width=694&height=426&rev=1.1||alt="image-20241126192130-21.png" height="426" width="694"]]
274 274  
275 -= 7. Creating a Dashboard =
150 +* Configure client certificate
276 276  
277 -Thingseye **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.
152 +[[image:https://wiki.dragino.com/xwiki/bin/download/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/WebHome/image-20241126192246-22.png?width=693&height=397&rev=1.1||alt="image-20241126192246-22.png" height="397" width="693"]][[image:https://wiki.dragino.com/xwiki/bin/download/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/WebHome/image-20241126192315-23.png?width=645&height=402&rev=1.1||alt="image-20241126192315-23.png" height="402" width="645"]]
278 278  
279 -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 Thingseye to display data according to your requirements.
154 +* Configure client private key
280 280  
281 -First simulate a few messages using MQTT. This time, we have added the 'humidity' field to the payload. Eg:
156 +[[image:https://wiki.dragino.com/xwiki/bin/download/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/WebHome/image-20241126192415-24.png?width=737&height=435&rev=1.1||alt="image-20241126192415-24.png" height="435" width="737"]]
282 282  
283 -{{code language="none"}}
284 -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}'
158 +When the certificate is configured, burn the boot program, burn the working firmware, and then restart the device.
285 285  
286 -{{/code}}
160 +Then configure the -NB node to connect to the ThingsEye platform:
287 287  
288 -In **Thingseye**, from the left navigation menu, click **Dashboards**. Then, click the **+** button and select **Create new dashboard** from the dropdown menu.
162 +**AT Commands**
289 289  
290 -[[image:https://wiki.dragino.com/xwiki/bin/download/Main/ThingsBoard/dashboard-1.png?rev=1.1||alt="dashboard-1.png"]]
164 +* **AT+PRO=3,5      **~/~/ Use MQTT Connection & Json Payload
165 +* **AT+SERVADDR=lns1.thingseye.io,8883**
166 +* **AT+SUBTOPIC=8899     **~/~/ Consistent with the Topic of MQTT integration created by ThingsEye
167 +* **AT+PUBTOPIC=8899     **~/~/ Consistent with the Topic of MQTT integration created by ThingsEye
168 +* **AT+CLIENT=NULL**
169 +* **AT+UNAME=NULL**
170 +* **AT+PWD=NULL**
171 +* **AT+TLSMOD=1,2**
291 291  
292 -In th**Title** text box, enter **NB/CB Test Dashboard** as the title of the dashboard.
173 +Test Uplink by click the button for 1~~3 seconds, the MQTT integration in ThingsEye allows you to view the data upstream from the device:
293 293  
294 -Click on the **Add** button.
175 +[[image:https://wiki.dragino.com/xwiki/bin/download/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/WebHome/image-20241126193458-26.png?width=1012&height=375&rev=1.1||alt="image-20241126193458-26.png" height="375" width="1012"]]
295 295  
296 -[[image:https://wiki.dragino.com/xwiki/bin/download/Main/ThingsBoard/dashboard-2.png?width=500&height=526&rev=1.1||alt="dashboard-2.png"]]
177 +[[image:https://wiki.dragino.com/xwiki/bin/download/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/WebHome/image-20241126193609-27.png?width=1014&height=424&rev=1.1||alt="image-20241126193609-27.png" height="424" width="1014"]]
297 297  
298 -Click on the **Add widget / Add new widget** button.
179 +Go to **"Device" ** -> ** "Search Device"**, enter the ** IMEI** of the device to find the device.
299 299  
300 -[[image:https://wiki.dragino.com/xwiki/bin/download/Main/ThingsBoard/dashboard-3.png?rev=1.1||alt="dashboard-3.png"]]
181 +[[image:https://wiki.dragino.com/xwiki/bin/download/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/WebHome/image-20241126194018-28.png?width=1076&height=318&rev=1.1||alt="image-20241126194018-28.png" height="318" width="1076"]]
301 301  
302 -In the **Select widgets bundle** window, click **Charts**.
183 +You can view the data that has just been uplink on the device:
303 303  
304 -[[image:https://wiki.dragino.com/xwiki/bin/download/Main/ThingsBoard/dashboard-4.png?width=700&height=537&rev=1.1||alt="dashboard-4.png"]]
305 -
306 -In the **Charts: select widget** window, click **Time series chart**.
307 -
308 -[[image:https://wiki.dragino.com/xwiki/bin/download/Main/ThingsBoard/dashboard-5.png?width=700&height=525&rev=1.1||alt="dashboard-5.png"]]
309 -
310 -Configure the **Time series chart** widget as follows:
311 -
312 -* **Datasource** - select **Device A** device you provisioned.
313 -* **Series**:
314 -** **temperature** - you can see this key by default.
315 -** **humidity** - Click **Add series** button. Then add the **humidity** for the key and then type **%** as its unit.
316 -* Click on the **Add** button.
317 -
318 -(% class="box infomessage" %)
319 -(((
320 -You can add only the relevant fields from the device's payload to display data on a widget. These fields are called 'keys'.
321 -)))
322 -
323 -[[image:https://wiki.dragino.com/xwiki/bin/download/Main/ThingsBoard/Screenshot%202025-03-31%20at%2006.51.15.png?width=700&height=485&rev=1.1||alt="Screenshot 2025-03-31 at 06.51.15.png"]]
324 -
325 -The time-series chart will appear in edit mode. Resize it by clicking and dragging the lower-right corner.
326 -
327 -Click the **Save** button to add the widget to the dashboard.
328 -
329 -[[image:https://wiki.dragino.com/xwiki/bin/download/Main/ThingsBoard/timeseries-3.png?width=700&height=347&rev=1.1||alt="timeseries-3.png"]]
330 -
331 -Now send the following MQTT messages from the terminal to simulate the data.
332 -
333 -{{code language="none"}}
334 -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}'
335 -
336 -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}'
337 -
338 -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}'
339 -{{/code}}
340 -
341 -The chart will update with the values in realtime, as shown in the below image.
342 -
343 -[[image:https://wiki.dragino.com/xwiki/bin/download/Main/ThingsBoard/timeseries-4.png?width=700&height=316&rev=1.1||alt="timeseries-4.png"]]
344 -
345 -= 8. Configure Physical NB-IoT Sensor =
346 -
347 -Now, let's experiment with sending data to Thingseye using a real NB-IoT device. For example, we will use the **TS01-NB**.
348 -
349 -First, configure the NB-IoT device with the necessary MQTT settings using AT commands. Below is a list of AT commands you can use.
350 -
351 -**AT Commands**
352 -
353 -* **AT+PRO=3,3    **~/~/ Use MQTT to connect to Thingseye. Payload Type set to 3.
354 -* **AT+SUBTOPIC=<MQTT subscribe topic> Eg: TS01-NB**
355 -* **AT+PUBTOPIC=<MQTT publish topic> Eg: TS01-NB**
356 -* **AT+CLIENT=null**
357 -* **AT+UNAME=<MQTT Username>**
358 -* **AT+PWD=<MQTT Password>**
359 -* **AT+SERVADDR=<Broker address, Port>**
360 -
361 -Test your uplink by pressing the ACT button for 1 second.
362 -
363 -
364 -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.
365 -
366 -[[image:https://wiki.dragino.com/xwiki/bin/download/Main/ThingsBoard/image-4.png?rev=1.2||alt="image-4.png"]]
185 +[[image:https://wiki.dragino.com/xwiki/bin/download/Main/General%20Configure%20to%20Connect%20to%20IoT%20server%20for%20-NB%20%26%20-NS%20NB-IoT%20models/WebHome/image-20241126194123-29.png?width=1073&height=486&rev=1.1||alt="image-20241126194123-29.png" height="486" width="1073"]]
1743578461281-635.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Alec
Size
... ... @@ -1,0 +1,1 @@
1 +272.1 KB
Content
1743578691561-822.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Alec
Size
... ... @@ -1,0 +1,1 @@
1 +230.6 KB
Content
1743578748298-164.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Alec
Size
... ... @@ -1,0 +1,1 @@
1 +86.7 KB
Content
1743578921379-944.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Alec
Size
... ... @@ -1,0 +1,1 @@
1 +85.5 KB
Content
1743578960106-916.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Alec
Size
... ... @@ -1,0 +1,1 @@
1 +85.4 KB
Content
1743579352961-586.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Alec
Size
... ... @@ -1,0 +1,1 @@
1 +104.7 KB
Content
1743580188942-159.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Alec
Size
... ... @@ -1,0 +1,1 @@
1 +157.1 KB
Content
1743580264901-750.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Alec
Size
... ... @@ -1,0 +1,1 @@
1 +154.8 KB
Content
1743580288154-524.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Alec
Size
... ... @@ -1,0 +1,1 @@
1 +154.3 KB
Content
1743580307872-530.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Alec
Size
... ... @@ -1,0 +1,1 @@
1 +155.1 KB
Content
1743580606618-281.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Alec
Size
... ... @@ -1,0 +1,1 @@
1 +127.1 KB
Content
1743581191958-140.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Alec
Size
... ... @@ -1,0 +1,1 @@
1 +154.2 KB
Content
1743581219626-974.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Alec
Size
... ... @@ -1,0 +1,1 @@
1 +156.7 KB
Content
1743581287837-189.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Alec
Size
... ... @@ -1,0 +1,1 @@
1 +180.8 KB
Content
1743581830822-223.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Alec
Size
... ... @@ -1,0 +1,1 @@
1 +249.6 KB
Content
1743581965585-763.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Alec
Size
... ... @@ -1,0 +1,1 @@
1 +418.9 KB
Content
1743582084494-111.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Alec
Size
... ... @@ -1,0 +1,1 @@
1 +418.8 KB
Content
1743584347047-327.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Alec
Size
... ... @@ -1,0 +1,1 @@
1 +126.3 KB
Content