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.
Code is not very easy to read. Maybe use the lpp library in the sketch? TTN LPP GitHub . Check if message is received on gateway and application. If so try a manual upload of the data from console and see if it is received by mydevices.
ā¦but it seems to me youāre not filling the whole buffer with data.
So, maybe something like:
LMIC_setTxData2(1, buffer, cursor, 0);
for (byte b = 0; b < cursor; b++) {
Serial.print(buffer[b]);
}
Also, if I understand your code formatting correctly then it seems the return cursor; exits the function prematurely (and Serial.println(F("Sending: ")); is never even invoked), but Iāll leave proper formatting to you, before asking againā¦
I made a CayenneLPP to JSON decoder (C++), but it could of course also be used as a start template for your own code.
Maybe it could be of use for some reading this topic
Iām also having trouble getting my data to Cayenne. Iām tried to sending GPS data to Cayenne Dashboard but only RSSI and SNR data shown but not GPS location, here it is code i tried. Can you guys help me whatās wrong in this?