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, 0 added, 18 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 Uplink-NB and -CB series devices databy MQTTwith Thingseye1 +How to integrating Dragino -NB and -CB series devices data with Thingseye - Content
-
... ... @@ -1,5 +3,3 @@ 1 -**Table of Contents:** 2 - 3 3 = 1. Introduction = 4 4 5 5 This document guides you on integrating Dragino **-NB** and **-CB** series devices data with Thingseye. ... ... @@ -10,22 +10,132 @@ 10 10 11 11 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. 12 12 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..11 +If customers need to use this MQTT connection with Thingseye, they need to contact the TE team to obtain three license files. 14 14 15 15 [[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"]] 16 16 17 17 18 -= (% style="color:#333333;font-family:inherit; font-size:max(23px, min(29px,12.3333px + 1.38889vw))" %)3. ConfigureThingseye'sIntegration(%%) =16 += 3. Creating Devices (Optional) = 19 19 20 - ==3.1Creat newMQTT integration==18 +**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.** 21 21 22 - In theleftnavigation,click **Integrationscenter**, and then click**Integrations**.20 +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. 23 23 24 - On the**Integrations** page, clickonhe'**+**' button.22 +In the left navigation, click **Entities -> Devices**. 25 25 26 - [[image:1743578691561-822.png]]24 +Click the **Add Device** button (the button with the **+** sign), and from the dropdown menu, click **Add new device**. 27 27 26 +In the **Add new device** dialog box, enter the device name in the **Name** text box. For example, we will use **Device A**. 28 28 28 +Click the **Add** button. 29 + 30 +Skip the **connectivity testing** by clicking the **Close** button. 31 + 32 +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. 33 + 34 += 4. Data Converters = 35 + 36 +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. 37 + 38 +== 4.1 Uplink == 39 + 40 +In the left navigation, click **Integrations center**, and then click **Data converters**. 41 + 42 +[[image:https://wiki.dragino.com/xwiki/bin/download/Main/ThingsBoard/data-converters-list-empty.png?rev=1.1||alt="data-converters-list-empty.png"]] 43 + 44 +On the **Data converters** page, click on the ‘**+**’ button, and then click on the **Create new converter** from the dropdown menu. 45 + 46 +[[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"]] 47 + 48 +The **Add data converter** window will appear. 49 + 50 +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**. 51 + 52 +Click on the **TBEL** button if it has not been selected by default. 53 + 54 +Modify the default TBEL function to match with your device as described below: 55 + 56 +* Uncomment** line 11**: 57 + 58 +//var data = decodeToJson(payload)// 59 + 60 +* **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. 61 +* From **line 38**: Modify the telemetry section to allow parsed data to be assigned to the fields. 62 + 63 +//telemetry: { 64 + temperature: data.temperature, 65 + humidity: data.humidity, 66 + rawData: payloadStr 67 + }// 68 + 69 +The modified uplink decoder function to match with **Device A** is shown below. 70 + 71 +{{code language="nono"}} 72 +// Decode an uplink message from a buffer 73 +// payload - array of bytes 74 +// metadata - key/value object 75 + 76 +/** Decoder **/ 77 + 78 +// decode payload to string 79 +var payloadStr = decodeToString(payload); 80 + 81 +// decode payload to JSON 82 +var data = decodeToJson(payload); 83 + 84 +var deviceName = 'Device A'; 85 +var deviceType = 'thermostat'; 86 +var customerName = 'Customer C'; 87 +var groupName = 'thermostat devices'; 88 +var manufacturer = 'Example corporation'; 89 +// use assetName and assetType instead of deviceName and deviceType 90 +// to automatically create assets instead of devices. 91 +// var assetName = 'Asset A'; 92 +// var assetType = 'building'; 93 + 94 +// Result object with device/asset attributes/telemetry data 95 +var result = { 96 +// Use deviceName and deviceType or assetName and assetType, but not both. 97 + deviceName: deviceName, 98 + deviceType: deviceType, 99 +// assetName: assetName, 100 +// assetType: assetType, 101 +// customerName: customerName, 102 + groupName: groupName, 103 + attributes: { 104 + model: 'Model A', 105 + serialNumber: 'SN111', 106 + integrationName: metadata['integrationName'], 107 + manufacturer: manufacturer 108 + }, 109 + telemetry: { 110 + temperature: data.temperature, 111 + humidity: data.humidity, 112 + rawData: payloadStr 113 + } 114 +}; 115 + 116 +/** Helper functions 'decodeToString' and 'decodeToJson' are already built-in **/ 117 + 118 +return result; 119 +{{/code}} 120 + 121 +Once you modify the decoder function, click on the **Add** button. 122 + 123 +[[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"]] 124 + 125 +You should see that the newly added **MQTT Uplink converter **NB/CB is listed on the **Data Converters** page. 126 + 127 +[[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"]] 128 + 129 += 5. Add Integration = 130 + 131 +In the left navigation, click **Integrations center**, and then click **Integrations**. 132 + 133 +[[image:https://wiki.dragino.com/xwiki/bin/download/Main/ThingsBoard/integrations-list-empty.png?rev=1.1||alt="integrations-list-empty.png"]] 134 + 135 +On the **Integrations** page, click on the '**+**' button. 136 + 29 29 The **Add integration** window appears. 30 30 31 31 In the **Add integration** window, configure the following settings: ... ... @@ -33,130 +33,222 @@ 33 33 **Basic settings:** 34 34 35 35 * **Integration type**: MQTT 36 -* **Name**: MQTT integration 144 +* **Name**: MQTT integration - Device A 37 37 * **Enable integration**: YES 38 -* **Debug mode**:YES 39 39 * **Allows create devices or assets**: YES 40 40 41 41 Click **Next** button. 42 42 43 -[[image: 1743578960106-916.png||height="549"width="547"]]150 +[[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"]] 44 44 152 +**Uplink data converter:** 45 45 46 -**Uplink/downlink data converter:** 154 +* Click on the **Select existing** button. 155 +* **Uplink data converter**: Select **MQTT Uplink Converter NB/CB **from the dropdown list. 47 47 48 -* ((( 49 -Next, directly select to create a new Uplink data converter . 50 -))) 51 - 52 52 Click **Next** button. 53 53 54 -[[image: 1743581191958-140.png||height="547"width="543"]]159 +[[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"]] 55 55 56 - 57 - 58 58 **Downlink data converter:** 59 59 60 - *Next,directly selecttocreate anewUplink data converter .163 +Dragino NB/CB devices don't require a downlink data converter to decode their payloads, so you can skip this step. 61 61 165 +* Click on the **Skip **button in the Downlink data converter section. 166 + 62 62 Click **Skip** button. 63 63 64 -[[image: 1743581287837-189.png||height="547"width="542"]]169 +[[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"]] 65 65 66 - 67 67 **Connection:** 68 68 69 -* **Host**: [[lns1.thingseye.io>>url:http://lns1.thingseye.io/]]173 +* **Host**: Host URL (Eg. **//011731f7xxxxxxxxxxxfbbedfc63f4.s1.eu.hivemq.cloud//**) 70 70 * **Port**: 8883 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 175 +* **Credentials type**: Basic 176 +* **Username**: Username (from your HiveMQ Cloud Cluster with your credentials) 177 +* **Password:** Password (from your HiveMQ Cloud Cluster with your credentials) 73 73 * **Enable SSL**: YES 74 -* **Topic: ** **It needsto alignwiththe device'stopic.**75 -* **QoS:** 0-At most once or an MQTT QoS level179 +* **Topic: device/a** (The topic can be anything; you can even use just the device name.) 180 +* **QoS:** 0-At most once 76 76 77 - Click**Skip**button.182 +[[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"]] 78 78 79 - [[image:1743579352961-586.png||height="507" width="502"]]184 +Click on the **Advanced settings** button. 80 80 81 -[[image:1743584347047-327.png]] 186 +* **Clean session:** YES 187 +* **Retained**: YES 82 82 189 +[[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"]] 83 83 191 +Click on the **Check connection** button to verify the MQTT connection using the provided parameters. 192 + 193 +[[image:https://wiki.dragino.com/xwiki/bin/download/Main/ThingsBoard/check-connection.png?width=300&height=83&rev=1.1||alt="check-connection.png"]] 194 + 195 +If the connection is successful, you will see the **Connected** message. If not, check your connection parameters again. 196 + 197 +[[image:https://wiki.dragino.com/xwiki/bin/download/Main/ThingsBoard/connection-success.png?width=500&height=511&rev=1.1||alt="connection-success.png"]] 198 + 84 84 Click on the **Add** button. 85 85 86 86 You should see that the newly added integration is listed on the **Integrations** page. 87 87 88 -Since we haven't received data from a device yet, the integration **Status** is shown as **Pending , Active instead if it have.**203 +Since we haven't received data from a device yet, the integration **Status** is shown as **Pending.** 89 89 90 -[[image: 1743580606618-281.png||height="495" width="504"]]205 +[[image:https://wiki.dragino.com/xwiki/bin/download/Main/ThingsBoard/integration-added.png?rev=1.1||alt="integration-added.png"]] 91 91 207 += 6. Verifying the receipt of data from virtual devices = 92 92 93 -= 4.ConfigureThingseye'sDataConverters=209 +== 6.1 How does it work? == 94 94 95 - First,youneedtodownloadthe[[**MQTT uplink/downlinkJS** **code**>>url:https://www.dropbox.com/scl/fo/d5s1wf36f4syv30a8laup/AK8FjVpNXYXCWodRnnQ1Hig?rlkey=jrz1ip0f0xwwq5z2m2gu1tuij&e=1&st=kl4caub0&dl=0]].211 +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. 96 96 97 - In **Thingseye**, **DataConverters** are componentsusedtotransformincoming or outgoingdatabetween differentformats,typicallytoconvertrawtelemetrydata fromdevices intoastructuredformatthat Thingseyecan understand,or viceversa.213 +The Mosquitto client publishes messages (payloads) on the topic **/device/a**. Of course, you can use any topic for testing. 98 98 99 - ==4.1Uplink==215 +The MQTT payload format is as follows: 100 100 101 -* **Uplink Converter** 217 +{{code language="none"}} 218 +{"IMEI": "350693903995577", "temperature":25, "humidity":80, "pressure":1005} 219 +{{/code}} 102 102 103 -Th e purposeof thedecoder function isparsetheincoming data andmetadata toa formatatThingsBoard can consume.221 +Once Thingseye receives this message, it forwards this payload to the matching device through the integration. 104 104 105 - Go to the **Integrations center** -> **Data converters** page,and findthat MQTT uplink converter that wasnewly createdwhen theintegrationwas created.223 +== 5.2 Sending messages == 106 106 107 - [[image:1743581830822-223.png]]225 +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. 108 108 227 +{{code language="none"}} 228 +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}' 229 +{{/code}} 109 109 110 - Enter editmode andapply **MQTTuplinkJScode**to thisuplink converter.231 +If the integration was performed without errors, the status of the integration changes to 'Active' after the first telemetry transmission. 111 111 112 -[[image:1 743581965585-763.png]]233 +[[image:https://wiki.dragino.com/xwiki/bin/download/Main/ThingsBoard/integration-active.png?rev=1.2||alt="integration-active.png"]] 113 113 235 +== 6.3 Viewing messages == 114 114 115 - ==4.2Downlink ==237 +Go back to the **Integrations** page. 116 116 117 -* ((( 118 -**Downlink Converter** 119 -))) 239 +Click on the **MQTT integration NB/CB** in the **Integrations** page to see its details. 120 120 121 - Goo the **Integrations center**-> **Data converters**age, and findthat MQTT downlinkconverter that was newly created when the integration was created.241 +Click on the **Edit** button (//**pen icon**//). 122 122 243 +Click on the **Disabled** button in the upper-right corner. 123 123 124 - Entereditmode andapply**MQTTdownlinkJScode**to thisdownlinkconverter.245 +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. 125 125 126 - [[image:1743582084494-111.png]]247 +Click on the **Apply** button. 127 127 249 +Then click on the **Apply changes** (//**tick icon**//) button. 128 128 129 - == 4.3 SimulateMQTT.fx==251 +[[image:https://wiki.dragino.com/xwiki/bin/download/Main/ThingsBoard/debug-enabled.png?width=700&height=301&rev=1.1||alt="debug-enabled.png"]] 130 130 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"]]253 +Now go to the **Events** tab. 132 132 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"]]255 +Select the **Event type** as **Debug** from the dropdown list. 134 134 257 +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: 135 135 136 - = 5. Test connect=259 +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}' 137 137 138 -** ATCommands**261 +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. 139 139 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** 263 +[[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"]] 148 148 149 -(% class="box warningmessage" %) 265 +Then click on the **three dots (...)** in the **Message** column. You can see the uplink message's **payload** in the **Message** window. 266 + 267 +[[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"]] 268 + 269 +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. 270 + 271 += 7. Creating a Dashboard = 272 + 273 +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. 274 + 275 +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. 276 + 277 +First simulate a few messages using MQTT. This time, we have added the 'humidity' field to the payload. Eg: 278 + 279 +{{code language="none"}} 280 +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}' 281 + 282 +{{/code}} 283 + 284 +In **Thingseye**, from the left navigation menu, click **Dashboards**. Then, click the **+** button and select **Create new dashboard** from the dropdown menu. 285 + 286 +[[image:https://wiki.dragino.com/xwiki/bin/download/Main/ThingsBoard/dashboard-1.png?rev=1.1||alt="dashboard-1.png"]] 287 + 288 +In the **Title** text box, enter **NB/CB Test Dashboard** as the title of the dashboard. 289 + 290 +Click on the **Add** button. 291 + 292 +[[image:https://wiki.dragino.com/xwiki/bin/download/Main/ThingsBoard/dashboard-2.png?width=500&height=526&rev=1.1||alt="dashboard-2.png"]] 293 + 294 +Click on the **Add widget / Add new widget** button. 295 + 296 +[[image:https://wiki.dragino.com/xwiki/bin/download/Main/ThingsBoard/dashboard-3.png?rev=1.1||alt="dashboard-3.png"]] 297 + 298 +In the **Select widgets bundle** window, click **Charts**. 299 + 300 +[[image:https://wiki.dragino.com/xwiki/bin/download/Main/ThingsBoard/dashboard-4.png?width=700&height=537&rev=1.1||alt="dashboard-4.png"]] 301 + 302 +In the **Charts: select widget** window, click **Time series chart**. 303 + 304 +[[image:https://wiki.dragino.com/xwiki/bin/download/Main/ThingsBoard/dashboard-5.png?width=700&height=525&rev=1.1||alt="dashboard-5.png"]] 305 + 306 +Configure the **Time series chart** widget as follows: 307 + 308 +* **Datasource** - select **Device A** device you provisioned. 309 +* **Series**: 310 +** **temperature** - you can see this key by default. 311 +** **humidity** - Click **Add series** button. Then add the **humidity** for the key and then type **%** as its unit. 312 +* Click on the **Add** button. 313 + 314 +(% class="box infomessage" %) 150 150 ((( 151 - Becareful,“ Topic”shouldbesameof device&serve.Ifyour devicenotbelongsDragino,addressshould beameofthebrokerwhichusing.316 +You can add only the relevant fields from the device's payload to display data on a widget. These fields are called 'keys'. 152 152 ))) 153 153 154 - TestUplinkby clickthebuttonfor 1~~3 seconds, theMQTT integrationinThingsEye allowsyouto viewdata upstream fromthedevice:319 +[[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"]] 155 155 321 +The time-series chart will appear in edit mode. Resize it by clicking and dragging the lower-right corner. 156 156 323 +Click the **Save** button to add the widget to the dashboard. 157 157 158 - Go to **"Device" ** -> ** "SearchDevice"**, enterhe** IMEI** of thedeviceto finddevice.325 +[[image:https://wiki.dragino.com/xwiki/bin/download/Main/ThingsBoard/timeseries-3.png?width=700&height=347&rev=1.1||alt="timeseries-3.png"]] 159 159 327 +Now send the following MQTT messages from the terminal to simulate the data. 160 160 329 +{{code language="none"}} 330 +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}' 161 161 332 +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}' 333 + 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":19, "humidity":80, "pressure":1005}' 335 +{{/code}} 336 + 337 +The chart will update with the values in realtime, as shown in the below image. 338 + 339 +[[image:https://wiki.dragino.com/xwiki/bin/download/Main/ThingsBoard/timeseries-4.png?width=700&height=316&rev=1.1||alt="timeseries-4.png"]] 340 + 341 += 8. Configure Physical NB-IoT Sensor = 342 + 343 +Now, let's experiment with sending data to Thingseye using a real NB-IoT device. For example, we will use the **TS01-NB**. 344 + 345 +First, configure the NB-IoT device with the necessary MQTT settings using AT commands. Below is a list of AT commands you can use. 346 + 347 +**AT Commands** 348 + 349 +* **AT+PRO=3,3 **~/~/ Use MQTT to connect to Thingseye. Payload Type set to 3. 350 +* **AT+SUBTOPIC=<MQTT subscribe topic> Eg: TS01-NB** 351 +* **AT+PUBTOPIC=<MQTT publish topic> Eg: TS01-NB** 352 +* **AT+CLIENT=null** 353 +* **AT+UNAME=<MQTT Username>** 354 +* **AT+PWD=<MQTT Password>** 355 +* **AT+SERVADDR=<Broker address, Port>** 356 + 357 +Test your uplink by pressing the ACT button for 1 second. 162 162 359 + 360 +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. 361 + 362 +[[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,1 +1,0 @@ 1 -XWiki.Alec - Size
-
... ... @@ -1,1 +1,0 @@ 1 -272.1 KB - Content
- 1743578691561-822.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Alec - Size
-
... ... @@ -1,1 +1,0 @@ 1 -230.6 KB - Content
- 1743578748298-164.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Alec - Size
-
... ... @@ -1,1 +1,0 @@ 1 -86.7 KB - Content
- 1743578921379-944.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Alec - Size
-
... ... @@ -1,1 +1,0 @@ 1 -85.5 KB - Content
- 1743578960106-916.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Alec - Size
-
... ... @@ -1,1 +1,0 @@ 1 -85.4 KB - Content
- 1743579352961-586.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Alec - Size
-
... ... @@ -1,1 +1,0 @@ 1 -104.7 KB - Content
- 1743580188942-159.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Alec - Size
-
... ... @@ -1,1 +1,0 @@ 1 -157.1 KB - Content
- 1743580264901-750.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Alec - Size
-
... ... @@ -1,1 +1,0 @@ 1 -154.8 KB - Content
- 1743580288154-524.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Alec - Size
-
... ... @@ -1,1 +1,0 @@ 1 -154.3 KB - Content
- 1743580307872-530.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Alec - Size
-
... ... @@ -1,1 +1,0 @@ 1 -155.1 KB - Content
- 1743580606618-281.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Alec - Size
-
... ... @@ -1,1 +1,0 @@ 1 -127.1 KB - Content
- 1743581191958-140.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Alec - Size
-
... ... @@ -1,1 +1,0 @@ 1 -154.2 KB - Content
- 1743581219626-974.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Alec - Size
-
... ... @@ -1,1 +1,0 @@ 1 -156.7 KB - Content
- 1743581287837-189.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Alec - Size
-
... ... @@ -1,1 +1,0 @@ 1 -180.8 KB - Content
- 1743581830822-223.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Alec - Size
-
... ... @@ -1,1 +1,0 @@ 1 -249.6 KB - Content
- 1743581965585-763.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Alec - Size
-
... ... @@ -1,1 +1,0 @@ 1 -418.9 KB - Content
- 1743582084494-111.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Alec - Size
-
... ... @@ -1,1 +1,0 @@ 1 -418.8 KB - Content
- 1743584347047-327.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Alec - Size
-
... ... @@ -1,1 +1,0 @@ 1 -126.3 KB - Content