Skip to content
The Things Stack documentation home
Getting Started Concepts Cloud Enterprise Integrations API Hardware
Getting Started Concepts
Cloud Enterprise
Integrations API Hardware
Get The Things Stack

    Recent searches

      Popular pages

      • Getting Started
      • Adding Gateways
      • Adding Devices
      • Payload Formatters
      • Webhooks
      • Authentication

      No results for “”.

      • Check the spelling, or try fewer or more general words.
      • Ask the community on The Things Network Forum
      • Contact support
      ↑↓ to navigate ↵ to open Esc to close

      Integrations

      • Overview
      • Adding Applications
      • Data Formats
      • Payload Formatters
      • Webhooks
      • Storage Integration
      • Integrate with popular IoT platforms
        • 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
        • Blynk
        • Cayenne
        • Cloud Studio
        • Daizy
        • Datacake
        • Delmation Products
        • deZem
        • evrlast
        • Homey
        • InfluxDB Cloud 2.0
        • IoT in a Box
        • IoT Wonderland
        • Kaa
        • Losant IoT Platform
        • MClimate
        • my IoT open Tech
        • Qubitro
        • TagoIO
        • Telemetry2U
        • Tellsens
        • thethings.iO
        • Thinger.io
        • ThingsBoard
        • ThingSpeak
        • TTN Mapper
        • Ubidots
        • UIB
        • UnaConnect
        • Widgelix
        • Withthegrid
        • Zoho IoT
      • Other integrations
      • Application Packages
      • Examples

      Messages

      Updated 19 April 2023 Edit on GitHub
      Copy page
      • View as MarkdownThis page as plain text
      • Open in ChatGPTAsk questions about this page
      • Open in ClaudeAsk questions about this page

      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

      Sections

      Getting Started

      Concepts

      Cloud

      Enterprise

      Integrations

      API

      Hardware

      Sitemap

      View our Sitemap

      Contributing

      GitHub

      About Us

      The Things Industries

      Privacy Policy

      Cookie settings

      Cookie Settings

      We use cookies to enhance your experience, analyze site traffic and deliver personalized content. Read our Privacy Policy.

      Cookie categories