Data visualisation – connecting TTN to Datacake - Part 1


Note: most of the instructions below relate to Board 4, as the procedure seems to remain the same for Board 6. We will be returning to Board 6 in the section ‘Webhook Integration on TTN’.

Configuring your device on Datacake

Aims

  • Set up a free (up to five devices) Datacake account.
  • Connect your TTN account to Datacake.
  • Send data from TTN to Datacake using uplinks.
  • Build a dashboard populated by the uploaded data.

Research

Procedure

Datacake homepage

Datacake (https://datacake.co/) is a web based, cloud hosted IOT platform.

To start your integration, click on the big purple ‘Give Datacake a try’ button (it now says ‘First 5 devices for FREE). Next page, click on the big purple ‘Sign up now for free’ button. 



Create an account

And you should arrive here.

When you have completed the form, click ‘Create Account’ to be taken to the ‘Devices’ page.



Device list

On the devices page, you will see that I already have some devices set up.

This is where we add a device. That would be your Arduino MKR WAN board. I have already added two boards. The next one will be Board 4 (Board 1 is no longer working).

Add device

To add your device, click the blue ‘Add Device’ button. You should see a page like this.


Add lorawan device

Click in the ‘New Product’ box. Product Name is whatever you want to call your device. I’ve called mine Board 4.

It prompts us that “You will have to create the device definition (fields, dashboard) and provide the payload decoder in the device's configuration.” We will be doing all that in the coming pages. 

Choose network server

Click ‘Next’ and you will be taken to this page.

Your device is already connected to The Things Stack, so choose the ‘The Things Stack V3’ option. Click ‘Next’.

Link TTN account

This is where you link your Datacake account with your The Things Network account.




Copy dev eui

Return to your TTN account and locate your device EUI. You can find it on this page.

Copy your EUI by clicking on the copy icon (this is now called ‘End device ID’). 

Add device name

Datacake account and paste this into the Device EUI box. Type the name of your board into the ‘Name’ box.

Then click ‘Next’.


Choose plan

On this page you can choose a plan. If you are only adding one device, you can use the free plan. Click ‘Add 1 device’.

Device added

Back on your ‘Devices’ page, you should now see the added board.

For new Arduino boards, we need to set up webhook integration in TTN to forward data to Datacake.

Webhook Integration on TTN

Integrations

Return to your TTN webpage and select your board, in this case Board 6. Click on ‘Integrations’, then select ‘Webhooks’ from the dropdown.

Add webhook

You should see this page. Click on the blue ‘Add webhook’ button.

Choose webhook

Scroll down until you see the ‘Datacake’ template.

Webhook setup

Click on the Datacake template to see this page.

We need to create the API token. Return to your Datacake webpage, then go to ‘Members’ then ‘API Users’.

API users

Here you can see that some API tokens have already been created.

Add API user

Now click ‘Add API User’. You should see this popup window.

Enter a name for your API User. I have called mine ‘board 6 token’. Scroll down until you see the button ‘Add permission for all Devices in Workspace’, and click on it. You will then see some more options.

API user details

Of these, just tick the box for ‘Can record measurements’. When done, click the blue ‘Save’ button. 

New API user

You should now see your new token appear in the Members list.

Click on the blue ‘Copy’ button to copy the new API token to your clipboard.

Now return to your TTN webpage. 

Create webhook

Paste the copied token into the token field, and fill in a name for your webhook ID. This must contain only lowercase letters, numbers and dashes (-). I’ve called mine ‘board-6-webhook’.

Add webhook

Then click the blue ‘Create Datacake webhook’ button. You should then see this:

In this screen grab, you will see in the second column from the right that the ‘STATUS’ is given as ‘Pending’. You my have to wait a few moments before the status changes to ‘Healthy’.

Now that we have created a webhook, we now need to configure your Datacake account to receive and display the data from TTN.. Click here for the next steps.

© Copyright 2025 Dr Dulcamara - All Rights Reserved