Payload Decode Lora


I am a student and I am currently carrying out a year-end project on a Lora sensor.

I use for this a STM32 Lora development pack (P-NUCLEO-LRWAN1) which is used as a Lora sensor. I succeeded, without difficulty in transmitting data to a gateway.

On Cayenne, I added a new device namely the development pack and I transmitted the data from the LNS to Cayenne. Everything works for the best with the CayenneLPP format.

However, I would like my data to have a different format than the CayenneLPP because for me this format is too energy-intensive during a transmission. I did not find any solution to change the format of the data field.

I would also like to be able to light an LED on the device from Cayenne. But I have absolutely no idea how to do it. I think I read that using an MQTT server could help me.

Do you have a solution for my two problems?

Thank you so much.

If it just lighting an led then you can use the cayenne arduino library to do it.GitHub - myDevicesIoT/Cayenne-MQTT-Arduino: Cayenne MQTT Arduino Library but it is wifi or ethernet based. If you project is only lora based then you have to use cayenne LPP. and lora for actuator is not really the best technique.

Thank you very much for this answer, and yes the project is focused only on Lora.

I was thinking of making two modules :

  • A Lora sensor that works in class A, powered by battery, which measures the temperature.
  • A Lora actuator, which operates in Class C, powered by mains, which switches a radiator on or off.

So at first, I would have liked to know if it was still possible to send data to my electronic card. When I go to widgets, I can’t add a button to my Cayenne app.

have you got your device sending data to TTN?

My sensor transmits data to a gateway, and it sends the data to a Lora server named “Acklio”. From Acklio, I send the data under Cayenne. I can get the temperature value with my sensor on the Cayenne application.

Now, I would like to be able to activate a relay if the temperature is above a threshold.

With TTN, we have downlink URL and token as part of each UplinkMessage, make it for downlink to work out the box.
With other, we expect the user to setup the server to use, user and password, without doing any check on it. So… if the user fails here, the downlink fails as well.
Also, TTN cayenneLPP library is pretty much the best choice for downlink.

On the Cayenne application, how can I create for example a button and send data on downlink URL ? Because when I want to add a button widget, I can’t.

if you send the payload to create a digital output then it will a button widget automatically on the dashboard. 03 01 00 00

I think I understand! As I explained, I have already made a first sensor and I receive the temperature on the Cayenne application. Now, my other module just has to be configured to have an ON / OFF output. That way, I could control this button, right?