Last modified by Hera Guo on 2024/11/29 18:42

Hide last authors
Hera Guo 2.1 1 **Table of Contents:**
2
3 {{toc/}}
4
Hera Guo 1.1 5 If you want to see the status of your gateway within your own dashboard, you can use the method in this post to add a dashboard status display widget for yourself
6
7 = 1.Import rulechain/deviceprofile/widget =
8
9 == 1.1 Get the json files ==
10
11 where to get:[[https:~~/~~/github.com/ThingsEye-io/te-platform/tree/main/Devices/Gateway/Gateway%20in%20TE>>url:https://github.com/ThingsEye-io/te-platform/tree/main/Devices/Gateway/Gateway%20in%20TE]]
12
Hera Guo 5.1 13 what files to get:Download the three json files with the suffixes Widget, and Rulechain.
Hera Guo 1.1 14
Hera Guo 5.1 15 [[image:1732876908783-867.png]]
Hera Guo 1.1 16
17 == 1.2 Import rulechain ==
18
19 Firstly, we need to import the rule chain. The rule chain tells platform how we should handel the uplink and downlink for this device.
20
21 Open rule chains, click on the "+" in the upper right corner,
22
23 select "import rule chain", and then drag the downloaded JSON file with the suffix "_rule_chain" into the text box
24
Hera Guo 4.1 25 [[image:1732871330988-833.png||height="590" width="1472"]]
Hera Guo 1.1 26
Hera Guo 4.1 27 == 1.3 Add deviceprofile ==
Hera Guo 1.1 28
Hera Guo 4.1 29 In this step, we need to create a deviceprofile to connect the device to the rulechain in the following way:
Hera Guo 1.1 30
Hera Guo 4.1 31 [[image:1732871669250-727.png||height="745" width="1483"]]
Hera Guo 1.1 32
33 == 1.4 Import widget ==
34
Hera Guo 3.1 35 First we need to open the dashboard we want to put in to show the gateway status, click "Edit mode“
Hera Guo 1.1 36
Hera Guo 3.1 37 Then click “Add widget”
Hera Guo 1.1 38
Hera Guo 4.1 39 [[image:1732871411495-758.png]][[image:Arrow.png]][[image:1732860065652-745.png]]
Hera Guo 1.1 40
Hera Guo 3.1 41 Then you need to click “Add widgts” and drag and drop the downloaded json file into it, as shown in the picture:
42
Hera Guo 4.1 43 [[image:1732871426417-457.png||height="767" width="1496"]]
Hera Guo 3.1 44
Hera Guo 1.1 45 = 2.Create gateway devices =
46
Hera Guo 3.1 47 Since a gateway can't transmit packets like a device, so we need to create a virtual gateway device ourselves in the following steps:
48
49 First of all, we need to open the device interface, click the upper right corner of the “+” and then click “Add device”, fill in the device information as shown in the figure
50
Hera Guo 4.1 51 [[image:1732872944272-113.png||height="717" width="1494"]]
Hera Guo 3.1 52
Hera Guo 4.1 53 * **Note: The device name format must be: gateway-"your Gateway EUI”**
54
55 [[image:1732873162583-780.png]]
56
Hera Guo 1.1 57 = 3.Modify the rule chain =
58
Hera Guo 4.1 59 After the device is created, we need to modify the data source of the rule chain so that our gateway's data can be stored in the device we created
60
61 == 3.1 Open our newly imported rule chain ==
62
63 [[image:1732873370029-976.png]]
64
65 == 3.2 Select the server ==
66
67 If the server our gateway connects to is TTN, we need to modify the above rulechain
68
69 [[image:1732873519190-256.png]]
70
71 If the server our gateway connects to is chirpstack, we need to modify the following rulechain
72
73 [[image:1732873574205-948.png]]
74
75 == 3.3 Modify rulechain ==
76
77 === 3.3.1 Modify the generator node: ===
78
79 [[image:1732874053403-590.png||height="749" width="1340"]]
80
81 === 3.3.2 Modify the rest api call node: ===
82
83 [[image:1732874643625-371.png||height="738" width="1348"]]
84
85 * **Don't forget to save your changes when they're done!**
86
87 === 3.3.3 Where to find this information on the server ===
88
89 TTN:
90
91 [[image:1732874983084-697.png]]
92
93 Regarding the API key acquisition, we need to create one as shown below:
94
95 [[image:1732875200332-670.png]]
96
97 [[image:1732875581453-282.png||height="688" width="1838"]]
98
99 [[image:1732875893182-155.png]]
100
101 **Then copy the API key**
102
103 Chirpstack:
104
105 The EUI and ID of chirpstack are identical:
106
Hera Guo 6.1 107 [[image:1732876339913-617.png||height="556" width="2195"]]
Hera Guo 4.1 108
109 Regarding the API key acquisition, we need to create one as shown below:
110
Hera Guo 6.1 111 [[image:屏幕截图 2024-11-29 183344.png||height="600" width="2191"]]
Hera Guo 4.1 112
Hera Guo 6.1 113 [[image:屏幕截图 2024-11-29 183436.png]][[image:Arrow.png]][[image:屏幕截图 2024-11-29 183501.png||height="261" width="1215"]]
Hera Guo 4.1 114
115 **Then copy the API key**
116
Hera Guo 1.1 117 = 4.Check if the widget is displayed correctly =
Hera Guo 4.1 118
119 [[image:1732876759232-239.png]]