My device is sending a CayenneLPP payload to the RAK7268 which passed on the MQTT message to my local Mosquitto instance. No cloud, no TTN, etc… The RAK7268 is running the latest firmware V1.3.1.
“AGdnwAFoegIA/g==” (base64) converted to hex isn’t “006767c001687a0200fe”
The temperate and humidity information from the payload is decoded correctly. There is no conversion for the DigitalOutput sensor and the “analogOutput” is wrong.
So it appears that the RAK gateway is receiving the correct information from the device, however, it’s not producing the correct MQTT message.
TL;DR: Cayenne LPP decoding in RAK7268 is half-baked.
Some details:
I had the same problem. The Cayenne LPP decoding in the gateway is limited and does not support some data types. I tested it a bit and “temperature”, “humidity” and “analog input” values seem to work, while “digital input”, “digital output” etc. do not. I used " ElectronicCats/CayenneLPP: Library for Arduino compatible with Cayenne Low Power Payload (github.com)" to encode the data, which should be close enough to standard.
You can either:
a) Use the actually working data types and reinterpret them later (I use “analog input” type for all non-supported types and parse later by sequence).
b) Turn off Cayenne LPP decoding and do the full decode yourself.
Of course, a proper implementation of Cayenne LPP decoding in the gateway by the RAK developers would be the preferred option
#################### KELENA TEST ################################
lpp.add_temperature(0, 2802)
lpp.add_relative_humidity(1, 58)
lpp.add_digital_input(2, 254)
lpp.add_digital_output(3, 200)
#################### KELENA TEST ################################
and here’s my result:
I suspect your LORAWAN Mac version you’re using…
Did another test by changing the LORAWAN Mac version from 1.0.2 to 1.0.3 in the Device-profile, and nothing was found under objectJSON, after this changes ???
So in my case I used PYCOM lopy (1.0.2) for my test.
According to RAK3172 specs:
The module complies with Class A, ClassB, Class C of LoRaWAN 1.0.3 specifications
So, validate that you defined your device with Mac version 1.0.3
Thanks for looking into this. I’ve tried changing gateway setting to both LoRaWAN 1.0.2 and 1.0.3. Neither setting had any effect. I’m puzzled because the uplink data from the device seems correct, yet the gateway isn’t decoding it as expected. Could there be another gateway setting that could effect the decoding?
Franki - thanks for your feedback. I might pursue one of your recommendations if necessary. It’s odd that ric2498 was able to get the correct decoding.
Maybe there might be a new firmware we are both not using?
I doubt the MAC setting would do anything here, the decoder works on already received data.
Edit: There is a new firmware version 1.3.2, but there are no release notes for it.
Depending on the selected region, the gateway is already partially preconfigured and you only have to select the respective LoRaWAN network server. To connect to an LNS, the RAK7268 supports various communication options, including the classic UDP option, but also Basic Station or an MQTT bridge for servers like ChirpStack (or Datacake).
Based on these information’s for RAK7268, could you give more details on your configuration ?
The MQTT messages are consumed by Home Assistant. It’s possible to have Home Assistant do the decoding, however there will be a learning curve for myself. Not where I wanted to spend my time. Might involve writing an integration or similar. I might have to do this.
Sure - happy to give you whatever configuration information is needed. First a simple description on the data flow. My device (sensor) sends it’s CayenneLPP payload to the RAK7268 (US915, ClassC, OTAA).
I’m intending the RAK7268 to decode the CayenneLPP payload and send the data via an MQTT message to a local Mosquitto server on the local network. Home Assistant subscribes to the MQTT messages and acts on the sensor data. This all works just fine except that only the CayenneLPP temperature and humidity data decoding works. Does the RAK7268 conform to CayenneLPP as implemented by myDevices, ElectronicCats, or STM32WL SDK? Here is my configuration screen for the LoraWAN Network Settings: