In this guide we will show you how you connect the TheThingsIndustries LNS to Datacake and how you set up the configuration for both Uplinks and Downlinks.
TTIv3 / TTNv3
The following description applies to both the TTI and the "new" TTN - the TheThingsStack Community Edition network.
Create Integration on TTI
On your TTI Application select Integrations on the Side-Bar
Navigate into the "Webhook" Section of the Integrations on your Application
Add a new Webhook by clicking the Button "+ Add webhook"
This will show you a list of available webhook-templates you can chose from:
Chose the "Datacake" Webhook Template
Your browser will show you the following page
Now we need to create an API Key on Datacake for Webhook Authentication
Navigate over to your Datacake Workspace and select "Members" from Sidebar:
In the members section you select "API Users" from Tab-Bar
After switching to the API Users Tab you click on the upper right Button "Add API User"
This will show you the following dialog:
First of all enter a name for your API User (like "TTI Webhook API User")
Next select "Devices" from Workspace Permissions List
Click on "Add Permission for all Devices in Workspace"
The following element will be added to the modal:
Here you select "Can record measurements"
Press "Save" to create the Token
This API Token is now valid for all devices in your workspace. Everytime you create a new device, this Token does automatically work for that device.
If you are interested in creating a Token for selected Devices only, you can navigate into the device and select the token from there. But you have to leave out the "All devices in workspace"-Permission here.
Next copy the Token from Datacake (click on the "Show" Button to see and copy the Token)
Now switch back to your Application on TTI:
Paste the copied Token into the field "Token"
Create Datacake Webhook on TTI by clicking on the "Create datacake webhook" Button
That's it. You've now created and set up the Datacake Integration on your TheThingsIndustries Instance. If you have any questions please feel free to ask us.
In order to be able to queue up Downlinks on your TTI Application you need to provide additional detail on your Datacake-Device. To set the configuration please move into the LoRaWAN settings on the corresponding device:
When you scroll down a little bit you get to the following section.
As mentioned in the screenshot please click on "Change" to open up the configuration for Downlink Configuration. This will bring up the following dialog:
In this Dialog you need to fill in the 4 textboxes with Information that you find on the TheThingsStack Console.
This is the ID of your Device in your TTI Application. You find it here:
TTI Server URL
This is the URL of your TTI Instance as available to the public.
To create a new API Key on TTI head over to the "API keys" page using the left sidebar:
Now click on "Add API Key"
The following dialog will appear:
Set a custom name (like "datacake-api-key")
And set corresponding rights to allow queuing up downlinks
Create the API Key by clicking on "Create API key"
After you created your API Key you will see the above notification
Please copy your key to your clipboard as it will only be shown once!
Paste this key into the device settings on Datacake
When you are done copying the dialog show look something like this:
Update and Save
Please don't forget to press the Update button when done setting the new Downlink Settings:
And please also don't forget to press "Save". (we know this is stupid that there is no autosafe and so we will bring this feature - but in the meantime please be patient - we apologize for this UX disastere here :D).