Datacake Docs
  • Welcome
  • Get Started
  • Changelog
  • Best practices
    • Best practices: Getting started
    • Best practices: Resolution (Timeframe)
    • Best practices: Dashboards
    • Best practices: Reports
    • Best practices: Grouping Devices
  • Datacake LNS
    • Getting Started
    • Gateways
      • Milesight LoRaWAN Gateway - UG6x
      • RAKwireless WisGate Edge Light 2
    • Devices
    • Add Devices without Gateway
  • Device
    • Product
    • Configuration
    • Claiming
    • Historical Data
    • Database
      • Configuration Fields
      • Fields
        • Manual input
        • Field Roles
        • Formulas
        • Mapping Fields
      • Data retention & Datapoints
      • Examples
        • Mapping 4-20mA Signals
        • Converting Units
  • Dashboards
    • Global Dashboards
      • Setting Homepage
    • Device Dashboards
    • Multi-Device Dashboards
    • Widgets
      • Value Widget
      • Chart Widget
      • Image Map
      • Map Widget
      • Text Widget
      • SOS Widget
      • Boolean Widget
      • iFrame Widget
      • Downlink Widget
      • Set Value Widget
      • Measurement List Widget
      • Heatmap Widget
      • Table Widget
      • Image Widget
  • Portal
    • Multi-Tenancy (Workspaces)
    • Reports
      • Energy Report
    • Administrators
    • Members
      • API Users
    • Security & Privacy
    • Billing
      • Support Packages
      • VAT Exemption / Tax ID
      • SMS Credits
      • Access Invoices
      • Unused time and Remaining time in Invoices (Prorations)
      • Codes
    • White Label
    • Rules
      • Legacy Rule Engine
        • Sending notifications via Telegram
      • New Rule Engine
        • Rule Engine Table Overview
        • Copy/Paste and Template Functionality
        • Advanced Rule Engine E-Mail and Webhook Templates
        • Time Restrictions
    • Zones
  • Cake Red
    • Get Started
    • Overview
  • LoRaWAN
    • Get Started
      • CSV Import
      • Custom LoRaWAN Device
    • Configuring LNS
      • The Things Stack (TTN / TTI) Automated Setup
      • The Things Stack (TTN / TTI) Manual Setup
      • Loriot
      • Kerlink Wanesy
      • Helium
      • ChirpStack
      • Tektelic
      • Actility ThingPark
      • Senet
      • Milesight Gateway
      • KPN
    • Downlinks (LoRaWAN)
      • Set Time Frame
    • Securing Webhooks
    • Payload Decoders
      • Location and GPS
      • Access Gateway Metadata
      • Access Measurements
      • Global Variables
    • Using Cayenne LPP
    • Converting Payload
  • Generic API Devices
    • HTTP Downlinks
  • Integrations
    • MQTT
    • Particle
      • Get Started
      • Adding Integrations
      • Decoding Payloads
      • Calling Functions
      • Templates
        • Particle Tracker One
    • Incoming Webhooks
    • Outgoing Webhooks
      • Securing Outgoing Webhooks in Datacake
    • Golioth
    • Blues Wireless Notecard
    • Sigfox
    • Swarm Asset Tracker
    • Grandcentrix Modbus Cloud Connect
    • YuDash LYNX IoT Gateway
    • Dragino NB-IoT
      • Changing NB-IoT Bands
    • Hardwario CHESTER
    • 1NCE OS
  • API
    • Exporting Data
    • Record Measurements via API
    • Node RED to Datacake
    • Generate Access Token
    • Internal MQTT
      • Get Started
      • MQTT Documentation
      • MQTT over WebSocket
      • Example Code
    • GraphQL API
      • Using GraphQL
      • Device Creation
      • Tutorials
        • Read Group via Tags
  • Guides
    • Python
    • Send Slack Notifications
    • Forward Data to Cake Red
    • Multiple Data Feeds
    • Automated Dynamic Downlinks
    • Ingesting JSON Data into Datacake API Devices
    • Working with Default HTTP Decoder on API Devices and Code Examples
    • Accessing Measurements in Decoders
    • Connecting Datacake to Notion Using Zapier
    • How to set up and use location on non-GPS devices
    • How to integrate with AWS IoT Core
    • How to Schedule Mass-Downlinks (Multicast) using Datacake Rule Engine
    • How to Map Sensor Values to Ranges or Booleans, Strings using Mapping Fields
    • Understanding Internal vs. External MQTT Brokers on Datacake
    • Sending UDP Messages between 1NCE OS and Datacake
    • Concepts of LoRaWAN Payload Decoders on Datacake
    • How to check if a value stays above or below limits for given time
