Early adopter pricing — locked for life. Only 4 spots available. Claim yours now before spots run out →

The Things Network (TTN) Integration

Connect your TTN v3 application to DataKubo and start ingesting device data automatically.

Prerequisites

  • A DataKubo account with an API key (sign up)
  • A TTN v3 application with at least one registered device
  • A payload decoder configured on your TTN application

Step 1: Add a webhook

In the TTN Console:

  1. Navigate to Applications → Your Application → Integrations → Webhooks
  2. Click Add webhook and select Custom webhook
  3. Configure:
FieldValue
Webhook IDdatakubo
Webhook formatJSON
Base URLhttps://api.datakubo.com/api/v1/ingest/water-consumption
Additional headersX-API-Key: your_api_key
  1. Enable Uplink message under event types
  2. Click Create webhook

Step 2: Configure your payload decoder

DataKubo expects decoded payload fields. Make sure your TTN application has a payload decoder that outputs at least one of these fields:

// Example TTN payload decoder
function decodeUplink(input) {
  return {
    data: {
      cumulativeFlowM3: (input.bytes[0] << 24 | input.bytes[1] << 16 | input.bytes[2] << 8 | input.bytes[3]) / 1000,
      battery: input.bytes[4] / 10
    }
  };
}
⚠️

TTN messages without a decoded_payload are acknowledged (HTTP 200) but no data is stored. Always configure a payload decoder.

Step 3: Verify data flow

After the next device uplink:

  1. Check TTN Console → Webhooks → datakubo for delivery status
  2. Check DataKubo admin → Devices for the new device and readings

Field mapping reference

TTN Decoded FieldDataKubo FieldNotes
cumulativeFlowM3consumption_m3Preferred — cubic meters
waterconsumption_m3B-Meters alternative
cumulativeFlowconsumption_m3Liters — auto-converted to m³
battery / bateriabattery_levelVoltage
battery_statusbattery_level"OK" → 3.6V, "LOW" → 2.8V

Next steps