How to

How to Connect Your LoRaWAN Devices Through The Things Network to TagoIO

Complete guide to integrating The Things Network (TTN v3) with TagoIO. Covers webhook setup, TagoIO device creation, payload parsing, downlinks, and managing multi-device LoRaWAN fleets at scale.

Fabio Rosa ·
How to Connect Your LoRaWAN Devices Through The Things Network to TagoIO

The Things Network (TTN) is one of the most widely used LoRaWAN network servers in the world, running on The Things Stack v3. It handles device registration, LoRaWAN MAC-layer communication, and payload routing. TTN is excellent at the network layer, but it is not an application platform. It does not store your data long-term, build dashboards, or trigger alerts based on sensor values.

TagoIO is the application platform that completes the stack. It stores time-series data, drives interactive dashboards, fires alerts, runs serverless analysis scripts, and exposes a full REST API.

Connecting TTN to TagoIO is a clean, well-supported integration. TagoIO has a native TTN v3 connector that handles the webhook automatically.

What you need before you start

Architecture overview

[LoRaWAN sensors] → [LoRaWAN gateway] → [TTN v3 LNS] → (HTTPS webhook) → [TagoIO]

Every uplink flows through TTN’s network server, which authenticates it and delivers the application payload to the webhook you configure. TagoIO receives that payload, runs your parser, and stores the resulting variables.

Step 1: Create a device in TagoIO using the TTN connector

  1. Log in to admin.tago.io.
  2. Click Devices → Add Device.
  3. Search for The Things Network v3 in the connector catalog.
  4. Name the device to match your TTN end device.
  5. Click Create Device.

TagoIO displays a Webhook URL and an Authorization Token. Copy both.

Device documentation: docs.tago.io/docs/tagoio/devices

Step 2: Configure the TagoIO webhook in TTN

  1. In your TTN Application, go to Integrations → Webhooks.
  2. Click + Add webhook → Custom webhook.
  3. Set Base URL to the TagoIO Webhook URL.
  4. Under Headers, add: Authorization: YOUR_TAGOIO_TOKEN
  5. Enable Uplink message events.
  6. Save.

Step 3: Write a Payload Parser

TTN sends a JSON object on each uplink. TagoIO expects variables in its standard format:

[{"variable": "temperature", "value": 22.5, "unit": "C"}]

Option A: Use TTN payload formatter (decoded_payload)

If TTN is decoding your payload, map the decoded fields:

const decoded = payload.uplink_message.decoded_payload;
if (!decoded) { payload = []; return; }
payload = Object.entries(decoded).map(([key, value]) => ({
  variable: key, value: value
}));

Option B: Decode raw bytes in TagoIO

For raw base64 payloads (Cayenne LPP example):

const raw = Buffer.from(payload.uplink_message.frm_payload, "base64");
const temperature = raw.readInt16BE(2) / 10;
const humidity = raw.readUInt8(5) / 2;
payload = [
  { variable: "temperature", value: temperature, unit: "C" },
  { variable: "humidity", value: humidity, unit: "%" }
];

Adding RF metadata:

const rxMeta = payload.uplink_message.rx_metadata?.[0] || {};
payload.push({ variable: "rssi", value: rxMeta.rssi });
payload.push({ variable: "snr", value: rxMeta.snr });

Payload Parser docs: docs.tago.io/docs/tagoio/devices/payload-parser

Step 4: Verify in the Live Inspector

Open the Live Inspector on your device page and confirm that decoded variables arrive on the next uplink.

Live Inspector docs: docs.tago.io/docs/tagoio/devices/live-inspector

Step 5: Scale to a fleet

For large fleets, create one TagoIO device per TTN end device, or use a single TagoIO catch-all integration with an Analysis script that routes incoming data by dev_eui.

For multi-device dashboards, Blueprint Dashboards apply one layout to all devices via tags automatically.

Analysis docs: docs.tago.io/docs/tagoio/analysis

Use a TagoIO Analysis script to POST downlinks via the TTN v3 API:

const axios = require("axios");
await axios.post(
  `https://eu1.cloud.thethings.network/api/v3/as/applications/${APP_ID}/devices/${DEVICE_ID}/down/push`,
  { downlinks: [{ f_port: 1, frm_payload: Buffer.from([0x01]).toString("base64"), priority: "NORMAL" }] },
  { headers: { Authorization: `Bearer ${TTN_API_KEY}` } }
);

This lets you send commands to devices: change reporting interval, toggle a relay, request on-demand readings.

Taking it further with AI

TagoIO’s MCP server connects AI assistants like Claude to your device data. Ask: “Which devices haven’t reported in 6 hours?” or “Average temperature across all nodes in Building B?”

MCP docs: docs.tago.io/docs/tagoio/getting-started/tagoio-mcp-ai-powered-iot-data-integration

Summary

The TTN-TagoIO integration uses TagoIO’s native TTN v3 connector. Register the device in TagoIO, add the webhook in TTN, write a payload parser, and your LoRaWAN data flows into long-term storage with full dashboard and alerting capabilities.