Using Cayenne LPP

How to use Cayenne LPP on Datacake

About this Tutorial

If you are working with Cayenne LPP on your LoRaWAN Devices, Datacake offers a ready-to-use template.


  • A Cayenne LPP LoRaWAN Device

  • A LoRaWAN Gateway and Network Server (like TTN or Loriot)

  • A free Datacake Account

Create Account

This tutorial expects that you have registered on the Datacake Platform. If you haven't already done so, please head over to and create a Free Account on Datacake.

Create Device

Now navigate into the Device Overview of your Workspace and create a new device.

Select Cayenne LPP Template

After you have clicked on Adding a new Device you will see a list of available LoRaWAN Templates.

  • Use the search field and search for "Cayenne" or select "Datacake" from the list of available Manufacturers

  • Select "Cayenne LPP Starting Templates" from the list of results

Select Device Plan

The next step in adding a device is choosing a device plan.

Datacake allows having 2 free devices in your Workspace. Additional Devices can be individually purchased by choosing one of the available plans. We have different plans for different use-cases available. Read more about Pricing on

  • When this is the first device that you are going to create, you can select "Free"

Select LoRaWAN Network Server

After you have chosen the plan you are required to set the LoRaWAN Network Server.

Datacake TTN

We have public applications for the Cayenne LPP Template on the TheThingsNetwork LoRaWAN Server. If you already have a TTN enabled gateway or TTN Network coverage in your area, you can use the LoRaWAN Server Option to Datacake without the need of setting up an Application on the TTN Console.

Read more about that option here:

Enter DevEUI

To finalize the creation of your new device, you need to enter its DevEUI and set a Name using the following dialog:

  • Name: Enter a Name for your Device - you can change this at any later time

  • Device EUI: This is the DevEUI from your Device. You can find that on your LoRaWAN Network Server or in the Code of your Device.

After you have entered this required information, you have to click on the "Add Device" button. The Device will now be created and you should see the Device-View:

Datacake TTN

If you have selected the Datacake TTN Option you need to provide not only the DevEUI but also AppEUI and AppKey in order to be able to add the Device on Datacake.

Setting Webhook Forward

Datacake receives information from the LoRaWAN Network Server via Webhook.

In order to forward Data from your LNS to Datacake, you need to set up a Webhook in the Application of the Network Server. Read more about how you configure the Webhook forward on your LNS:

pageConfiguring LNS

By setting up the LNS it's also possible to send Downlinks to your Cayenne LPP Device. Read the following Page to know more about how you set up Downlinks for your Device:


Debugging Connection

If you have set up a Webhook on your LoRaWAN Network Server and your Device is already sending Data, you should be able to see this on Datacake.

Accessing Debug Console

For better debugging purposes, every device on Datacake has a Debug-Console that you can access from the Device-View by using the top Tab-Bar:

In this view, you will see the last 100 Messages and also some basic error logs. If data was successfully received by your device, this will look like the following:

In the above screenshot you see two messages:

  1. A successfully receive webhook data forward from TTN

  2. The Payload Decoder inside our Cayenne LPP Template was able to decode the bytes and record a measurement value into a database-field of that device.

Congratulations! You have forwarded your first Data packages from your Cayenne LPP Device to Datacake.

I see the Webhook Log but no data has been recorded?

If you don't see data being recorded into the database fields of your newly created device, that's OK as we most likely have to create fields for your particular application first.

This is covered in the next chapter.


As the Cayenne LPP format can be used dynamically we cannot create Database Fields because we simply do not know what you are going to use it for.

So we are now going to show you how you create Database fields for the measurement values you are going to send.

How it works

By using the Cayenne LPP Template on Datacake you will have a device with an embedded payload decoder that you can use as a starting point (and modify it at any time).

This decoder transforms messages into values that can be stored in the Database of your Datacake-Device. The decoding takes place according to the Cayenne LPP specification.

Create Fields

For each Channel and Type, you want to send from your Device, you have to create a field in the Database. This looks something like the following:

So and now:

Automated Mapping

When your Device sends a value or payload (of multiple values) in the Cayenne LPP format, the decoder will turn this into a format that matches the Datacake API Structure.

This is then mapped automatically to a corresponding Database field in the "Fields"-List inside the configuration tab:

If the Field is not available in the List of "Fields", you need to create a new field and set the Identifier of that field to the Output of the payload Decoder.


If the Payload Decoder Output is like:

        "field": "ANALOG_OUTPUT_0",
        "value": 223.76

You need to create a field with the Identifier set to ANALOG_OUTPUT_0

Editing Payload Decoder

If you want to make changes to the Payload Decoder you can access that from within the configuration view of your Device.

This will show you the decoder:

Read more about the creation and editing of Payload Decoders on Datacake:

pagePayload Decoders

Next Steps

Create a Dashboard

Head over to the Dashboard View using the Tab Bar of your Device and create a Dashboard that shows the measurement values of your device:

Last updated