RAK4631 - WisBlock Kit4 - TTN live data

Hi, I recently got a WisBlock Kit4 environment sensor (BME680). I have followed this guide https://docs.rakwireless.com/Knowledge-Hub/Learn/RAK-Developer-Kit-4-Guide/ to:

  1. add end-devices to my TTN application
  2. configure and upload the arduino code called “Environment_Monitoring” with the Arduino IDE software (on Mac)

The result is:

  1. the joint-request is accepted (OTAA) and the end device is sending data to TTN

The problem:

  1. in TTN > end device > live data, I don’t see data as expected or as described in the guide. I was expecting to see the temp. hum. press. gas values as seen in the first picture below. Instead, I only see SNR and RSSI but no other values as shown in my screenshot below (Actual).

Not sure where is the mistake. Can anyone help in getting correct values/payload?



Hi @lls ,

There was an uplink payload decoder in the guide. However, this is not used because Ubidots has a built-in decoder for RAK1906. If you will use Ubidots and proceed on the tutorial, you can ignore this and still get the final dashboard.

However, if you want to have the payload decoder, you can use this.

function Decoder(bytes, port) 
  var decoded = {};
  if(bytes[0]==1) // check if the header byte is 1.
    decoded.temperature = (bytes[1] << 8 | (bytes[2])) / 100;
    decoded.humidity = (bytes[3] << 8 | (bytes[4])) / 100;
    decoded.pressure = (bytes[8] | (bytes[7] << 8) | (bytes[6] << 16) | (bytes[5] << 24)) / 100;
    decoded.gas = bytes[12] | (bytes[11] << 8) | (bytes[10] << 16) | (bytes[9] << 24);
    return decoded;

You have to put this under Payload formatters tab.

Oh, great, thank you so much. I had missed that. Now it is working perfectly.

I have the same Problem but my Kit sends no Payload. In Arduino Serial Monitor it shows all variables fine but it sends no Payload via Lora.

Welcome to RAK forum @Andreas .

It appears that you actually have an uplink payload sent (you have frm_payload). However it is not decoded.


Hey carl, thx for your reply.

I am using the Payload Decoder via TheThingsNetwork.

Hmm i cant find the error…

All the best

It’s a long time since I used TTN, but as far as I know,m the decoder function is not function decodedUplink(bytes) but is should be function Decoder(bytes, fport) and the return value is just decoded, and not {"data":decoded}

The decoder you show is for Chirpstack.