Payload Format to include only measurements


I need to send data to Wattics in this format
{ “id”: “uniqueMeterId”, “tsISO8601”: “2019-06-02T00:00:00.000+00:00”, “value” }

But from things Network the uplink also contains this
“f_port”: 6,
“frm_payload”: “AA==”,
“decoded_payload”: {
“Current”: 0
“rx_metadata”: [
“gateway_ids”: {
“gateway_id”: “test”
“rssi”: 42,
“channel_rssi”: 42,
“snr”: 4.2
“settings”: {
“data_rate”: {
“lora”: {
“bandwidth”: 125000,
“spreading_factor”: 7

Because of which the Wattics server throws an error.

I do not want the rx metadata and the settings to be uplinked and I have no control on this at the payload formatter option.

Right now I am getting the data on AWS and applying this code, to get the data in the format that Wattics accepts,
function getBody(body) {
var data = {}; = body.end_device_ids.device_id;
data.tsISO8601 =new Date(body.received_at).toISOString();
// data.aP_1 = 1000.0;
//data.pC_1 = 2000.0;

return data;


But this is not viable since I have to pay for the AWS along with all other requirements.

Can you please suggest a solution that will send data directly from Things Network to Wattics Cloud.

On Wattics side there is no way to include a decoder.

It’s not possible to send a different webhook layout directly from The Things Stack, so if the platform you’re sending your data to doesn’t support that layout, you’re indeed going to have to do some transformation yourself.

AWS has quite a decent free tier for Lambda functions, and with their recently announced function URLs it’s easier than ever to deploy one. I’m quite sure that even with a million requests per month, you still won’t have to pay anything to AWS for simply transforming webhooks and forwarding them to your IoT platform of choice.