# Payload Conversion to Cayanne LPP

**URL:** <https://www.thethingsnetwork.org/forum/t/payload-conversion-to-cayanne-lpp/40265>\
**Category:** Application Development\
**Created:** [October 1, 2020, 4:13pm UTC](https://www.thethingsnetwork.org/forum/t/payload-conversion-to-cayanne-lpp/40265 "2020-10-01T16:13:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![elektron](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/elektron/32/25844_2.png) [@elektron](https://www.thethingsnetwork.org/forum/u/elektron)\
**Post date:** [October 1, 2020, 4:13pm UTC](https://www.thethingsnetwork.org/forum/t/payload-conversion-to-cayanne-lpp/40265/1 "2020-10-01T16:13:14Z")

</div>

Hi \*,

Im currently trying to send data to the cayenne Backend using the existing Cayenne integration in TTN.  
Topic is that the Device is not natively sending in CayanneLPP-Format and i have no option to change it!

I’m able to decode the Payload and where trying to convert it to a cayenneLPP Payload, but the converter tells me that he is expecting an Object.

After decoding I have an array with the values like this:  
{  
“BattState”: 1,  
“GPSAltitude”: 380,  
“GPSHorizontalAccuracy”: 189.9,  
“GPSLatitude”: 48777777,  
“GPSLongitude”: 90000000,  
}

So my idea was to put this together in on String like:

converted = “0188” + (decoded.GPSLongitude%1000) + (decoded.GPSLatitude%1000) + (decoded.Altitude);

But sure this is not an Object…  
…but my question is how to from the Object that cayenne will accept it…

Thanks.  
Michael

---

<div class="post-metadata">

**Author:** ![kersing](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/kersing/32/44777_2.png) [@kersing](https://www.thethingsnetwork.org/forum/u/kersing)\
**Post date:** [October 1, 2020, 4:48pm UTC](https://www.thethingsnetwork.org/forum/t/payload-conversion-to-cayanne-lpp/40265/2 "2020-10-01T16:48:20Z")

</div>

> [@elektron](#):
>
> Topic is that the Device is not natively sending in CayanneLPP-Format

Then you are out of luck. The data transmitted to cayenne is the original data received from the node, not the decoded/modified payload,

---

<div class="post-metadata">

**Author:** ![elektron](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/elektron/32/25844_2.png) [@elektron](https://www.thethingsnetwork.org/forum/u/elektron)\
**Post date:** [October 1, 2020, 7:22pm UTC](https://www.thethingsnetwork.org/forum/t/payload-conversion-to-cayanne-lpp/40265/3 "2020-10-01T19:22:58Z")

</div>

Hi Jac,

Thank you for your quick response…  
Is there an Option sending the data via http (Rest) to the Cayenne backend?  
I found some hints in the Internet That there is a http api, but I‘m nut sure of this is available Anemone…

The TTN mqtt Integration is a Server and Cayenne offenes also a Server…  
…so i Wolldecke habe to run a Client to Connect the two Servers on my own.

Thanks and Best regards Michael