Powered by GitBook
On this page
  • Connect instance and import devices
  • Check and change configuration of a device
  • Delete TTS configuration

Was this helpful?

  1. LoRaWAN
  2. Configuring LNS

The Things Stack (TTN / TTI) Automated Setup

This guide shows you how to connect a The Things Stack instance (which powers The Things Network as well as The Things Industries and can also be self-hosted) to Datacake and import devices.

Last updated 2 years ago

Was this helpful?

Our automated TTS integration allows you to connect your LoRa Network Server to Datacake without having to manually set up webhook integrations or create downlink keys. It can also automatically import devices that are in your LNS already.

Connect instance and import devices

Start by clicking the "Add Device" button on the Devices page

Next, choose the LoRaWAN option and click "Next".

On the next screen, choose one of the predefined device templates or create a new one from scratch. Proceed, and choose "The Things Stack v3" as your network server.

When asked to add your devices, choose "Import from The Things Stack" and click the "Show" button next to "Add a new server":

This will show a form that asks you for your The Things Stack server's hostname as well as an API key. The hostname is the domain-part of your server, i.e. eu1.cloud.thethings.network, if you're on the European version of The Things Network.

Give your new API key a name, leave the Expiry date empty and choose "Grant all current and future rights". If you want to limit the scope of the API key (which might prevent it from working with future features Datacake might offer), the required individual rights are

  • View devices in application

  • View application information

  • View and edit application API keys

Copy the API key, and paste it into the form on Datacake.

Click "Add". This will add the TTS configuration to your workspace, select it and show a list of TTS applications. Clicking the "Set up integration" button, will automatically set up a webhook integration on the TTS application for the Datacake URL and create an API key with RIGHT_APPLICATION_TRAFFIC_DOWN_WRITE permissions.

You can proceed without setting up the integration which will still allow you to import existing devices from your TTS instance, although in this case, you need to manually set up the webhook integration and configure a downlink-capable API key.

You can check the downlink API key by going into the API Keys section in your TTS application. It will contain the name of your workspace.

Once you have set up the integration, select it from the list, which will show a list of all devices which are inside the TTS application. You can select one or many devices which you'd like to import to Datacake and give them a human-readable name. Once done, click "Next".

On the final screen, choose a pricing plan and click the Add Device button.

Check and change configuration of a device

If you have imported a device from a TTS application which has previously been set up, the downlink details have been automatically created and saved to the device. You can check this by going to the device's configuration.

If you click the "Change" button, you can see and change the Device's TTS Device ID as well as the selected TTS Configuration and Application.

Delete TTS configuration

If you want to delete a TTS configuration, you can do so via the "LoRaWAN Network Servers" tab on your workspace's Integrations section.

Please note that this will not only delete the downlink API key from your TTS instance which will prevent it from receiving downlinks, it will also delete the Datacake-managed webhook integration, which will stop the device on Datacake from receiving uplink messages. To get the device back to a working state, you will have to configure the integration manually.

You can create either an Organization-scoped or a Personal API key. To create a Personal API key (recommended), on your TTS instance, click "Personal API keys" in the top-right dropdown menu.

Datacake-managed Downlink key in the TTS application