TTN (The Things Network) - The Things Node

Hi, I just received my bundle of devices from The Things Network. Gateway is up and running as well as my “The Things Node”. Was trying the Cayenne Integration. I am only seeing the meta-data coming across (RSSI & SNR) but not the 4 fields of actual data being transmitted by the Node … is this just not yet implemented?

The decoder actually returns 4 fields -
{
“battery”: 4124,
“event”: “interval”,
“light”: 46,
“temperature”: 24.88
}

This is the decoder …

function Decoder(bytes, port) {
var decoded = {};
var events = {
1: ‘setup’,
2: ‘interval’,
3: ‘motion’,
4: ‘button’
};
decoded.event = events[port];
decoded.battery = (bytes[0] << 8) + bytes[1];
decoded.light = (bytes[2] << 8) + bytes[3];
decoded.temperature = ((bytes[4] << 8) + bytes[5]) / 100;
return decoded;
}

The Things Node definitely work with Cayenne.

Tagging our in-house LoRa experts @croczey @rsiegel :slight_smile:

~Benny

Hey there @pat.molloy

It looks like you are using your own payload format with this device.

You’ll need to use the Cayenne LPP payload format in order for the device to work with Cayenne.

The docs can be found here: https://mydevices.com/cayenne/docs/lora/#lora-cayenne-low-power-payload

TTN also has Cayenne LPP libraries that you can upload to your node so that it works with Cayenne right out of the box.

Let me know if you need anymore help!

Thanks,

Camrin

1 Like