The Things Stack
Qubitro The Things Stack integration.
This guide will help you integrate The Things Stack devices with Qubitro
Optional, follow guidance on The Things Stack documentation.
Qubitro
Qubitro The Things Stack Documentation

Adding Integration

Get Credentials

Project ID and Webhook Signing Key are necessary for the integration.
If you haven't already created a project on Qubitro, log in to the Qubitro portal and create a new project.
Click on the created project from the left menu, click on Add device and choose The Things Stack.
Required credentials will appear for the integration. You can copy values immediately or click the Continue button and access these credentials later under the Credentials and Project Settings tab anytime.

Add Webhook on The Things Network

If you don't already have an application on The Things Network, log in to the TTN Console and create a new application.
Click on Integrations > Webhooks under the application menu.
The Things Network Webhooks
Click on the + Add webhook button on the top-right of the page and choose Qubitro from the list.
Qubitro - The Things Network
Give a name to your webhook and paste Project ID and Webhook Signing Key into the corresponding fields.

Observe Devices and Device Data

Refresh the device list and make sure all devices are synchronized.
You can click on any device and update device basics, including photo, model, brand, and more.

Payload Formatters

Payload formatters allow you to process data going to and from end devices.
For Qubitro to be able to decode the data coming from The Things Stack, you need to create an uplink payload formatter. Payload formatter can be created on both Qubitro and The Things Stack.
The example uplink payload formatter is shown below.
As seen below, the returned value must be a JSON object with the 'data' key.
1
function decodeUplink(input) {
2
return {
3
data: {
4
temperature: input.bytes[0],
5
humidity: input.bytes[1]
6
},
7
warnings: [],
8
errors: []
9
};
10
}
Copied!

Creating Payload Formatter

To create a payload formatter for Uplink messages, you can click on any device and the Formatter tab.
If the payload formatter is created on The Things Stack, Qubitro automatically accepts decoded data and ignores created formatter on Qubitro.
As seen below, the function name must be 'decodeUplink' and must accept only a single parameter.

Validate Payload Formatter

Working with Data

Once the payload formatter is set up correctly, it is possible to utilize all Qubitro features, including visualizing data and building custom applications with Qubitro APIs.

Visualizing Data

Data can be visualized by creating widgets under the Analytics tab and/or the Monitoring section in the left menu to build dashboards.
Multiple charts are also can be added under a specific device.
Data can be filtered by clicking the calendar view under Analytics & Data tab.

Working with APIs

It is possible to utilize Qubitro APIs for various scenarios. Visit API documentation below to learn more.
Welcome
Qubitro API Documentation (Beta)