How to view gateway status in your own dashboard

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

Table of Contents:

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

1.Import rulechain/deviceprofile/widget

1.1 Get the json files

where to get:https://github.com/ThingsEye-io/te-platform/tree/main/Devices/Gateway/Gateway%20in%20TE

what files to get:Download the three json files with the suffixes Widget, and Rulechain.

1732876908783-867.png

1.2 Import rulechain

Firstly, we need to import the rule chain. The rule chain tells platform how we should handel the uplink and downlink for this device.

Open rule chains, click on the "+" in the upper right corner,

select "import rule chain", and then drag the downloaded JSON file with the suffix "_rule_chain" into the text box

1732871330988-833.png

1.3 Add deviceprofile

In this step, we need to create a deviceprofile to connect the device to the rulechain in the following way:

1732871669250-727.png

1.4 Import widget

First we need to open the dashboard we want to put in to show the gateway status, click "Edit mode“

Then click “Add widget”

1732871411495-758.pngArrow.png1732860065652-745.png

Then you need to click “Add widgts” and drag and drop the downloaded json file into it, as shown in the picture:

1732871426417-457.png

2.Create gateway devices

Since a gateway can't transmit packets like a device, so we need to create a virtual gateway device ourselves in the following steps:

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

1732872944272-113.png

  • Note: The device name format must be: gateway-"your Gateway EUI”

1732873162583-780.png

3.Modify the rule chain

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

3.1 Open our newly imported rule chain

1732873370029-976.png

3.2 Select the server

If the server our gateway connects to is TTN, we need to modify the above rulechain

1732873519190-256.png

If the server our gateway connects to is chirpstack, we need to modify the following rulechain

1732873574205-948.png

3.3 Modify rulechain

3.3.1 Modify the generator node:

1732874053403-590.png

3.3.2 Modify the rest api call node:

1732874643625-371.png

  • Don't forget to save your changes when they're done!

3.3.3 Where to find this information on the server

TTN:

1732874983084-697.png

Regarding the API key acquisition, we need to create one as shown below:

1732875200332-670.png

1732875581453-282.png

1732875893182-155.png

Then copy the API key

Chirpstack:

The EUI and ID of chirpstack are identical:

1732876339913-617.png

Regarding the API key acquisition, we need to create one as shown below:

屏幕截图 2024-11-29 183344.png

屏幕截图 2024-11-29 183436.pngArrow.png屏幕截图 2024-11-29 183501.png

Then copy the API key

4.Check if the widget is displayed correctly

1732876759232-239.png