pkg/cayenne-lpp: add support for Cayenne LPP format#8809
pkg/cayenne-lpp: add support for Cayenne LPP format#8809kaspar030 merged 2 commits intoRIOT-OS:masterfrom
Conversation
21e27d5 to
d75b624
Compare
|
@aabadie! Great! Looking forward to it :) |
d75b624 to
8bf0be0
Compare
| { | ||
| puts("Cayenne LPP test application"); | ||
|
|
||
| cayenne_lpp_add_temperature(&lpp, 3, 27.2); |
There was a problem hiding this comment.
Just a minor thing... maybe add labels to the numeric values? Just to make them easier to read and understand params
There was a problem hiding this comment.
maybe add labels to the numeric values?
I don't understand. Do you mean adding a comment beside the values ?
There was a problem hiding this comment.
Ok, I'll add a comment because these values doesn't come from nowhere, these are the values given as example in the cayenne lpp documentation. Then it's easy to verify that the generated payload is correct.
There was a problem hiding this comment.
I applied the same values given as example, but they don't give the exact same result. I don't know where the issue come from (cayenne-lpp library or their doc).
There was a problem hiding this comment.
@aabadie so, if it's working in TTN, do you think this could be an issue with their documentation?
There was a problem hiding this comment.
do you think this could be an issue with their documentation?
Could be. The first buffer (2 temperature sensors) works, the 2 others differ slightly. The C library is very simple, so I doubt there's an issue there.
|
tested in native and samr21-xpro. Works as expected. |
pkg/cayenne-lpp/Makefile
Outdated
| .PHONY: all | ||
|
|
||
| all: git-download | ||
| "$(MAKE)" -C $(PKG_BUILDDIR) -f $(CURDIR)/Makefile.${PKG_NAME} |
There was a problem hiding this comment.
please stick to one variable brace type (-> $(PKG_NAME))
|
Tested with Cayenne integration in TheThingsNetwork: works like a charm :) |
d31704d to
41755e0
Compare
41755e0 to
fc4b485
Compare
Contribution description
This PR adds support for generating payload compatible with Cayenne, a web IoT dashboard builder.
To nicely integrate into Cayenne, the payload must be compatible with the Cayenne Low Power Payload (LPP) format. This format mainly targets LoRaWAN networks and details about the format are available online here: https://mydevices.com/cayenne/docs_stage/lora/#lora-cayenne-low-power-payload
The payload format is generated using an external library on github: https://github.com/aabadie/cayenne-lpp and this PR just imports it in RIOT as a package.
A basic test application is provided.
Issues/PRs references
None