Skip to main content
All CollectionsUser Guides
Plugins: Monitor your TTS LoRaWAN gateways with Ubidots
Plugins: Monitor your TTS LoRaWAN gateways with Ubidots

Make sure that your The Things Stack deployment is running by monitoring your LoRaWAN gateways in just a few clicks.

Sergio M avatar
Written by Sergio M
Updated over 3 months ago

IoT is mostly about getting smart devices to talk to the cloud, but maximizing its network’s uptime and quality of service is equally important.

With this plugin and Ubidots' drag-n-drop IoT dashboards, you'll be able to build your own Network Operating Center (NOC) for your LoRaWAN gateways:

If you have gateways out in the field and you’re are wondering whether they are performing right, then this plugin is for you. You’re just a few clicks away from creating your own NOC.

Requirements

1. Creating a The Things Stack (Gateways) Plugin

In your Ubidots account, click on the Plugins option under the Devices section, then click on the "+" icon in the upper right corner and select The Things Stack (Gateways):

Configure your plugin according to the input settings detailed in the following section.

2. Input Parameters

  • TTI Tenant ID: If you have a TTI Dedicated Cloud license, you can find your Tenant ID as the first portion of your account access URL, more info here. If that is not the case, set this field to "community" in order to use the community version.

  • Your TTS API Key: A TTS API Key with at least these permissions:

    • View gateway information

    • View gateway location

    • View gateway status

    • List the gateways the organization is a collaborator of

    • List the gateways the user is a collaborator of

  • Your Ubidots token: Ubidots recommends creating a new token reserved for this plugin, which can be done here.

  • Run every: How often you'd like to retrieve your gateways' data.

3. Output devices

An Ubidots device will be created for every gateway found. If the gateway is online, the resulting device will contain all of these data:

Device information:

  • Device name: Gateway's name, as seen in the TTS console.

  • Device label: Gateway's ID.

  • Device description: Gateway's description.

Properties:

  • Frequency plan: Gateway's frequency plan.

  • Gateway EUI: Gateway's EUI.

  • Location public: True or false, as seen in the TTS console.

  • Server: TTS server to which the gateway is linked to.

  • Status public: True or false, as seen in the TTS console.

Variables:

  • Status: A periodic heartbeat to check if your gateway is connected. Value is "1" when connected, or "0" when disconnected.

  • Uplink Received At: Date logs of when uplink packets were received.

  • Downlink Received At: Date logs of when downlink packets were received.

  • Uplink Count: Uplink packet count since the last reboot.

  • Downlink Count: Downlink packet count since the last reboot.

4. Notes

  • Only the variables are updated at the specified time interval. If you need to update device properties, please stop and restart the plugin:

  • If a gateway is offline, the resulting device will only update its status variable, which will equal to "0".

  • A device type called "tti-gateway" is automatically created. You can use this to change the icon and colors to your liking:

5. Troubleshooting

For this plugin to work, you need to make sure you're using a valid TTS API Key. If you can't see any data or newly created devices, please check your API key using an HTTP client such as Postman, by making this request:

URL: https://tti.eu1.cloud.thethings.industries/api/v3/gateways 
Method: GET
Auth: Use your TTS API Key in a Bearer token header

You should be getting a successful response like this:

Did this answer your question?