How to integrate Tektelic Network Server with TagoIO
This tutorial provides a step-by-step guide to integrate Tektelic with the TagoIO Platform. By following these instructions, you will enable uplink and downlink operations, allowing data exchange between your LoRaWAN devices and the TagoIO application.
Prerequisites
Before you begin, ensure you have the following:
- Tektelic Account
- LoRaWAN Device: Ensure your device is connect to Tektelic and transmitting data.
Step 1: Create Authorization in TagoIO
- Access Authorizations:
- Go to Devices.
- Click on Authorizations at the top of the page.
- Create a New Authorization:
- Click the Create Authorization button.
- Provide a meaningful name for the authorization (e.g., Tektelic-Integration).
- Click Save.
- Copy the Authorization Token:
- After creation, copy the authorization token. You will need this in later steps.
Step 2: Set Up Data Converter in Tektelic
Tektelic provides built-in data converters, but if you prefer using TagoIO's converter or if Tektelic lacks a specific converter for your device, follow these steps:
- Log in to your Tektelic Administrator Console.
- Navigate to Data Converters:
- Go to Data Converter section.
- Click the + button to create a new converter.
- Fill Converter Details:
Field | Description |
Name | Enter a unique identifier (e.g., tagoio-decoder). |
Type | Select CUSTOM from the dropdown menu. |
Decoder | Copy the provided decoder script below |
Encoder | Copy the provided encoder script below |
Encoder:
- // Do not decode anything, just put it into AS as is
- var arr = [];
- for (var i = 0; i < bytes.length; ++i) {
- arr.push(bytes[i]);
- }
- return {"bytes": JSON.stringify(arr), "port": port, "payload length": bytes.length};
Decoder:
- // Encode downlink messages sent in
- // Base64 format as an array or buffer of bytes.
- function atob(input) {
- var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
- var str = String(input).replace(/[=]+$/, ''); // #31: ExtendScript bad parse of /=
- if (str.length % 4 === 1) {
- throw new InvalidCharacterError("'atob' failed: The string to be decoded is not correctly encoded.");
- }
- for (
- var bc = 0, bs, buffer, idx = 0, output = '';
- buffer = str.charAt(idx++);
- ~buffer && (bs = bc % 4 ? bs * 64 + buffer : buffer, bc++ % 4) ? output += String.fromCharCode(255 & bs >> (-2 * bc & 6)) : 0
- ) {
- buffer = chars.indexOf(buffer);
- }
- return output;
- }
- function base64ToArray(base64) {
- var binary_string = atob(base64);
- var len = binary_string.length;
- var result = [];
- for (var i = 0; i < len; i++) {
- result.push(binary_string.charCodeAt(i));
- }
- return new Int8Array(result);
- }
- if (data.params) {
- var bytes = base64ToArray(data.params.data);
- return {"port": data.params.port, "bytes": bytes};
- }
- return {"port": 0, "bytes": [0x00]};
Step 3: Set Up Integration in Tektelic
- Navigate to Integrations:
- In the Tektelic console, go to Applications > Select Your Application > Integrations.
- Click the + button to add a new integration.
- Fill Integration Details:
Field | Description |
Name | Enter a unique identifier (e.g., tagoio-integration). |
Type | Select TagoIO from the dropdown menu. |
Data Converter | Select the TagoIO converter you created earlier or you preferred converter. |
Authorization | Add a header for Authorization and set its value to the authorization token you copied in Step 1. |

After saving the integration, copy the HTTP URL path provided. This URL will be used to link Tektelic with TagoIO.
Save the Integration:
- After filling in all the fields, click Save to create the webhook integration.
Step 5: Add Device in TagoIO
To integrate your device with the TagoIO Platform, follow these guidelines:
- Ensure Device EUI Consistency:
- When creating the device in TagoIO, use the exact same Device EUI that is configured in Tektelic.
- The Device EUI must match exactly to establish a successful connection between Tektelic and TagoIO.
- Select the Appropriate Network and Device Type:
- Choose the LoRaWAN Tektelic Network during the device setup process.
- Select the correct device type from the available options. If your device is not listed, you can add support through connectors.
- Add Device Support via Connectors (If Necessary):
- If your device type is not available in the default list, enhance its compatibility by utilizing connectors.
- For more information on available connectors and how to use them, refer to the Connector Overview.
For detailed instructions on adding devices, visit the
Adding Devices page.
Finalizing Setup
- Power On Your Devices:
- Turn on your LoRaWAN device and gateway to initiate data transmission.
- Verify Data Reception:
- In TagoIO, navigate to the Device and into the Data tab to confirm that data is being received.
- Alternatively, use the Live Inspector within your device settings to monitor incoming data in real-time.
With data successfully flowing into TagoIO, you can start creating Dashboards, Analyses, and Actions to visualize and manage your device data effectively.