RAK7258 - CayenneLPP, analogInput

I enable built-in LoRa Mode: Network Server (RAK7258) with Payload Format: CayenneLPP.
Built-in LoRa Network Server supports integration to the user’s application server through MQTT protocol.
RAK7258 is the broker
MQTT.fx is the subscriber
EndDevice (RAK7205) is the producer, and publish:

Battery Voltage = 4.213 V 
BME680 sensor data:
  Humidity:30.923 %RH
  Temperature:25.42 degree
  Pressure:971.32 hPa
  Gas_resistance: 11028 ohms 
LIS3DH sensor data:ACC_X: 6mg, ACC_Y: -23mg, ACC_Z: -1024mg

The message is in JSON format.

  "applicationID" : "1",
  "applicationName" : "myApp",
  "devEUI" : "60c5a8fffexxxxxx",
  "deviceName" : "MyDevice",
  "timestamp" : 1614723166,
  "fCnt" : 0,
  "fPort" : 8,
  "data" : "CAIBpQdoPQZzJfECZwD+BAIETgNxAAb/6fwA",
  "data_encode" : "base64",
  "object" : {
    "analogInput" : 11.02,
    "humidity" : 30.5,
    "barometer" : 971.3,
    "temperature" : 25.4,
    "accelerometer" : {
      "x" : 0.006,
      "y" : -0.023,
      "z" : -1.024
  "adr" : true,
  "rxInfo" : [ {
    "gatewayID" : "60c5a8fffe766339",
    "loRaSNR" : 11.3,
    "rssi" : -46,
    "location" : {
      "latitude" : 0.0,
      "longitude" : 0.0,
      "altitude" : 0
  } ],
  "txInfo" : {
    "frequency" : 867700000,
    "dr" : 0

The set Payload Format: CayenneLPP make the object section:

  "object" : {
    "analogInput" : 11.02,
    "humidity" : 30.5,
    "barometer" : 971.3,
    "temperature" : 25.4,
    "accelerometer" : {
      "x" : 0.006,
      "y" : -0.023,
      "z" : -1.024


  • where is the battery voltage?
  • Gas_resistance: 11028 ohms -> analogInput=11.02 why ?

I can set the right object conversion values?


Hi @cmioci ,

What decoder are you using?

Can you try this official decoders?

Hi Carl,
I don’t use TTN and ChirpStack but I use LoRa gateway in a private network. The garteway is configured as Network Server. I don’t use any decoder scipt but in my application, MQTT subscriber, decode the payload field:

"data" : "CAIBpQdoPQZzJfECZwD+BAIETgNxAAb/6fwA"

I have to not decode the payload I set CayenneLPP in payload format.

My question is:
Can I customize the values present in payload field object ?
For example:

 "object" : {
     "battery_voltage" : 4.213,
     "humidity" : 30.923,
     "pressure" : 971.32,
     "temperature" : 25.42,
     "gas_resistance": 11028,
     "accelerometer" : {
       "x" : 0.006,
       "y" : -0.023,
       "z" : -1.024

thx, cm

Hei @cmioci ,

There is no way for a custom decoder in the Gateway so technically you get what you get.


You’ll have a lot more capability if you use the gateway as part of a system, rather than try to make it the entire system.

For example, you could run a current version of chirpstack in the cloud or on a local box (even down to a pi, though I’d recommend something more robust) and point the gateway at that. As an added plus, that would support expanding your network to have multiple gateways with cooperating, overlapping coverage in the future.

Or you could have a stage where some custom code subscribes to your uplinks, splits the fields, and re-publishes them on a different topic.

Worth considering too that Cayenne is really not the most efficient encoding for LoRaWan, since the formatting information it needlessly puts in every packet can be replaced by tracking node software versions and using LoRaWan port numbers and lengths to tell packet types apart.

Thank you for your answers, you’re right.

For example, you could run a current version of chirpstack in the cloud or on a local box (even down to a pi, though I’d…
yes, I bought RAK2287 Discover Kit 868Mhz

Or you could have a stage where some custom code subscribes to your …
yes, my subscriber send environment data to “data lake” in the cloud

Worth considering too that Cayenne…
yes, it’s true

bye cm


It’s me again, I was searching for decoder for rak811 for TTN v3, As documented in TTN v3, there’s a bit different in payload formatter/decoder of TTN v2 and TTN v3. I have a question, is the link you provided can also be used to rak811 as decoder given that I will follow the format of TTN v3. Thank you in advance. More power to rak.

Best regards,
Rolando Pula

Hi @pularolando ,

The decoder link is specifically for RAK5205. But it will work both on TTN V2 and TTN V3. The difference in TTN V2 and TTN V3 is mainly on the console interface but the javascript function is the same.

In your case, if you are using RAK811, your decoder will depend on the format of your payload.

And if you are using CayenneLPP, you can just set that on the application or device as the formatter and it will do it for you!

But as described further up this thread, you can’t change the field names it generates.

@nmcc I’ll try using the cayenne LPP. It is a bit strange though. Because when I tried to send the data and decode it manually using the online decoder. it is in the format of string(base64). Is it ok sending this in LoRAwan?. Apologies for my question. I am really new in this technology. And thank you so much for answering questions both of you @nmcc and @carlrowan.