RAK811 Tracker TTN Payload Decoder please



  • Hi all,
    Someone can share a Payload decoder for TTN please ? I use the RAK811-Tracker

    Looking similar like that, use for STM32

    function Decoder(bytes, port) {
    // Decode an uplink message from a buffer
    // (array) of bytes to an object of fields.
    var decoded = {};
    // Decode bytes to int
    var batteryInt = bytes[7]
    var humidityInt = (bytes[5] << 8) | bytes[6];
    var pressureInt = (bytes[1] << 8) | bytes[2];
    var temperatureInt = (bytes[3] << 8) | bytes[4];
    // Decode int to float
    decoded.bat = (batteryInt*100)/254; // Battery in %
    decoded.hum = humidityInt / 10; // Humidity in %
    decoded.pres = pressureInt / 10; // Pressue in hPa
    decoded.temp = temperatureInt / 100; // Temperature in °C
    return decoded;
    }


  • administrators

    The format of the data we send is based on the Cayenne data format. https://mydevices.com/cayenne/docs/lora/#lora-cayenne-low-power-payload


Log in to reply
 

Looks like your connection to RAK Support Center was lost, please wait while we try to reconnect.