Skip to content

The Things Network (TTN)

LoRaWAN Integration

Icelake integrates directly with The Things Network (TTN) — the world’s largest open LoRaWAN network. Ingest data from any TTN-connected device without middleware, custom code, or message brokers.

Icelake auto-parses TTN uplink messages, extracting device metadata, signal quality, and decoded sensor values into queryable metrics stored on S3.


  • A The Things Network account with at least one registered application
  • Devices registered and sending uplinks in your TTN application
  • An Icelake account at app.icelake.eu

TTN provides MQTT access to your application data. You need three things:

  1. Server address — depends on your TTN cluster:

    • Europe: eu1.cloud.thethings.network
    • North America: nam1.cloud.thethings.network
    • Australia: au1.cloud.thethings.network
  2. Username — your TTN Application ID followed by @ttn, e.g.:

    my-city-sensors@ttn
  3. Password (API Key) — create one in the TTN Console:

    1. Go to your Application in TTN Console
    2. Navigate to API Keys
    3. Click Add API Key
    4. Grant at least Read application traffic (uplinks) permission
    5. Copy the key (starts with NNSXS.)

Step 2: Add TTN as an MQTT source in Icelake

Section titled “Step 2: Add TTN as an MQTT source in Icelake”
  1. Go to app.icelake.eu and sign in
  2. Navigate to Data InMQTT Sources
  3. Click Add MQTT Source
  4. Fill in the connection details:
FieldValue
Namee.g., ttn-city-sensors
Broker URLmqtts://eu1.cloud.thethings.network:8883
Usernamemy-city-sensors@ttn
PasswordYour TTN API key (NNSXS.xxx...)
Topicv3/my-city-sensors@ttn/devices/+/up
Parsing ModeTTN LoRaWAN
  1. Click Save — Icelake connects to TTN and starts ingesting uplinks immediately

Topic patterns: Use + as a wildcard for a single level. v3/{app-id}@ttn/devices/+/up subscribes to uplinks from all devices in your application.


Once connected, you can verify data ingestion in several ways:

In the Admin Dashboard:

  • Go to Data Sets — you’ll see new datasets appearing for your TTN devices
  • Each device’s decoded payload fields become queryable columns

With AI MasterMind:

Show me the latest readings from all TTN devices

With SQL (via psql or DBeaver):

SELECT *
FROM metrics
WHERE metric_name LIKE 'ttn_%'
ORDER BY timestamp DESC
LIMIT 20;

When using TTN LoRaWAN parsing mode, Icelake automatically extracts:

FieldDescription
device_idTTN device ID
device_euiDevice EUI (unique hardware identifier)
application_idTTN application name
join_euiJoin EUI
FieldDescription
rssiReceived Signal Strength Indicator (dBm)
snrSignal-to-Noise Ratio (dB)
spreading_factorLoRa spreading factor (7–12)
bandwidthChannel bandwidth (Hz)
frequencyTransmission frequency (Hz)
gateway_idReceiving gateway ID

All fields from your device’s payload decoder are automatically mapped to metric values. For example, if your decoder outputs:

{
"temperature": 22.5,
"humidity": 65.3,
"battery": 3.6,
"pm25": 12.4
}

Each field becomes a separate queryable metric: ttn_temperature, ttn_humidity, ttn_battery, ttn_pm25.


Example: Docker Compose with TTN simulator

Section titled “Example: Docker Compose with TTN simulator”

For testing, you can simulate TTN uplinks using a simple MQTT publisher. This docker-compose sends test messages in TTN format to Icelake:

docker-compose.yml
services:
ttn-simulator:
image: eclipse-mosquitto:2
entrypoint: /bin/sh
command: >
-c "
while true; do
mosquitto_pub \
-h eu1.cloud.thethings.network \
-p 8883 \
--capath /etc/ssl/certs \
-u 'my-city-sensors@ttn' \
-P 'NNSXS.your-api-key-here' \
-t 'v3/my-city-sensors@ttn/devices/test-sensor/up' \
-m '{
\"end_device_ids\": {
\"device_id\": \"air-quality-001\",
\"dev_eui\": \"0004A30B001F2C3D\"
},
\"uplink_message\": {
\"decoded_payload\": {
\"temperature\": '\"$$(awk 'BEGIN{printf \"%.1f\", 15+rand()*15}')\"',
\"humidity\": '\"$$(awk 'BEGIN{printf \"%.1f\", 40+rand()*40}')\"',
\"pm25\": '\"$$(awk 'BEGIN{printf \"%.1f\", 5+rand()*30}')\"',
\"battery\": 3.6
},
\"rx_metadata\": [{
\"gateway_ids\": {\"gateway_id\": \"gw-city-center\"},
\"rssi\": -75,
\"snr\": 8.5
}],
\"settings\": {
\"frequency\": \"868100000\",
\"data_rate\": {\"lora\": {\"spreading_factor\": 7, \"bandwidth\": 125000}}
}
}
}'
sleep 60
done
"

Once your TTN data is flowing, try these queries in AI MasterMind:

  • “Show me average temperature per device over the last 24 hours”
  • “Which sensors have the lowest battery voltage?”
  • “Plot PM2.5 readings across all city districts today”
  • “Are there any devices with RSSI below -110 dBm?”
  • “Compare humidity trends between downtown and park sensors”

  • Use payload decoders in TTN — Icelake works best when your TTN application has a payload decoder configured. Raw bytes won’t be parsed automatically.
  • Monitor signal quality — RSSI and SNR are auto-extracted, making it easy to detect coverage gaps with AI MasterMind.
  • Scale to thousands of devices — Icelake handles high-volume MQTT ingestion natively. No message queues or adapters needed between TTN and Icelake.
  • Multi-application support — Add multiple TTN applications as separate MQTT sources, each with their own API key and tenant isolation.