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;
}