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, 8 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -7,6 +7,7 @@ 7 7 8 8 = 1. Overview = 9 9 10 +This instructions will show you how to connect a device that has been registered to the server to the Thingseye platform. 10 10 11 11 12 12 = 2. UDP Procotol ~-~- Directly Connection = ... ... @@ -14,57 +14,53 @@ 14 14 == 2.1 UDP Interface == 15 15 16 16 * Server Address: server1.thingseye.io 17 -* Port: 1156 218 +* Port: 11560 18 18 19 19 The data sent to above UDP interface will not go directly to client's database. 20 20 21 21 Please contact ThingsEye team for detail how to forward data to client. 22 22 24 +**Note:Currently udp connections require port forwarding, please contact the ThingsEye team to inform them of your device's IMEI before connecting.** 23 23 24 -== 2.2 Test UDP Interface via Socket Tool == 25 25 26 - 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 +---- 27 27 28 - [[image:1728566363151-470.png]]29 +== 2.2 Test with Dragino NB device == 29 29 30 - Inserverside, Tenant Administrator can checkthisinTenantUDP Server location.31 +=== 2.2.1 Configure NB-IoT End Node === 31 31 32 -[[image:1728362834430-749.png||height="510" width="1667"]] 33 - 34 -Click and see the debug info as below: 35 - 36 -[[image:1728363020699-203.png]] 37 - 38 -We can see the message arrives, but it shows ERROR because the message doesn't follow with the UDP Server format. 39 - 40 - 41 -== 2.3 Test with Dragino NB device == 42 - 43 -=== 2.3.1 Configure NB-IoT End Node === 44 - 45 45 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 46 46 47 -* 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** 48 48 * Use UDP Uplink & Json protocol:** AT+PRO=2,5** 49 49 * Equip with a NB-IoT SIM Card to access to NB-IoT Network. 50 50 51 51 The S31-NB's cellular module has the IMEI: **863663062789483** 52 52 41 +=== 2.2.2 Check Uplink Data === 53 53 54 - ===2.3.2CheckUplink Data ===43 +Turn on debug mod 55 55 45 +[[image:1758762334133-608.png||height="494" width="1003"]] 46 + 47 +---- 48 + 56 56 Re-activate the S31-NB, and we can see it in the debug window: 57 57 58 -[[image:17 28378218744-800.png||height="431" width="1003"]]51 +[[image:1758762371290-726.png||height="528" width="1005"]] 59 59 53 +[[image:1728378218744-800.png||_mstalt="295269" height="431" width="1003"]] 60 60 55 + 56 +---- 57 + 61 61 === 2.3.3 Auto-Create Device === 62 62 63 63 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. 64 64 65 -[[image:1728378968101-683.png||height="2 73" width="1307"]]62 +[[image:1728378968101-683.png||_mstalt="297154" height="210" width="1005"]] 66 66 67 -[[image:1728379050044-764.png||height=" 424" width="1312"]]64 +[[image:1728379050044-764.png||_mstalt="295282" height="326" width="1009"]] 68 68 69 69 70 70 **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.** ... ... @@ -73,25 +73,28 @@ 73 73 74 74 == 3.1 Network Structure == 75 75 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. 76 76 75 +[[image:1732679444539-853.jpg||_mstalt="296933" height="388" width="1452"]] 76 + 77 77 == 3.2 Creat Integration for The Things Stack. == 78 78 79 79 (% class="lead" %) 80 80 Add Integration 81 81 82 -[[image:1728535775119-971.png||height="456" width="1087"]] 82 +[[image:1728535775119-971.png||_mstalt="297661" height="456" width="1087"]] 83 83 84 84 85 85 (% class="lead" %) 86 86 Choose Connection Type 87 87 88 -[[image:1728535857345-950.png]] 88 +[[image:1728535857345-950.png||_mstalt="297154"]] 89 89 90 90 91 91 (% class="lead" %) 92 92 Input Uplink Data Converter Code 93 93 94 -[[image:1728535941851-388.png||height="466" width="398"]] 94 +[[image:1728535941851-388.png||_mstalt="297856" height="466" width="398"]] 95 95 96 96 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]] 97 97 ... ... @@ -99,7 +99,7 @@ 99 99 (% class="lead" %) 100 100 Input Downlink Converter 101 101 102 -[[image:1728536142721-488.png||height="470" width="407"]] 102 +[[image:1728536142721-488.png||_mstalt="296127" height="470" width="407"]] 103 103 104 104 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]] 105 105 ... ... @@ -107,7 +107,7 @@ 107 107 (% class="lead" %) 108 108 Set up Connection to The Things Network application 109 109 110 -[[image:1728536305503-380.png||height="510" width="1206"]] 110 +[[image:1728536305503-380.png||_mstalt="293254" height="510" width="1206"]] 111 111 112 112 113 113 ... ... @@ -114,11 +114,11 @@ 114 114 (% class="lead" %) 115 115 Test Connection & Add iIntegration 116 116 117 -[[image:1728536374214-962.png]] 117 +[[image:1728536374214-962.png||_mstalt="295893"]] 118 118 119 119 After add , we can see the integration here: 120 120 121 -[[image:1728536420275-153.png||height="208" width="1404"]] 121 +[[image:1728536420275-153.png||_mstalt="293748" height="208" width="1404"]] 122 122 123 123 124 124 == 3.3 Test Uplink == ... ... @@ -125,26 +125,32 @@ 125 125 126 126 We can use Simulate Uplink to simulate an uplink in the things stack. Then we should be able to see the message in ThingsEye 127 127 128 -[[image:1728536524638-768.png||height="493" width="1071"]] 128 +[[image:1728536524638-768.png||_mstalt="298870" height="493" width="1071"]] 129 129 130 130 131 -[[image:1728536541040-814.png]] 131 +[[image:1728536541040-814.png||_mstalt="293215"]] 132 132 133 133 = 4.Connect chirpstack to Thingseye by way of MQTT = 134 134 135 135 * **How to connect chirpstack to Thingseye by way of MQTT? The following tutorial will show you** 136 136 137 -== 4.1 Thingseyeadds MQTT integration==137 +== 4.1 Network Structure == 138 138 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 + 139 139 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"; 140 140 141 -[[image: 图片1.png]]147 +[[image:1758762634175-353.png]] 142 142 143 -== 4. 2Add an uplink and downlink data converter ==149 +== 4.3 Add an uplink and downlink data converter == 144 144 145 145 In the function decoder field, specify the script to parse and transform the data. 146 146 147 -[[image:图片2.png]] 153 +[[image:图片2.png||_mstalt="5131503"]] 148 148 149 149 * **Uplink——JavaScript:** 150 150 ... ... @@ -226,7 +226,7 @@ 226 226 227 227 return result; 228 228 229 -[[image:图片3.png]] 235 +[[image:图片3.png||_mstalt="5131620"]] 230 230 231 231 * **Dowblink——JavaScript:** 232 232 ... ... @@ -276,7 +276,7 @@ 276 276 277 277 return result; 278 278 279 -== 4. 3Configure the connection ==285 +== 4.4 Configure the connection == 280 280 281 281 Generate MQTT certificate integrated on chirpstack 282 282 ... ... @@ -284,9 +284,9 @@ 284 284 285 285 They correspond to the CA certificate file, Certificate file, and Private key file on thingseye 286 286 287 -[[image:图片4.png]] 293 +[[image:图片4.png||_mstalt="5131737"]] 288 288 289 -[[image:图片5.png||height="630" width="1269"]] 295 +[[image:图片5.png||_mstalt="5131854" height="630" width="1269"]] 290 290 291 291 * Copy the contents of the certificates and paste them into the linked file below, a total of three certificates are required 292 292 ... ... @@ -302,28 +302,28 @@ 302 302 303 303 Upload the certificate and key file 304 304 305 -[[image:图片6.png]] 311 +[[image:图片6.png||_mstalt="5131971"]] 306 306 307 -[[image:图片7.png]] 313 +[[image:图片7.png||_mstalt="5132088"]] 308 308 309 309 The default for Topic is: 310 310 311 311 application/**chirpstack application id**/device/+/event/up 312 312 313 -[[image:图片8.png]] 319 +[[image:图片8.png||_mstalt="5132205"]] 314 314 315 315 316 316 (% class="wikigeneratedid" %) 317 -[[image:屏幕截图 2024-11-25 095805.png||height="374" width="1272"]] 323 +[[image:屏幕截图 2024-11-25 095805.png||_mstalt="10831028" height="374" width="1272"]] 318 318 319 -== 4. 4Check the connection ==325 +== 4.5 Check the connection == 320 320 321 -[[image:图片9.png]] 327 +[[image:图片9.png||_mstalt="5132322"]] 322 322 323 -[[image:图片10.png]] 329 +[[image:图片10.png||_mstalt="5142449"]] 324 324 325 325 = 5. Check Data Uplink Log = 326 326 327 327 User can check the devices log in Intergration. 328 328 329 -[[image:1729562069134-315.png||height="587" width="723"]] 335 +[[image:1729562069134-315.png||_mstalt="294190" height="587" width="723"]]
- 1732678750938-753.jpg
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.hera - Size
-
... ... @@ -1,0 +1,1 @@ 1 +173.5 KB - Content
- 1732679080974-799.jpg
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.hera - Size
-
... ... @@ -1,0 +1,1 @@ 1 +176.4 KB - Content
- 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
- 屏幕截图 2024-11-27 113616.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.hera - Size
-
... ... @@ -1,0 +1,1 @@ 1 +117.5 KB - Content