@arjanvanb thanks the lora-serialization library indeed does solve many of my issues, thanks for the explanation of the the size difference also.
But… if it is working correctly at the myDevices side as I haven’t tested, the major bonus of using the LPP is that the UI is generated for you, adhere to the LPP and myDevices supposedly will expose the data for the UI automatically… this is the closest I’ve seen to a interoperable standard I’ve seen in my brief experience in low powered data. I believe whole heartily that this should be the direction forward.
I’ll go for a decoder solution on the TTN Backend. Since then it doesn’t matter how I transmit the data over the air. If I use the STM Stack it’s not so easy to implement a Arduino Stack, if i use a board running python and the microchip module, i need to reemplement the whole Arduino library.
That would be great indeed. Unfortunately, the payload functions expect an object as the result. When just trying to return an array of (modified) bytes, one cannot save the Decoder function:
function Decoder(bytes, port) {
return bytes;
}
Error(“Could not dry-run uplink on Handler: Decoder not valid: does not return an object”)
So, even if the payload functions are executed before the integration is invoked (I don’t know for Cayenne; they are certainly called for the Data Storage integration), then currently one cannot enhance/convert the node’s payload into a Cayenne LPP.
Great work TTN ! Thanks for pushing Cayenne LPP !
Per the JS decoder function, we are going to open source ou Cayenne LPP decoder.
We’ll be able to provide you the code then
Hi All, great discussion and great reads on Cayenne LPP.
Thank you so much…
I tried to combine the TTN Build your own Sensor Workshop, with an implementation of Cayenne LPP.
I think the payload looks ok, but Cayenne does not accept it, since on the dashboard I only see the RSSI and SNR.
Question:
Is there an cayenne LPP Decoder online available that I can feed my byte string and then see what I did wrong?
(My guess is that you’re missing xx 88 at the start of the last section, for GPS location. Any online decoder would fail as well, so is of little help…)
I first build a hardcoded message with the existing code
and then used the example functions to build up payload with the sensor data
and now it works!
I needed some reading on Hex Decimals and and Byte Array… and learned a lot.
Thanks for the nudge into the right direction
I have a TTN/Cayenne device integration. This device has a DHT11 sensor and the payload is in LPP format.
The application data in the TTN Console looks fine to me: 036700C804684400
channel 03, type 67, tempvalue: 20C and channel 04, type 68, humvalue: 34%
My problem; I only see the RSI and SNR widget in Cayenne and reading the answers in previous posts there must be something wrong with my payload but I have no idea. Anyone else?
// Check if there is not a current TX/RX job running
if (LMIC.opmode & OP_TXRXPEND) {
Serial.println(F(“OP_TXRXPEND, not sending”));
} else {
// Prepare upstream data transmission at the next possible time.
//LMIC_setTxData2(1, buffer, sizeof(buffer)/sizeof(buffer[0]), 0);
LMIC_setTxData2(1, buffer, 7, 0); //brute force
I’d really like to know this as well. Cayenne seems like a great tool and i want to use it but use more efficient payloads. The channel is inferred from the node ID, node sensor has a fixed structure so there is no need to repeat the meta data for the sensor data every time etc.
I have installed your library, copied your example changed the two keys and uploaded the code but i see not registration attemps in TTN or any data flowing.
The example in TheThingsNetwork Arduino library are specifically for Arduinos with the Microchip RN2xx3 module. With the 32u4 LoRa feather I’d suggest using LMiC. And then, indeed, you need to reverse the byte order.