Changes for page How to Uplink -NB and -CB series devices data by MQTT with Thingseye
Last modified by Alec Chen on 2025/04/02 18:03
Summary
-
Page properties (2 modified, 0 added, 0 removed)
-
Attachments (0 modified, 18 added, 0 removed)
- 1743578461281-635.png
- 1743578691561-822.png
- 1743578748298-164.png
- 1743578921379-944.png
- 1743578960106-916.png
- 1743579352961-586.png
- 1743580188942-159.png
- 1743580264901-750.png
- 1743580288154-524.png
- 1743580307872-530.png
- 1743580606618-281.png
- 1743581191958-140.png
- 1743581219626-974.png
- 1743581287837-189.png
- 1743581830822-223.png
- 1743581965585-763.png
- 1743582084494-111.png
- 1743584347047-327.png
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,1 @@ 1 -How to in tegratingDragino-NB and -CB series devices data with Thingseye1 +How to Uplink -NB and -CB series devices data by MQTT with Thingseye - Content
-
... ... @@ -1,7 +1,5 @@ 1 1 **Table of Contents:** 2 2 3 -{{toc/}} 4 - 5 5 = 1. Introduction = 6 6 7 7 This document guides you on integrating Dragino **-NB** and **-CB** series devices data with Thingseye. ... ... @@ -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 theTE team to obtain three license files.13 +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 .CreatingDevices(Optional) =18 += (% style="color:#333333; font-family:inherit; font-size:max(23px, min(29px, 12.3333px + 1.38889vw))" %)3. Configure Thingseye's Integration(%%) = 21 21 22 - **Thefollowing procedure is optional.If you haven't createdany deviceinThingseye first,Thingseyewill automatically create a device for you based onheintegrationsettings (the device name defined in the uplink decoder) just after it receives the first uplink from your device.Type your information message here.**20 +== 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 26 +[[image:1743578691561-822.png]] 27 + 28 + 141 141 The **Add integration** window appears. 142 142 143 143 In the **Add integration** window, configure the following settings: ... ... @@ -145,222 +145,130 @@ 145 145 **Basic settings:** 146 146 147 147 * **Integration type**: MQTT 148 -* **Name**: MQTT integration - Device A36 +* **Name**: MQTT integration 149 149 * **Enable integration**: YES 38 +* **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"]]43 +[[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. 46 +**Uplink/downlink data converter:** 160 160 48 +* ((( 49 +Next, directly select to create a new Uplink data converter . 50 +))) 51 + 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"]]54 +[[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 theDownlink data convertersection.58 +**Downlink data converter:** 170 170 60 +* Next, directly select to create a new Uplink data converter . 61 + 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"]]64 +[[image:1743581287837-189.png||height="547" width="542"]] 174 174 66 + 175 175 **Connection:** 176 176 177 -* **Host**: HostURL (Eg.**//011731f7xxxxxxxxxxxfbbedfc63f4.s1.eu.hivemq.cloud//**)69 +* **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) 71 +* **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. 72 +* **Password:** Password or nothng 182 182 * **Enable SSL**: YES 183 -* **Topic: device/a**(Thetopiccanbeanything; youcaneven use just the devicename.)184 -* **QoS:** 0-At most once 74 +* **Topic: ** **It needs to align with the device's topic.** 75 +* **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"]]77 +Click **Skip** button. 187 187 188 - Click onthe**Advanced settings** button.79 +[[image:1743579352961-586.png||height="507" width="502"]] 189 189 190 -* **Clean session:** YES 191 -* **Retained**: YES 81 +[[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.** 88 +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"]]90 +[[image:1743580606618-281.png||height="495" width="504"]] 210 210 211 -= 6. Verifying the receipt of data from virtual devices = 212 212 213 -= =6.1Howdoesitwork?==93 += 4. Configure Thingseye's Data Converters = 214 214 215 - We usetheMosquittoMQTT clienttosimulatemessages, acting as a virtualdevice. First, install the Mosquitto clienton yourcomputer from [[this link>>url:https://mosquitto.org/download/]].The Mosquittoclient publishesmessages tothe MQTT broker(HiveMQ) on a specified MQTTtopic.95 +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 clientpublishesmessages(payloads)on the topic **/device/a**.Ofcourse,youcanuse anytopicfortesting.97 +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 - TheMQTTpayload formatisas follows:99 +== 4.1 Uplink == 220 220 221 -{{code language="none"}} 222 -{"IMEI": "350693903995577", "temperature":25, "humidity":80, "pressure":1005} 223 -{{/code}} 101 +* **Uplink Converter** 224 224 225 - OnceThingseyereceivesthis message,itforwardss payloadothematching devicethroughtheintegration.103 +The purpose of the decoder function is to parse the incoming data and metadata to a format that ThingsBoard can consume. 226 226 227 - == 5.2 Sendingmessages==105 +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 messagepayload contains the fields IMEI, temperature, humidity, and pressure, which hold the values 350693903995577,30,80, and1005 respectively.Thispayload is also (technically) known as telemetry.107 +[[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 integrationwas performedwithouterrors, thestatusoftheintegrationchangesto'Active' after the firsttelemetrytransmission.110 +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"]]112 +[[image:1743581965585-763.png]] 238 238 239 -== 6.3 Viewing messages == 240 240 241 - Gobacktothe **Integrations** page.115 +== 4.2 Downlink == 242 242 243 -Click on the **MQTT integration NB/CB** in the **Integrations** page to see its details. 117 +* ((( 118 +**Downlink Converter** 119 +))) 244 244 245 - Clickonthe **Edit**button(//**pen icon**//).121 +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 - Turnonthe**Allmessages (15 min)** option.This willenabledisplayingall messages in the**Events** tab.Thissettingwill expire in15minutes, and you will needrepeatthesamesteps if youwant to view the messages inthe Events tab later.124 +Enter edit mode and apply **MQTT downlink JS code** to this downlink converter. 250 250 251 - Click on the**Apply** button.126 +[[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"]]129 +== 4.3 Simulate with MQTT.fx == 256 256 257 - Nowhe**Events**tab.131 +[[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 - Selecthe**Event type** as**Debug** fromdropdownlist.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-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}'136 += 5. Test connect = 264 264 265 - Now you can see that uplink message in the**Events**tab (Click the **refresh** button if you didn't see anymessages inthe Events tab). The status shouldbe**OK **if there is no errors in your integration.138 +**AT Commands** 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"]] 140 +* **AT+PRO=3,5 **~/~/ Use MQTT Connection & Json Payload 141 +* **AT+SERVADDR=lns1.thingseye.io,8883** 142 +* **AT+SUBTOPIC=8899 **~/~/ Consistent with the Topic of MQTT integration created by ThingsEye 143 +* **AT+PUBTOPIC=8899 **~/~/ Consistent with the Topic of MQTT integration created by ThingsEye 144 +* **AT+CLIENT=NULL** 145 +* **AT+UNAME=NULL** 146 +* **AT+PWD=NULL** 147 +* **AT+TLSMOD=1,2** 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. 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"]] 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. 274 - 275 -= 7. Creating a Dashboard = 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. 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. 280 - 281 -First simulate a few messages using MQTT. This time, we have added the 'humidity' field to the payload. Eg: 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}' 285 - 286 -{{/code}} 287 - 288 -In **Thingseye**, from the left navigation menu, click **Dashboards**. Then, click the **+** button and select **Create new dashboard** from the dropdown menu. 289 - 290 -[[image:https://wiki.dragino.com/xwiki/bin/download/Main/ThingsBoard/dashboard-1.png?rev=1.1||alt="dashboard-1.png"]] 291 - 292 -In the **Title** text box, enter **NB/CB Test Dashboard** as the title of the dashboard. 293 - 294 -Click on the **Add** button. 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"]] 297 - 298 -Click on the **Add widget / Add new widget** button. 299 - 300 -[[image:https://wiki.dragino.com/xwiki/bin/download/Main/ThingsBoard/dashboard-3.png?rev=1.1||alt="dashboard-3.png"]] 301 - 302 -In the **Select widgets bundle** window, click **Charts**. 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" %) 149 +(% class="box warningmessage" %) 319 319 ((( 320 - Youcanaddonlytherelevant fieldsfromthedevice'spayloadtodisplaydataon awidget.These fieldsare called'keys'.151 +Be careful, “ Topic” should be same of device & serve. If your device not belongs Dragino, address should be same of the broker which using. 321 321 ))) 322 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="Screenshot2025-03-31 at06.51.15.png"]]154 +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: 324 324 325 -The time-series chart will appear in edit mode. Resize it by clicking and dragging the lower-right corner. 326 326 327 -Click the **Save** button to add the widget to the dashboard. 328 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"]]158 +Go to **"Device" ** -> ** "Search Device"**, enter the ** IMEI** of the device to find the device. 330 330 331 -Now send the following MQTT messages from the terminal to simulate the data. 332 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 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 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"]]
- 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