v3.24.1

Getting Started Devices Gateways Integrations Reference
Get The Things Stack

Integrations

    Overview
  • Adding Applications
  • Adding Integrations
  • Cloud Integrations
    • akenza
    • AllThingsTalk Maker
    • AnyViz
    • AWS IoT
      • Architecture
      • Deployment Guide
      • Managing Things
      • Messages
      • Metrics
      • Update
      • Uninstall
      • Troubleshooting AWS IoT Integration
    • Azure IoT Central
    • Azure IoT Hub
    • Blockbax
    • Cayenne
    • Cloud Studio
    • Daizy
    • Datacake
    • Delmation Products
    • deZem
    • Homey
    • InfluxDB Cloud 2.0
    • IoT in a Box
    • Kaa
    • Losant IoT Platform
    • MClimate
    • my IoT open Tech
    • Qubitro
    • TagoIO
    • Telemetry2U
    • Tellsens
    • thethings.iO
    • Thinger.io
    • ThingsBoard
    • ThingSpeak
    • TTN Mapper
    • Ubidots
    • UIB
    • Widgelix
    • Withthegrid
  • MQTT Server
  • Pub/Sub
  • LoRa Cloud
  • Node-RED
  • IFTTT
  • Payload Formatters
  • Storage Integration
  • Webhooks

Messages

The Things Stack publishes uplink messages to AWS IoT Core MQTT. An IoT Core rule triggers a Lambda function which processes the message, creates a new IoT Core thing if it doesn’t exist, and updates the shadow state with metrics. Device activations and uplink messages get republished so your application can act on them.

Your application can schedule downlink messages by publishing a JSON object to an AWS IoT Core MQTT topic. An IoT Core rule triggers a Lambda function which performs an API call to The Things Stack to enqueue the downlink message.

See Architecture for the flow.

Activations and Uplink Messages

The AWS IoT Integration for The Things Stack uses the following topics for upstream traffic:

  • Activations: lorawan/<thing>/join
  • Uplink: lorawan/<thing>/uplink

See Manage Things to learn about the thing names.

Note:
Use Rules for AWS IoT to act on these messages for storage, analytics, alarms and API calls.
Note:
This guide uses AWS IoT Core MQTT client for demonstration purposes only.

In the AWS Console, open Services and go to IoT Core.

In the menu on the left, open Test and click MQTT test client.

Subscribe Uplink

In Subscription topic, enter lorawan/# to subscribe to all events from all LoRaWAN things in your account.

Click Subscribe.

Uplink Message

Downlink Messages

The AWS IoT Integration for The Things Stack uses the lorawan/downlink topic for downstream traffic.

Feedback events are published on the following topics:

  • lorawan/<thing>/downlink/queued (when any downlink has been queued)
  • lorawan/<thing>/downlink/sent (when the downlink has been sent by the Network Server)
  • lorawan/<thing>/downlink/failed (when the Network Server failed to send the downlink message)
  • lorawan/<thing>/downlink/ack (when the end device acknowledged the confirmed downlink message)
  • lorawan/<thing>/downlink/nack (when the end device did not acknowledge the confirmed downlink message)
Note:
Publish downlink messages from your application to IoT Core using AWS IoT Data Plane using the Publish action.
Note:
This guide uses AWS IoT Core MQTT client for demonstration purposes only.

Still in the AWS IoT MQTT client, enter the downlink topic lorawan/downlink.

The message is a JSON object with the following format:

{
  "thingName": "<thingName>",

  "bytes": "AQ==", // Base64 encoded FRMPayload
  // or
  "payload": {     // JSON encoded payload
    "field1": 42
  },

  // Optional fields
  "fPort": 10,         // FPort (default: 1)
  "confirmed": true,   // Confirmed data downlink (default: false)
  "highPriority": true // High priority (default: false)
}

When you publish downlink this way, you will immediately see a message on lorawan/<thing>/downlink/queued. Keep an eye on other messages published to lorawan/<thing>/downlink/# for the sent, failed, acknowledged and not acknowledged events.

See Manage Things to find the thingName for the end device.

← Managing Things Metrics →

On this page

  • Activations and Uplink Messages
  • Downlink Messages

The Things Stack

Getting Started

Devices

Gateways

Integrations

Reference

Contributing

GitHub

Forum

About Us

The Things Network

The Things Industries

About this page

Last changed by Johan Stokking on 21 Feb 2023.
The Things Join Server and related documentation (#1041)

Edit on Github