In this article
Categories

Example TTN Dingtek DC500 Formatter

Print

Example fixed length payload formatter for Dingtek DC500 on TTN V3 console

function decodeUplink(input) {
if (input.bytes[3]==2){
return {
data: [
{ channelId: 1, value: (input.bytes[6] | input.bytes[5] << 8)},
{ channelId: 255, value: (input.bytes[10] | input.bytes[9] << 8)/100 },
],
warnings: [],
errors: [] }
}
}