-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pkg/cayenne-lpp: add support for Cayenne LPP format #8809
Conversation
21e27d5
to
d75b624
Compare
@aabadie! Great! Looking forward to it :) |
d75b624
to
8bf0be0
Compare
tests/pkg_cayenne-lpp/main.c
Outdated
{ | ||
puts("Cayenne LPP test application"); | ||
|
||
cayenne_lpp_add_temperature(&lpp, 3, 27.2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant via #define.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, perfect
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please stick to one variable brace type (-> $(PKG_NAME)
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
Tested with Cayenne integration in TheThingsNetwork: works like a charm :) |
d31704d
to
41755e0
Compare
41755e0
to
fc4b485
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK.
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