Changes for page Connect Devices to ThingsEye
Last modified by Hera Guo on 2025/09/25 09:23
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Attachments (0 modified, 5 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -7,68 +7,61 @@ 7 7 8 8 = 1. Overview = 9 9 10 -Th einstructionsin this chapterwill show you how to connect a device that has been registered to the server to the Thingseye platform.10 +This instructions will show you how to connect a device that has been registered to the server to the Thingseye platform. 11 11 12 -The network diagram below illustrates the connection between the devices and The Things Stack, as well as how the data can be integrated with the ThingsEye IoT platform. 13 13 14 -[[image:1732679080974-799.jpg||height="444" width="1660"]] 15 - 16 16 = 2. UDP Procotol ~-~- Directly Connection = 17 17 18 18 == 2.1 UDP Interface == 19 19 20 20 * Server Address: server1.thingseye.io 21 -* Port: 1156 218 +* Port: 11560 22 22 23 23 The data sent to above UDP interface will not go directly to client's database. 24 24 25 25 Please contact ThingsEye team for detail how to forward data to client. 26 26 24 +**Note:Currently udp connections require port forwarding, please contact the ThingsEye team to inform them of your device's IMEI before connecting.** 27 27 28 -== 2.2 Test UDP Interface via Socket Tool == 29 29 30 - Download the UDP Test Tool from: [[https:~~/~~/sourceforge.net/projects/sockettest/ >>https://sourceforge.net/projects/sockettest/]]. Run this tool, and input the server address and UDP port as below and click send.27 +---- 31 31 32 - [[image:1728566363151-470.png]]29 +== 2.2 Test with Dragino NB device == 33 33 34 - Inserverside, Tenant Administrator can checkthisinTenantUDP Server location.31 +=== 2.2.1 Configure NB-IoT End Node === 35 35 36 -[[image:1728362834430-749.png||height="510" width="1667"]] 37 - 38 -Click and see the debug info as below: 39 - 40 -[[image:1728363020699-203.png]] 41 - 42 -We can see the message arrives, but it shows ERROR because the message doesn't follow with the UDP Server format. 43 - 44 - 45 -== 2.3 Test with Dragino NB device == 46 - 47 -=== 2.3.1 Configure NB-IoT End Node === 48 - 49 49 Device here is **[[S31-NB>>https://www.dragino.com/products/temperature-humidity-sensor/item/288-s31-nb-s31b-nb.html]]** : and have been configure below 50 50 51 -* Set to use ThingsEye UDP server: **AT+SERVADDR=server1.thingseye.io,1156 2**35 +* Set to use ThingsEye UDP server: **AT+SERVADDR=server1.thingseye.io,11560** 52 52 * Use UDP Uplink & Json protocol:** AT+PRO=2,5** 53 53 * Equip with a NB-IoT SIM Card to access to NB-IoT Network. 54 54 55 55 The S31-NB's cellular module has the IMEI: **863663062789483** 56 56 41 +=== 2.2.2 Check Uplink Data === 57 57 58 - ===2.3.2CheckUplink Data ===43 +Turn on debug mod 59 59 45 +[[image:1758762334133-608.png||height="494" width="1003"]] 46 + 47 +---- 48 + 60 60 Re-activate the S31-NB, and we can see it in the debug window: 61 61 62 -[[image:17 28378218744-800.png||height="431" width="1003"]]51 +[[image:1758762371290-726.png||height="528" width="1005"]] 63 63 53 +[[image:1728378218744-800.png||_mstalt="295269" height="431" width="1003"]] 64 64 55 + 56 +---- 57 + 65 65 === 2.3.3 Auto-Create Device === 66 66 67 67 The default **Tenant UDP Server** has already been configured to decode the Dragino -NB / -CB NB-IoT node. So once each end node sends a data to server. Tenant will auto create the device in the server. 68 68 69 -[[image:1728378968101-683.png||height="2 73" width="1307"]]62 +[[image:1728378968101-683.png||_mstalt="297154" height="210" width="1005"]] 70 70 71 -[[image:1728379050044-764.png||height=" 424" width="1312"]]64 +[[image:1728379050044-764.png||_mstalt="295282" height="326" width="1009"]] 72 72 73 73 74 74 **So we have this device in the Tenant Device List. The next step will be how to use these value to make a nice dashboard for user's application.** ... ... @@ -77,25 +77,28 @@ 77 77 78 78 == 3.1 Network Structure == 79 79 73 +The network diagram below illustrates the connection between the devices and The Things Stack, as well as how the data can be integrated with the ThingsEye IoT platform. 80 80 75 +[[image:1732679444539-853.jpg||_mstalt="296933" height="388" width="1452"]] 76 + 81 81 == 3.2 Creat Integration for The Things Stack. == 82 82 83 83 (% class="lead" %) 84 84 Add Integration 85 85 86 -[[image:1728535775119-971.png||height="456" width="1087"]] 82 +[[image:1728535775119-971.png||_mstalt="297661" height="456" width="1087"]] 87 87 88 88 89 89 (% class="lead" %) 90 90 Choose Connection Type 91 91 92 -[[image:1728535857345-950.png]] 88 +[[image:1728535857345-950.png||_mstalt="297154"]] 93 93 94 94 95 95 (% class="lead" %) 96 96 Input Uplink Data Converter Code 97 97 98 -[[image:1728535941851-388.png||height="466" width="398"]] 94 +[[image:1728535941851-388.png||_mstalt="297856" height="466" width="398"]] 99 99 100 100 Demo JavaScript Code: [[https:~~/~~/raw.githubusercontent.com/ThingsEye-io/te-platform/refs/heads/main/Data%20Converters/The_Things_Network_MQTT_Uplink_Converter.js >>https://raw.githubusercontent.com/ThingsEye-io/te-platform/refs/heads/main/Data%20Converters/The_Things_Network_MQTT_Uplink_Converter.js]] 101 101 ... ... @@ -103,7 +103,7 @@ 103 103 (% class="lead" %) 104 104 Input Downlink Converter 105 105 106 -[[image:1728536142721-488.png||height="470" width="407"]] 102 +[[image:1728536142721-488.png||_mstalt="296127" height="470" width="407"]] 107 107 108 108 Example Javascript Code as below: [[https:~~/~~/raw.githubusercontent.com/ThingsEye-io/te-platform/refs/heads/main/Data%20Converters/The_Things_Network_MQTT_Downlink_Converter.js>>https://raw.githubusercontent.com/ThingsEye-io/te-platform/refs/heads/main/Data%20Converters/The_Things_Network_MQTT_Downlink_Converter.js]] 109 109 ... ... @@ -111,7 +111,7 @@ 111 111 (% class="lead" %) 112 112 Set up Connection to The Things Network application 113 113 114 -[[image:1728536305503-380.png||height="510" width="1206"]] 110 +[[image:1728536305503-380.png||_mstalt="293254" height="510" width="1206"]] 115 115 116 116 117 117 ... ... @@ -118,11 +118,11 @@ 118 118 (% class="lead" %) 119 119 Test Connection & Add iIntegration 120 120 121 -[[image:1728536374214-962.png]] 117 +[[image:1728536374214-962.png||_mstalt="295893"]] 122 122 123 123 After add , we can see the integration here: 124 124 125 -[[image:1728536420275-153.png||height="208" width="1404"]] 121 +[[image:1728536420275-153.png||_mstalt="293748" height="208" width="1404"]] 126 126 127 127 128 128 == 3.3 Test Uplink == ... ... @@ -129,26 +129,32 @@ 129 129 130 130 We can use Simulate Uplink to simulate an uplink in the things stack. Then we should be able to see the message in ThingsEye 131 131 132 -[[image:1728536524638-768.png||height="493" width="1071"]] 128 +[[image:1728536524638-768.png||_mstalt="298870" height="493" width="1071"]] 133 133 134 134 135 -[[image:1728536541040-814.png]] 131 +[[image:1728536541040-814.png||_mstalt="293215"]] 136 136 137 137 = 4.Connect chirpstack to Thingseye by way of MQTT = 138 138 139 139 * **How to connect chirpstack to Thingseye by way of MQTT? The following tutorial will show you** 140 140 141 -== 4.1 Thingseyeadds MQTT integration==137 +== 4.1 Network Structure == 142 142 139 +The network diagram below illustrates the connection between the devices andchirpstack, as well as how the data can be integrated with the ThingsEye IoT platform. 140 + 141 +[[image:1732679647697-982.jpg||_mstalt="299884" height="399" width="1492"]] 142 + 143 +== 4.2 Thingseye adds MQTT integration == 144 + 143 143 Go to the Integrations page in the Integrations center section. Click the plus button to start adding a new integration. Select the type "MQTT" integration and click "Next"; 144 144 145 -[[image: 图片1.png]]147 +[[image:1758762634175-353.png]] 146 146 147 -== 4. 2Add an uplink and downlink data converter ==149 +== 4.3 Add an uplink and downlink data converter == 148 148 149 149 In the function decoder field, specify the script to parse and transform the data. 150 150 151 -[[image:图片2.png]] 153 +[[image:图片2.png||_mstalt="5131503"]] 152 152 153 153 * **Uplink——JavaScript:** 154 154 ... ... @@ -230,7 +230,7 @@ 230 230 231 231 return result; 232 232 233 -[[image:图片3.png]] 235 +[[image:图片3.png||_mstalt="5131620"]] 234 234 235 235 * **Dowblink——JavaScript:** 236 236 ... ... @@ -280,7 +280,7 @@ 280 280 281 281 return result; 282 282 283 -== 4. 3Configure the connection ==285 +== 4.4 Configure the connection == 284 284 285 285 Generate MQTT certificate integrated on chirpstack 286 286 ... ... @@ -288,9 +288,9 @@ 288 288 289 289 They correspond to the CA certificate file, Certificate file, and Private key file on thingseye 290 290 291 -[[image:图片4.png]] 293 +[[image:图片4.png||_mstalt="5131737"]] 292 292 293 -[[image:图片5.png||height="630" width="1269"]] 295 +[[image:图片5.png||_mstalt="5131854" height="630" width="1269"]] 294 294 295 295 * Copy the contents of the certificates and paste them into the linked file below, a total of three certificates are required 296 296 ... ... @@ -306,28 +306,28 @@ 306 306 307 307 Upload the certificate and key file 308 308 309 -[[image:图片6.png]] 311 +[[image:图片6.png||_mstalt="5131971"]] 310 310 311 -[[image:图片7.png]] 313 +[[image:图片7.png||_mstalt="5132088"]] 312 312 313 313 The default for Topic is: 314 314 315 315 application/**chirpstack application id**/device/+/event/up 316 316 317 -[[image:图片8.png]] 319 +[[image:图片8.png||_mstalt="5132205"]] 318 318 319 319 320 320 (% class="wikigeneratedid" %) 321 -[[image:屏幕截图 2024-11-25 095805.png||height="374" width="1272"]] 323 +[[image:屏幕截图 2024-11-25 095805.png||_mstalt="10831028" height="374" width="1272"]] 322 322 323 -== 4. 4Check the connection ==325 +== 4.5 Check the connection == 324 324 325 -[[image:图片9.png]] 327 +[[image:图片9.png||_mstalt="5132322"]] 326 326 327 -[[image:图片10.png]] 329 +[[image:图片10.png||_mstalt="5142449"]] 328 328 329 329 = 5. Check Data Uplink Log = 330 330 331 331 User can check the devices log in Intergration. 332 332 333 -[[image:1729562069134-315.png||height="587" width="723"]] 335 +[[image:1729562069134-315.png||_mstalt="294190" height="587" width="723"]]
- 1732679444539-853.jpg
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.hera - Size
-
... ... @@ -1,0 +1,1 @@ 1 +180.5 KB - Content
- 1732679647697-982.jpg
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.hera - Size
-
... ... @@ -1,0 +1,1 @@ 1 +179.2 KB - Content
- 1758762334133-608.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.hera - Size
-
... ... @@ -1,0 +1,1 @@ 1 +161.4 KB - Content
- 1758762371290-726.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.hera - Size
-
... ... @@ -1,0 +1,1 @@ 1 +215.2 KB - Content
- 1758762634175-353.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.hera - Size
-
... ... @@ -1,0 +1,1 @@ 1 +213.8 KB - Content