TTN decoder Sodaq ONE Universal Tracker V2

Hi all,
I’ve added a TTNdecoder, but my decoded payload looks really weird and I don’t believe it is correct. The CayennePayloadEnabled is active, I don’t know if that makes a difference to the payload function?

My decoder looks like this
function Decoder(bytes) {
var epoch = (bytes[3] << 24) | (bytes[2] << 16) | (bytes[1] << 8) | bytes[0];
var batt = (3000+10*bytes[4])/1000;
var temp = bytes[5];
var lat = (bytes[9] << 24) | (bytes[8] << 16) | (bytes[7] << 8) | bytes[6];
var lon = (bytes[13] << 24) | (bytes[12] << 16) | (bytes[11] << 8) | bytes[10];
var alt = (bytes[15] << 8) | bytes[14];
var speed = (bytes[17] << 8) | bytes[16];
var course = bytes[18];
var sats = bytes[19];
var ttf = bytes[20];
return {
course: course,
satellites: sats,
time_to_fix: ttf,
latitude: lat,
longitude: lon,
epoch: epoch,
battery: batt,
speed: speed,
temperature: temp
};
}

I’m using the latest Sodaq one V2 GPS tracker build from https://github.com/SodaqMoja/SodaqOne-UniversalTracker-v2

Please can someone point me in the right direction?

Hi,

This decoder is for when you don’t use the CayenneLPP.
You can view the data on MyDevice Cayenne if you make an integration and your device there.

For decoding the Cayenne LPP you can look at their documentation:
https://mydevices.com/cayenne/docs/lora/#lora-cayenne-low-power-payload

Kind regards,
Jan

Thank you @Jan , I will disable the CayenneLPP and see how it goes