Datacake Integration - Data not showing in Dashboard

Apologies as new to the Things Network and have been loaned a Things Uno for testing which I’m using as a proof of concept device which passes temp and humidity to Datacake. The payload is being received by Datacake via webhook and shows in the debug as data received from tti but the debug shows “payload decoder did not return list of measurements”. Debug does show returned instead correct values for humidity and temp. The Dashboard fields just show zero. I’m currently using the same Payload decoder that was in V2 of Things Network which displays correct values from raw data. Any advice would be welcome.
image

Hi,

I hope you can help me… I’m trying to link from TTN-V3 to Datacake using a webhook but I don’t know where to find the required Token. I hope you can help me.
Regards,
Rob

Thanks!!
Works like a charm… Now I can monitor my Smart meter via Datacake and TTN-V3.
Rob

1 Like

Hi - did you get an answer? I’m seeing the same thing. Thanks

Datacake decoder for Bmeters Lora module IWM-LR3.

Anyone have one written? Been trying unsuccessfully to alter this Bmeter LR3 decoder found on Github to work with Datacake.

function decodeUplink(input) {
//Decode an uplink payload
var port = input.fPort;
var data = {};

switch (input.fPort) {
case 1:
data.application = input.bytes[0];
data.valueCounter = (input.bytes[4] << 24) + (input.bytes[3] << 16) + (input.bytes[2] << 8) + input.bytes[1];
data.flowCounter = (input.bytes[8] << 24) + (input.bytes[7] << 16) + (input.bytes[6] << 8) + input.bytes[5];
data.indexK = input.bytes[9];
data.medium = input.bytes[10];
//liters
if (input.bytes[11] === 0x0D) {
data.vif = input.bytes[11]*1;
}
//decaliters
else if (input.bytes[11] === 0x0E){
data.vif = input.bytes[11]*10;
}
//hectoliters
else if(input.bytes[11] === 0x0D){
data.vif = input.bytes[11]*100;
}

//alarms
//Magnetic 0x00, Removal 0x01, Sensor fraud 0x02, Leakage 0x03, Reverse flow 0x04, Low battery 0x05

if(input.bytes[12] >= 0x00 && input.bytes[12] <= 0x05){
  data.alarm = input.bytes[12];
}
else {
  data.alarm = 'error';
}


return {
 data:data,        
};

default:
return {
errors: [‘unknown FPort’],
};
}
}

This works for IWM-LR3 module, once I realised the values were hex, I had to convert hex values to string

function Decoder(bytes, port) {
// Decode an uplink message from a buffer

//Counter Value
value = (bytes[4] << 24) + (bytes[3] << 16 ) + (bytes[2] << 8) + bytes[1];

// to convert litres hex values to numeric string of cu.metres
hexString = value.toString(16);
litres = (hexString)/1000;

//Reverse Flow Value
value = (bytes[8] << 24) + (bytes[7] << 16 ) + (bytes[6] << 8) + bytes[5];

// to convert hex values to numeric string of cu.metres
hexString = value.toString(16);
reverseFlow = (hexString)/1000;

// alarms
//Magnetic 0x00, Removal 0x01, Sensor fraud 0x02, Leakage 0x03, Reverse flow 0x04, Low battery 0x05
if(bytes[12] >= 0x00 && bytes[12] <= 0x05) {
alarm = bytes[12];
}
else {
alarm = ‘error’;
}

return {
litres:litres
ReverseFlow:reverseFlow
ALARM:alarm
} ;

}