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.

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.

Last updated