Last modified by Hera Guo on 2025/09/25 09:23

From version 17.1
edited by Hera Guo
on 2024/11/27 11:46
Change comment: There is no comment for this version
To version 23.1
edited by Hera Guo
on 2025/09/25 09:18
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -7,95 +7,90 @@
7 7  
8 8  = 1. Overview =
9 9  
10 -The instructions in this chapter will 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: 11562
18 +* 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 -In server side, Tenant Administrator can check this in Tenant UDP 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,11562**
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.2 Check Uplink 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:1728378218744-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  
65 -=== 2.3.3 Auto-Create Device ===
55 +----
66 66  
57 +=== 2.2.4 Auto-Create Device ===
58 +
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="273" width="1307"]]
61 +[[image:1728378968101-683.png||_mstalt="297154" height="210" width="1005"]]
70 70  
71 -[[image:1728379050044-764.png||height="424" width="1312"]]
63 +[[image:1728379050044-764.png||_mstalt="295282" height="326" width="1009"]]
72 72  
73 73  
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.**
66 +----
75 75  
76 76  = 3.  Connect to The Things Stack =
77 77  
78 78  == 3.1 Network Structure ==
79 79  
72 +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  
74 +[[image:1732679444539-853.jpg||_mstalt="296933" height="388" width="1452"]]
75 +
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"]]
81 +[[image:1728535775119-971.png||_mstalt="297661" height="423" width="1007"]]
87 87  
88 88  
89 89  (% class="lead" %)
90 90  Choose Connection Type
91 91  
92 -[[image:1728535857345-950.png]]
87 +[[image:1728535857345-950.png||_mstalt="297154" height="257" width="403"]]
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"]]
93 +[[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"]]
101 +[[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"]]
109 +[[image:1728536305503-380.png||_mstalt="293254" height="431" width="1019"]]
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]]
116 +[[image:1728536374214-962.png||_mstalt="295893" height="380" width="1024"]]
122 122  
123 123  After add , we can see the integration here:
124 124  
125 -[[image:1728536420275-153.png||height="208" width="1404"]]
120 +[[image:1728536420275-153.png||_mstalt="293748" height="152" width="1026"]]
126 126  
127 127  
128 128  == 3.3 Test Uplink ==
... ... @@ -129,26 +129,34 @@
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"]]
127 +[[image:1728536524638-768.png||_mstalt="298870" height="473" width="1028"]]
133 133  
134 134  
135 -[[image:1728536541040-814.png]]
130 +[[image:1728536541040-814.png||_mstalt="293215" height="424" width="1026"]]
136 136  
132 +
133 +
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 Thingseye adds MQTT integration ==
138 +== 4.1 Network Structure ==
142 142  
140 +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.
141 +
142 +[[image:1732679647697-982.jpg||_mstalt="299884" height="399" width="1492"]]
143 +
144 +== 4.2 Thingseye adds MQTT integration ==
145 +
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]]
148 +[[image:1758762634175-353.png||height="783" width="1020"]]
146 146  
147 -== 4.2 Add an uplink and downlink data converter ==
150 +== 4.3 Add an uplink and downlink data converter ==
148 148  
149 -In the function decoder field, specify the script to parse and transform the data.
152 +In the function decoder field, specify the uplink script to parse and transform the data.
150 150  
151 -[[image:图片2.png]]
154 +[[image:1758763061703-634.png||height="783" width="1020"]]
152 152  
153 153  * **Uplink——JavaScript:**
154 154  
... ... @@ -230,8 +230,12 @@
230 230  
231 231  return result;
232 232  
233 -[[image:图片3.png]]
236 +----
234 234  
238 +In the function decoder field, specify the downlink script to parse and transform the data.
239 +
240 +[[image:1758763019466-819.png||height="787" width="1022"]]
241 +
235 235  * **Dowblink——JavaScript:**
236 236  
237 237  ~/~/ Encode downlink data from incoming Rule Engine message
... ... @@ -280,8 +280,10 @@
280 280  
281 281  return result;
282 282  
283 -== 4.3 Configure the connection ==
290 +----
284 284  
292 +== 4.4 Configure the connection ==
293 +
285 285  Generate MQTT certificate integrated on chirpstack
286 286  
287 287  Chirpstack generates CA certificate, TLS certificate, and TLS key respectively
... ... @@ -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]]
300 +[[image:图片4.png||_mstalt="5131737" height="504" width="1016"]]
292 292  
293 -[[image:图片5.png||height="630" width="1269"]]
302 +[[image:图片5.png||_mstalt="5131854" height="505" width="1017"]]
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]]
318 +[[image:图片6.png||_mstalt="5131971"]]
310 310  
311 -[[image:图片7.png]]
320 +[[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]]
326 +[[image:图片8.png||_mstalt="5132205"]]
318 318  
319 319  
320 320  (% class="wikigeneratedid" %)
321 -[[image:屏幕截图 2024-11-25 095805.png||height="374" width="1272"]]
330 +[[image:屏幕截图 2024-11-25 095805.png||_mstalt="10831028" height="374" width="1272"]]
322 322  
323 -== 4.4 Check the connection ==
332 +== 4.5 Check the connection ==
324 324  
325 -[[image:图片9.png]]
334 +[[image:图片9.png||_mstalt="5132322"]]
326 326  
327 -[[image:图片10.png]]
336 +[[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"]]
342 +[[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
1758762919291-489.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.hera
Size
... ... @@ -1,0 +1,1 @@
1 +209.4 KB
Content
1758763019466-819.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.hera
Size
... ... @@ -1,0 +1,1 @@
1 +227.9 KB
Content
1758763061703-634.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.hera
Size
... ... @@ -1,0 +1,1 @@
1 +222.0 KB
Content