Skip to content

Commit

Permalink
Merge pull request #8 from TheThingsIndustries/issue/update-datacake-doc
Browse files Browse the repository at this point in the history
doc: Update Datacake integration guide
  • Loading branch information
nejraselimovic committed Oct 14, 2020
2 parents 56aafc8 + 402e0e7 commit bae9509
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,27 @@ First, create a **Workspace** on Datacake by navigating to the **Create Workspac

{{< figure src="datacake-workspace.png" alt="Add workspace on Datacake" >}}

On the left hand menu, click **Devices**. To add a new device, click on **Add Device** button on the right.
On the left hand menu, click **Devices**. To add a new device, click the **Add Device** button on the right.

In the **Add Device** pop-up menu, choose **LoRaWAN** &#8594; **Generic LoRa Device** &#8594; **The Things Industries** adapter.
In the **Add Device** pop-up menu, choose **LoRaWAN** &#8594; **Generic LoRa Device**. When asked **Which device are you missing?**, just click **Skip** and then select **The Things Industries** adapter.

{{< figure src="datacake-tti-adapter.png" alt="Datacake TTI adapter" >}}

Fill in **Name** and **DevEUI** for your device, then click on **Add Device** to finish.
After selecting your subscription plan, fill in **Name** and **DevEUI** for your device, then click on **Add Device** to finish.

Once the device is created, you can click on it in the **Devices** menu to enter its settings.

In the **Configuration** tab, you can find **Payload Decoder**, which is intended for [decoding the payload](https://docs.datacake.de/lorawan/payload-decoders) received from {{% tts %}} after deploying the integration. In order to store the payload values you need to [create a field](https://docs.datacake.de/device/database/fields) according to the payload type.
In the **Configuration** tab, you can find the **LoRaWAN** section, where you can configure **Network** settings, choose to **Authenticate Webhook** or define **Payload Decoder**.

Under **Network**, choose **The Things Industries** from the drop-down menu.

Paste your device's **End device ID** from {{% tts %}} in the **TTI Dev Id** field.

The **TTI Server Url** field should contain the URL of your {{% tts %}} deployment.

Paste your **Application ID** from {{% tts %}} in the **TTI App Id** field.

In {{% tts %}}, navigate to **API keys** on the left hand menu, click the **Add API key** button, give it a **Name** and confirm that you have copied it to finish. Paste the copied API key into the **TTI Api Key** field on Datacake.

{{< figure src="lorawan-settings.png" alt="LoRaWAN settings" >}}

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: "Scheduling Downlinks with Datacake"
description: ""
weight: 3
---

In addition to forwarding messages from {{% tts %}} to Datacake, you can also schedule downlink messages to be sent from Datacake to your end device.

<!--more-->

Enter your device's settings page on Datacake and go to the **Downlinks** tab.

Click the **Add Downlink** button.

Next, fill in the **Name** field, define the **Payload encoder** and click **Save Downlink**.

>Learn to write payload decoders in the [official Datacake documentation](https://docs.datacake.de/lorawan/downlinks#writing-a-downlink-encoder).
{{< figure src="downlink-configuration.png" alt="Configuring downlink" >}}

Now simply click the **Send Downlink** button to schedule a downlink and check your device's logs to see the incoming message.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ After finishing Datacake setup, make a Webhook integration on {{% tts %}} with t

<!--more-->

>Note: A **Datacake** Webhook template is now available to allow you to easily create this integration. If you want to create a **Custom webhook**, this guide can be helpful. Read more about these templates in the [Webhook templates]({{< ref "/integrations/webhooks/webhook-templates" >}}) page.
>Note: this section follows the [HTTP Webhooks]({{< ref "/integrations/webhooks" >}}) guide.
Fill in the **Webhook ID** field and choose **JSON** for **Webhook format**.
Expand All @@ -20,4 +22,8 @@ Per the **Webhook Settings** information that can be found in the **Configuratio

Check the message types for which you want to enable this webhook.

Once the setup is finished, you can navigate to device's **Debug** tab, where you can see the incoming messages and their details.
>Note: The Datacake webhook template has the `Uplink message` type enabled by the default.
Once the setup is finished, you can navigate to device's **Debug** tab on Datacake, where you can see the incoming messages and manipulate or monitor your data.

Check the official Datacake documentation to learn how to [decode the payload](https://docs.datacake.de/lorawan/payload-decoders) received from {{% tts %}}.

0 comments on commit bae9509

Please sign in to comment.