Changes for page Connect Devices to ThingsEye
Last modified by Alec Chen on 2025/11/26 17:10
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. hera1 +XWiki.Alec - Content
-
... ... @@ -1,350 +1,505 @@ 1 +(% _mstvisible="1" %) 1 1 2 2 3 -**Table of Contents:** 4 +(% _mstvisible="1" %) 5 +(% _msthash="777" _msttexthash="303537" _mstvisible="2" %)**Table of Contents:** 4 4 5 5 {{toc/}} 6 6 7 7 8 -= 1. Overview = 10 +(% _mstvisible="1" %) 11 += (% _msthash="757" _msttexthash="149552" _mstvisible="2" %)1. Overview(%%) = 9 9 13 +(% _msthash="756" _msttexthash="7978490" _mstvisible="1" %) 10 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 12 13 -= 2. UDP Procotol ~-~- Directly Connection = 17 +(% _mstvisible="1" %) 18 += (% _msthash="755" _msttexthash="40707030" _mstvisible="2" %)2. UDP Procotol——直接连接(%%) = 14 14 15 -== 2.1 UDP Interface == 20 +(% _mstvisible="1" %) 21 +== (% _msthash="754" _msttexthash="8267792" _mstvisible="2" %)2.1 UDP接口(%%) == 16 16 17 -* Server Address: server1.thingseye.io 18 -* Port: 11560 23 +(% _mstvisible="1" %) 24 +* 服务器地址:server1.thingseye.io 25 +* 端口:11560 19 19 20 -The data sent to above UDP interface will not go directly to client's database. 27 +(% _msthash="751" _msttexthash="151236319" _mstvisible="1" %) 28 +发送到上方UDP接口的数据不会直接进入客户端数据库。 21 21 22 -Please contact ThingsEye team for detail how to forward data to client. 30 +(% _msthash="750" _msttexthash="169541242" _mstvisible="1" %) 31 +如需详细了解如何将数据转发给客户,请联系ThingsEye团队。 23 23 24 -**Note:Currently udp connections require port forwarding, please contact the ThingsEye team to inform them of your device's IMEI before connecting.** 33 +(% _mstvisible="1" %) 34 +(% _msthash="749" _msttexthash="321726288" _mstvisible="2" %)**注意:目前 UDP 连接需要端口转发,连接前请联系 ThingsEye 团队告知他们您设备的 IMEI。** 25 25 26 26 37 +(% _mstvisible="1" %) 27 27 ---- 28 28 29 -== 2.2 Test with Dragino NB device == 40 +(% _mstvisible="1" %) 41 +== (% _msthash="748" _msttexthash="55449407" _mstvisible="2" %)2.2 使用Dragino NB装置的测试(%%) == 30 30 31 -=== 2.2.1 Configure NB-IoT End Node === 43 +(% _mstvisible="1" %) 44 +=== (% _msthash="747" _msttexthash="11644464" _mstvisible="2" %)2.2.1 配置NB-IoT End Node(%%) === 32 32 33 -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 +(% _msthash="746" _msttexthash="126369737" _mstvisible="1" %) 47 +这里的设备是(% _istranslated="1" %)**[[S31-NB>>https://www.dragino.com/products/temperature-humidity-sensor/item/288-s31-nb-s31b-nb.html||_istranslated="1"]]**(%%):并且已经在下面配置了 34 34 35 -* Set to use ThingsEye UDP server: **AT+SERVADDR=server1.thingseye.io,11560** 36 -* Use UDP Uplink & Json protocol:** AT+PRO=2,5** 37 -* Equip with a NB-IoT SIM Card to access to NB-IoT Network. 49 +(% _mstvisible="1" %) 50 +* 设置为使用 ThingsEye UDP 服务器:(% _istranslated="1" %)**AT+SERVADDR=server1.thingseye.io,11560** 51 +* 使用 UDP 上行链路和 JSON 协议:(% _istranslated="1" %)**AT+PRO=2,5** 52 +* 配备NB-IoT卡以接入NB-IoT网络。 38 38 39 -The S31-NB's cellular module has the IMEI: **863663062789483** 54 +(% _msthash="742" _msttexthash="52789451" _mstvisible="1" %) 55 +S31-NB的蜂窝模块为IMEI:(% _istranslated="1" %)**863663062789483** 40 40 41 -=== 2.2.2 Check Uplink Data === 57 +(% _mstvisible="1" %) 58 +=== (% _msthash="741" _msttexthash="30173117" _mstvisible="2" %)2.2.2 检查上行数据(%%) === 42 42 43 -Turn on debug mod 60 +(% _msthash="740" _msttexthash="22249344" _mstvisible="1" %) 61 +开启调试模组 44 44 45 -[[image:1758762334133-608.png||height="494" width="1003"]] 63 +(% _mstvisible="1" %) 64 +(% _mstvisible="3" %)[[image:1758762334133-608.png||_mstalt="294801" _msthash="584" _mstvisible="5" height="494" width="1003"]] 46 46 66 +(% _mstvisible="1" %) 47 47 ---- 48 48 49 -Re-activate the S31-NB, and we can see it in the debug window: 69 +(% _msthash="739" _msttexthash="156775723" _mstvisible="1" %) 70 +重新激活S31-NB,我们可以在调试窗口中看到它: 50 50 51 -[[image:1758762371290-726.png||height="528" width="1005"]] 72 +(% _mstvisible="1" %) 73 +(% _mstvisible="3" %)[[image:1758762371290-726.png||_mstalt="296088" _msthash="586" _mstvisible="5" height="528" width="1005"]] 52 52 53 -[[image:1728378218744-800.png||_mstalt="295269" height="431" width="1003"]] 75 +(% _mstvisible="1" %) 76 +(% _mstvisible="3" %)[[image:1728378218744-800.png||_mstalt="295269" _msthash="588" _mstvisible="5" height="431" width="1003"]] 54 54 78 +(% _mstvisible="1" %) 55 55 ---- 56 56 57 -=== 2.2.4 Auto-Create Device === 81 +(% _mstvisible="1" %) 82 +=== (% _msthash="738" _msttexthash="29837379" _mstvisible="2" %)2.2.4 自动创建设备(%%) === 58 58 59 -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. 84 +(% _msthash="737" _msttexthash="810829929" _mstvisible="1" %) 85 +默认(% _istranslated="1" %)**的租户UDP服务器**(%%)已经配置好解码Dragino -NB / -CB NB-IoT节点。所以每个端节点都会向服务器发送数据。租户会自动在服务器上创建设备。 60 60 61 -[[image:1728378968101-683.png||_mstalt="297154" height="210" width="1005"]] 87 +(% _mstvisible="1" %) 88 +(% _mstvisible="3" %)[[image:1728378968101-683.png||_mstalt="297154" _msthash="590" _mstvisible="5" height="210" width="1005"]] 62 62 63 -[[image:1728379050044-764.png||_mstalt="295282" height="326" width="1009"]] 90 +(% _mstvisible="1" %) 91 +(% _mstvisible="3" %)[[image:1728379050044-764.png||_mstalt="295282" _msthash="592" _mstvisible="5" height="326" width="1009"]] 64 64 65 65 94 +(% _mstvisible="1" %) 66 66 ---- 67 67 68 -= 3. Connect to The Things Stack = 97 +(% _mstvisible="1" %) 98 += (% _msthash="736" _msttexthash="622947" _mstvisible="2" %)3. Connect to The Things Stack(%%) = 69 69 70 -== 3.1 Network Structure == 100 +(% _mstvisible="1" %) 101 +== (% _msthash="735" _msttexthash="410280" _mstvisible="2" %)3.1 Network Structure(%%) == 71 71 103 +(% _msthash="734" _msttexthash="14835652" _mstvisible="1" %) 72 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. 73 73 74 -[[image:1732679444539-853.jpg||_mstalt="296933" height="388" width="1452"]] 106 +(% _mstvisible="1" %) 107 +(% _mstvisible="3" %)[[image:1732679444539-853.jpg||_mstalt="296933" _msthash="594" _mstvisible="5" height="388" width="1452"]] 75 75 76 -== 3.2 Creat Integration for The Things Stack. == 109 +(% _mstvisible="1" %) 110 +== (% _msthash="733" _msttexthash="1191008" _mstvisible="2" %)3.2 Creat Integration for The Things Stack.(%%) == 77 77 78 -(% class="lead" %) 112 +(% _msthash="732" _msttexthash="255775" _mstvisible="1" class="lead" %) 79 79 Add Integration 80 80 81 -[[image:1728535775119-971.png||_mstalt="297661" height="423" width="1007"]] 115 +(% _mstvisible="1" %) 116 +(% _mstvisible="3" %)[[image:1728535775119-971.png||_mstalt="297661" _msthash="596" _mstvisible="5" height="423" width="1007"]] 82 82 83 83 84 -(% class="lead" %) 119 +(% _msthash="731" _msttexthash="448994" _mstvisible="1" class="lead" %) 85 85 Choose Connection Type 86 86 87 -[[image:1728535857345-950.png||_mstalt="297154" height="257" width="403"]] 122 +(% _mstvisible="1" %) 123 +(% _mstvisible="3" %)[[image:1728535857345-950.png||_mstalt="297154" _msthash="598" _mstvisible="5" height="257" width="403"]] 88 88 89 89 90 -(% class="lead" %) 126 +(% _msthash="730" _msttexthash="762996" _mstvisible="1" class="lead" %) 91 91 Input Uplink Data Converter Code 92 92 93 -[[image:1728535941851-388.png||_mstalt="297856" height="466" width="398"]] 129 +(% _mstvisible="1" %) 130 +(% _mstvisible="3" %)[[image:1728535941851-388.png||_mstalt="297856" _msthash="600" _mstvisible="5" height="466" width="398"]] 94 94 132 +(% _msthash="729" _msttexthash="16454490" _mstvisible="1" %) 95 95 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]] 96 96 97 97 98 -(% class="lead" %) 136 +(% _msthash="728" _msttexthash="532480" _mstvisible="1" class="lead" %) 99 99 Input Downlink Converter 100 100 101 -[[image:1728536142721-488.png||_mstalt="296127" height="470" width="407"]] 139 +(% _mstvisible="1" %) 140 +(% _mstvisible="3" %)[[image:1728536142721-488.png||_mstalt="296127" _msthash="602" _mstvisible="5" height="470" width="407"]] 102 102 142 +(% _msthash="727" _msttexthash="19064695" _mstvisible="1" %) 103 103 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]] 104 104 105 105 106 -(% class="lead" %) 146 +(% _msthash="726" _msttexthash="1724853" _mstvisible="1" class="lead" %) 107 107 Set up Connection to The Things Network application 108 108 109 -[[image:1728536305503-380.png||_mstalt="293254" height="431" width="1019"]] 149 +(% _mstvisible="1" %) 150 +(% _mstvisible="3" %)[[image:1728536305503-380.png||_mstalt="293254" _msthash="604" _mstvisible="5" height="431" width="1019"]] 110 110 111 111 112 112 113 -(% class="lead" %) 154 +(% _msthash="725" _msttexthash="851097" _mstvisible="1" class="lead" %) 114 114 Test Connection & Add iIntegration 115 115 116 -[[image:1728536374214-962.png||_mstalt="295893" height="380" width="1024"]] 157 +(% _mstvisible="1" %) 158 +(% _mstvisible="3" %)[[image:1728536374214-962.png||_mstalt="295893" _msthash="606" _mstvisible="5" height="380" width="1024"]] 117 117 160 +(% _msthash="724" _msttexthash="1177579" _mstvisible="1" %) 118 118 After add , we can see the integration here: 119 119 120 -[[image:1728536420275-153.png||_mstalt="293748" height="152" width="1026"]] 163 +(% _mstvisible="1" %) 164 +(% _mstvisible="3" %)[[image:1728536420275-153.png||_mstalt="293748" _msthash="608" _mstvisible="5" height="152" width="1026"]] 121 121 122 122 123 -== 3.3 Test Uplink == 167 +(% _mstvisible="1" %) 168 +== (% _msthash="723" _msttexthash="213447" _mstvisible="2" %)3.3 Test Uplink(%%) == 124 124 170 +(% _msthash="722" _msttexthash="7855835" _mstvisible="1" %) 125 125 We can use Simulate Uplink to simulate an uplink in the things stack. Then we should be able to see the message in ThingsEye 126 126 127 -[[image:1728536524638-768.png||_mstalt="298870" height="473" width="1028"]] 173 +(% _mstvisible="1" %) 174 +(% _mstvisible="3" %)[[image:1728536524638-768.png||_mstalt="298870" _msthash="610" _mstvisible="5" height="473" width="1028"]] 128 128 129 129 130 -[[image:1728536541040-814.png||_mstalt="293215" height="424" width="1026"]] 177 +(% _mstvisible="1" %) 178 +(% _mstvisible="3" %)[[image:1728536541040-814.png||_mstalt="293215" _msthash="612" _mstvisible="5" height="424" width="1026"]] 131 131 132 132 181 +(% _mstvisible="1" %) 133 133 ---- 134 134 135 -= 4.Connect chirpstack to Thingseye by way of MQTT = 184 +(% _mstvisible="1" %) 185 += (% _msthash="721" _msttexthash="1472211" _mstvisible="2" %)4.Connect chirpstack to Thingseye by way of MQTT(%%) = 136 136 137 -* **How to connect chirpstack to Thingseye by way of MQTT? The following tutorial will show you** 187 +(% _mstvisible="1" %) 188 +* (% _msthash="720" _msttexthash="4693741" _mstvisible="3" %)**How to connect chirpstack to Thingseye by way of MQTT? The following tutorial will show you** 138 138 139 -== 4.1 Network Structure == 190 +(% _mstvisible="1" %) 191 +== (% _msthash="719" _msttexthash="410371" _mstvisible="2" %)4.1 Network Structure(%%) == 140 140 193 +(% _msthash="718" _msttexthash="14117480" _mstvisible="1" %) 141 141 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. 142 142 143 -[[image:1732679647697-982.jpg||_mstalt="299884" height="399" width="1492"]] 196 +(% _mstvisible="1" %) 197 +(% _mstvisible="3" %)[[image:1732679647697-982.jpg||_mstalt="299884" _msthash="614" _mstvisible="5" height="399" width="1492"]] 144 144 145 -== 4.2 Thingseye adds MQTT integration == 199 +(% _mstvisible="1" %) 200 +== (% _msthash="717" _msttexthash="897286" _mstvisible="2" %)4.2 Thingseye adds MQTT integration(%%) == 146 146 202 +(% _msthash="716" _msttexthash="15186782" _mstvisible="1" %) 147 147 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"; 148 148 149 -[[image:1758762634175-353.png||height="783" width="1020"]] 205 +(% _mstvisible="1" %) 206 +(% _mstvisible="3" %)[[image:1758762634175-353.png||_mstalt="295893" _msthash="616" _mstvisible="5" height="783" width="1020"]] 150 150 151 -== 4.3 Add an uplink and downlink data converter == 208 +(% _mstvisible="1" %) 209 +== (% _msthash="715" _msttexthash="1329445" _mstvisible="2" %)4.3 Add an uplink and downlink data converter(%%) == 152 152 211 +(% _msthash="714" _msttexthash="4516408" _mstvisible="1" %) 153 153 In the function decoder field, specify the uplink script to parse and transform the data. 154 154 155 -[[image:1758763061703-634.png||height="783" width="1020"]] 214 +(% _mstvisible="1" %) 215 +(% _mstvisible="3" %)[[image:1758763061703-634.png||_mstalt="294671" _msthash="618" _mstvisible="5" height="783" width="1020"]] 156 156 157 -* **Uplink——JavaScript:** 217 +(% _mstvisible="1" %) 218 +* (% _msthash="713" _msttexthash="24445408" _mstvisible="3" %)**Uplink——JavaScript:** 158 158 220 +(% _msthash="712" _msttexthash="792233" _mstvisible="1" %) 159 159 var data = decodeToJson(payload); 160 160 223 +(% _msthash="711" _msttexthash="1379794" _mstvisible="1" %) 161 161 var deviceName = data.deviceInfo.deviceName; 162 162 226 +(% _msthash="710" _msttexthash="1079247" _mstvisible="1" %) 163 163 var deviceType = data.applicationName; 164 164 229 +(% _msthash="709" _msttexthash="909376" _mstvisible="1" %) 165 165 var devEui = data.deviceInfo.devEui 166 166 232 +(% _msthash="708" _msttexthash="861510" _mstvisible="1" %) 167 167 var label = data.deviceInfo.devEui 168 168 235 +(% _msthash="707" _msttexthash="195442" _mstvisible="1" %) 169 169 var model = {}; 170 170 238 +(% _msthash="706" _msttexthash="435448" _mstvisible="1" %) 171 171 var data2 = data.object; 172 172 241 +(% _msthash="705" _msttexthash="326274" _mstvisible="1" %) 173 173 var flg = data.fPort 174 174 244 +(% _msthash="704" _msttexthash="380965" _mstvisible="1" %) 175 175 for (var key in data2) { 176 176 247 +(% _msthash="703" _msttexthash="43058977" _mstvisible="1" %) 177 177 ~/~/ 将属性名存入新对象中 178 178 250 +(% _msthash="702" _msttexthash="475553" _mstvisible="1" %) 179 179 model[key] = data2[key]; 180 180 253 +(% _mstvisible="1" %) 181 181 } 182 182 256 +(% _msthash="701" _msttexthash="757653" _mstvisible="1" %) 183 183 ~/~/var obj = {"devid":deviceName} 184 184 259 +(% _msthash="700" _msttexthash="183287" _mstvisible="1" %) 185 185 var result = { 186 186 262 +(% _msthash="699" _msttexthash="473265" _mstvisible="1" %) 187 187 deviceName: deviceName, 188 188 265 +(% _msthash="698" _msttexthash="489918" _mstvisible="1" %) 189 189 deviceType: deviceType, 190 190 268 +(% _msthash="697" _msttexthash="297271" _mstvisible="1" %) 191 191 telemetry: model, 192 192 271 +(% _msthash="696" _msttexthash="446498" _mstvisible="1" %) 193 193 groupName: "Case Study", 194 194 274 +(% _msthash="695" _msttexthash="217633" _mstvisible="1" %) 195 195 ~/~/label:label, 196 196 277 +(% _msthash="694" _msttexthash="685984" _mstvisible="1" %) 197 197 attributes:{"devEui":devEui, 198 198 280 +(% _msthash="693" _msttexthash="386308" _mstvisible="1" %) 199 199 ~/~/"timevalue":"test", 200 200 283 +(% _msthash="692" _msttexthash="551772" _mstvisible="1" %) 201 201 "inactivityTimeout":1260000 202 202 286 +(% _msthash="691" _msttexthash="894530" _mstvisible="1" %) 203 203 ~/~/ "High_humidity_alarm":"not set", 204 204 289 +(% _msthash="690" _msttexthash="1052753" _mstvisible="1" %) 205 205 ~/~/ "High_temperature_alarm":"not set", 206 206 292 +(% _msthash="689" _msttexthash="848783" _mstvisible="1" %) 207 207 ~/~/ "Low_humidity_alarm":"not set", 208 208 295 +(% _msthash="688" _msttexthash="1002833" _mstvisible="1" %) 209 209 ~/~/ "Low_temperature_alarm":"not set", 210 210 298 +(% _msthash="687" _msttexthash="773682" _mstvisible="1" %) 211 211 ~/~/ "Low_voltage_alarm":"not set" 212 212 301 +(% _msthash="686" _msttexthash="2381015" _mstvisible="1" %) 213 213 ~/~/"customerName": "Civionic Engineering & Consulting (2014) Inc." 214 214 304 +(% _mstvisible="1" %) 215 215 } 216 216 307 +(% _mstvisible="1" %) 217 217 }; 218 218 310 +(% _msthash="685" _msttexthash="937586" _mstvisible="1" %) 219 219 function decodeToString(payload) { 220 220 313 +(% _msthash="684" _msttexthash="1818154" _mstvisible="1" %) 221 221 return String.fromCharCode.apply(String, payload); 222 222 316 +(% _mstvisible="1" %) 223 223 } 224 224 319 +(% _msthash="683" _msttexthash="834496" _mstvisible="1" %) 225 225 function decodeToJson(payload) { 226 226 322 +(% _msthash="682" _msttexthash="850616" _mstvisible="1" %) 227 227 var str = decodeToString(payload); 228 228 325 +(% _msthash="681" _msttexthash="512044" _mstvisible="1" %) 229 229 var data = JSON.parse(str); 230 230 328 +(% _msthash="680" _msttexthash="173511" _mstvisible="1" %) 231 231 return data; 232 232 331 +(% _mstvisible="1" %) 233 233 } 234 234 334 +(% _msthash="679" _msttexthash="233116" _mstvisible="1" %) 235 235 return result; 236 236 337 +(% _mstvisible="1" %) 237 237 ---- 238 238 340 +(% _msthash="678" _msttexthash="4743882" _mstvisible="1" %) 239 239 In the function decoder field, specify the downlink script to parse and transform the data. 240 240 241 -[[image:1758763019466-819.png||height="787" width="1022"]] 343 +(% _mstvisible="1" %) 344 +(% _mstvisible="3" %)[[image:1758763019466-819.png||_mstalt="298311" _msthash="620" _mstvisible="5" height="787" width="1022"]] 242 242 243 -* **Dowblink——JavaScript:** 346 +(% _mstvisible="1" %) 347 +* (% _msthash="677" _msttexthash="26632970" _mstvisible="3" %)**Dowblink——JavaScript:** 244 244 349 +(% _msthash="676" _msttexthash="2052284" _mstvisible="1" %) 245 245 ~/~/ Encode downlink data from incoming Rule Engine message 246 246 352 +(% _msthash="675" _msttexthash="1638546" _mstvisible="1" %) 247 247 ~/~/ msg - JSON message payload downlink message json 248 248 355 +(% _msthash="674" _msttexthash="3854773" _mstvisible="1" %) 249 249 ~/~/ msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc. 250 250 358 +(% _msthash="673" _msttexthash="3368742" _mstvisible="1" %) 251 251 ~/~/ metadata - list of key-value pairs with additional data about the message 252 252 361 +(% _msthash="672" _msttexthash="8087157" _mstvisible="1" %) 253 253 ~/~/ integrationMetadata - list of key-value pairs with additional data defined in Integration executing this converter 254 254 364 +(% _msthash="671" _msttexthash="199069" _mstvisible="1" %) 255 255 ~/~/ /~*~* Encoder ~*~*/ 256 256 367 +(% _msthash="670" _msttexthash="455715" _mstvisible="1" %) 257 257 ~/~/var data = {"value":99}; 258 258 370 +(% _msthash="669" _msttexthash="1757431" _mstvisible="1" %) 259 259 ~/~/ ~/~/ Process data from incoming message and metadata 260 260 373 +(% _msthash="668" _msttexthash="1852279" _mstvisible="1" %) 261 261 ~/~/ data.tempFreq = msg.temperatureUploadFrequency; 262 262 376 +(% _msthash="667" _msttexthash="1572038" _mstvisible="1" %) 263 263 ~/~/ data.humFreq = msg.humidityUploadFrequency; 264 264 379 +(% _msthash="666" _msttexthash="2049957" _mstvisible="1" %) 265 265 ~/~/ data.devSerialNumber = metadata['ss_serialNumber']; 266 266 382 +(% _msthash="665" _msttexthash="1576731" _mstvisible="1" %) 267 267 ~/~/ ~/~/ Result object with encoded downlink payload 268 268 385 +(% _msthash="664" _msttexthash="183287" _mstvisible="1" %) 269 269 var result = { 270 270 388 +(% _msthash="663" _msttexthash="2331082" _mstvisible="1" %) 271 271 ~/~/ downlink data content type: JSON, TEXT or BINARY (base64 format) 272 272 391 +(% _msthash="662" _msttexthash="322049" _mstvisible="1" %) 273 273 contentType: "TEXT", 274 274 394 +(% _msthash="661" _msttexthash="249210" _mstvisible="1" %) 275 275 ~/~/ downlink data 276 276 397 +(% _msthash="660" _msttexthash="1524952" _mstvisible="1" %) 277 277 data: msg.shared_value ,~/~/JSON.stringify(data), 278 278 400 +(% _msthash="659" _msttexthash="2147704" _mstvisible="1" %) 279 279 ~/~/ Optional metadata object presented in key/value format 280 280 403 +(% _msthash="658" _msttexthash="150189" _mstvisible="1" %) 281 281 metadata: { 282 282 406 +(% _msthash="657" _msttexthash="1241370" _mstvisible="1" %) 283 283 topic: '/test/down/'+metadata.deviceName 284 284 409 +(% _mstvisible="1" %) 285 285 } 286 286 412 +(% _mstvisible="1" %) 287 287 }; 288 288 415 +(% _msthash="656" _msttexthash="233116" _mstvisible="1" %) 289 289 return result; 290 290 418 +(% _mstvisible="1" %) 291 291 ---- 292 292 293 -== 4.4 Configure the connection == 421 +(% _mstvisible="1" %) 422 +== (% _msthash="655" _msttexthash="640094" _mstvisible="2" %)4.4 Configure the connection(%%) == 294 294 424 +(% _msthash="654" _msttexthash="1780675" _mstvisible="1" %) 295 295 Generate MQTT certificate integrated on chirpstack 296 296 427 +(% _msthash="653" _msttexthash="3723447" _mstvisible="1" %) 297 297 Chirpstack generates CA certificate, TLS certificate, and TLS key respectively 298 298 430 +(% _msthash="652" _msttexthash="5123092" _mstvisible="1" %) 299 299 They correspond to the CA certificate file, Certificate file, and Private key file on thingseye 300 300 301 -[[image:图片4.png||_mstalt="5131737" height="504" width="1016"]] 433 +(% _mstvisible="1" %) 434 +(% _mstvisible="3" %)[[image:图片4.png||_mstalt="5131737" _msthash="622" _mstvisible="5" height="504" width="1016"]] 302 302 303 -[[image:图片5.png||_mstalt="5131854" height="505" width="1017"]] 436 +(% _mstvisible="1" %) 437 +(% _mstvisible="3" %)[[image:图片5.png||_mstalt="5131854" _msthash="624" _mstvisible="5" height="505" width="1017"]] 304 304 439 +(% _mstvisible="1" %) 305 305 * Copy the contents of the certificates and paste them into the linked file below, a total of three certificates are required 306 306 307 -**Integrated Certificate File demo Download Address:** 442 +(% _mstvisible="1" %) 443 +(% _msthash="650" _msttexthash="44967858" _mstvisible="2" %)**Integrated Certificate File demo Download Address:** 308 308 309 -[[https:~~/~~/github.com/ThingsEye-io/te-platform/tree/main/chirpstack>>https://github.com/ThingsEye-io/te-platform/tree/main/chirpstack]] 445 +(% _mstvisible="1" %) 446 +[[https:~~/~~/github.com/ThingsEye-io/te-platform/tree/main/chirpstack>>https://github.com/ThingsEye-io/te-platform/tree/main/chirpstack||_msthash="649" _msttexthash="3132909" _mstvisible="2"]] 310 310 448 +(% _msthash="648" _msttexthash="4037631" _mstvisible="1" %) 311 311 Enter the server address Host: lns1.thingseye.io on the Connection configuration 312 312 451 +(% _msthash="647" _msttexthash="93873" _mstvisible="1" %) 313 313 Port: 8883 314 314 454 +(% _msthash="646" _msttexthash="380666" _mstvisible="1" %) 315 315 Credentials type: PEM 316 316 457 +(% _msthash="645" _msttexthash="880399" _mstvisible="1" %) 317 317 Upload the certificate and key file 318 318 319 -[[image:图片6.png||_mstalt="5131971" height="509" width="1026"]] 460 +(% _mstvisible="1" %) 461 +(% _mstvisible="3" %)[[image:图片6.png||_mstalt="5131971" _msthash="626" _mstvisible="5" height="509" width="1026"]] 320 320 321 -[[image:图片7.png||_mstalt="5132088" height="509" width="1025"]] 463 +(% _mstvisible="1" %) 464 +(% _mstvisible="3" %)[[image:图片7.png||_mstalt="5132088" _msthash="628" _mstvisible="5" height="509" width="1025"]] 322 322 466 +(% _mstvisible="1" %) 323 323 ---- 324 324 469 +(% _msthash="644" _msttexthash="472992" _mstvisible="1" %) 325 325 The default for Topic is: 326 326 472 +(% _msthash="643" _msttexthash="2223559" _mstvisible="1" %) 327 327 application/**chirpstack application id**/device/+/event/up 328 328 329 -[[image:图片8.png||_mstalt="5132205" height="508" width="1024"]] 475 +(% _mstvisible="1" %) 476 +(% _mstvisible="3" %)[[image:图片8.png||_mstalt="5132205" _msthash="630" _mstvisible="5" height="508" width="1024"]] 330 330 331 331 332 -(% class="wikigeneratedid" %) 333 -[[image:屏幕截图 2024-11-25 095805.png||_mstalt="10831028" height="301" width="1024"]] 479 +(% _mstvisible="1" class="wikigeneratedid" %) 480 +(% _mstvisible="3" %)[[image:屏幕截图 2024-11-25 095805.png||_mstalt="10831028" _msthash="632" _mstvisible="5" height="301" width="1024"]] 334 334 482 +(% _mstvisible="1" %) 335 335 ---- 336 336 337 -== 4.5 Check the connection == 485 +(% _mstvisible="1" %) 486 +== (% _msthash="642" _msttexthash="471978" _mstvisible="2" %)4.5 Check the connection(%%) == 338 338 339 -[[image:图片9.png||_mstalt="5132322" height="509" width="1025"]] 488 +(% _mstvisible="1" %) 489 +(% _mstvisible="3" %)[[image:图片9.png||_mstalt="5132322" _msthash="634" _mstvisible="5" height="509" width="1025"]] 340 340 341 -[[image:图片10.png||_mstalt="5142449" height="509" width="1026"]] 491 +(% _mstvisible="1" %) 492 +(% _mstvisible="3" %)[[image:图片10.png||_mstalt="5142449" _msthash="636" _mstvisible="5" height="509" width="1026"]] 342 342 343 343 495 +(% _mstvisible="1" %) 344 344 ---- 345 345 346 -= 5. Check Data Uplink Log = 498 +(% _mstvisible="1" %) 499 += (% _msthash="641" _msttexthash="418145" _mstvisible="2" %)5. Check Data Uplink Log(%%) = 347 347 501 +(% _msthash="640" _msttexthash="1422681" _mstvisible="1" %) 348 348 User can check the devices log in Intergration. 349 349 350 -[[image:1729562069134-315.png||_mstalt="294190" height="587" width="723"]] 504 +(% _mstvisible="1" %) 505 +(% _mstvisible="3" %)[[image:1729562069134-315.png||_mstalt="294190" _msthash="638" _mstvisible="5" height="587" width="723"]]