Skip to content

[LoRa/TTN] Add raw packed decoder (more values, less data) & reduce joins #2546

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

Merged
merged 8 commits into from
Aug 16, 2019

Conversation

TD-er
Copy link
Member

@TD-er TD-er commented Aug 15, 2019

Implemented support for encoding/decoding raw packed data for plugins.
Also improved LoRa/TTN library to perform a join less often.
As long as the module remains powered, a join should not be needed anymore.This prevents a lot of unneeded downward traffic.

TD-er added 8 commits August 13, 2019 01:49
Assume module is joined. If not, a TX attempt will return "not_joined" after which a join should be attempted.
For LoRa, it may take a while to send out samples of different plugins.
This makes it hard to match samples belonging to the same set after receiving them.
The Sample Set Initiator is a task index which should always be considered as the first of a set samples sent to the controller.
For example when triggering to send a set of samples from rules, its order can be always the same. 
Setting the initiator to the first one of the sequence, the same sample set counter will be sent along with the samples.
This does allow uploading even more parameters than the 4 supported by ESPeasy, since encoder and decoder can be tailored to the specific plugin.
For example the GPS plugin can now upload 7 parameters in only 20 bytes.

Still to do: Why can the decoder not handle encoding per 24 bit? (lat/lon do fit perfectly fine in 24 bit).
This does send out all 11 values of the sysinfo plugin.
Makes the rest of the decoder.js a lot simpler.
Also changed the GPS lat/long into 3 bytes again, saving 2 bytes in the packet length.
GPS outputs now 7 values  using 18 bytes (incl. header)
@TD-er TD-er merged commit 54117e9 into letscontrolit:mega Aug 16, 2019
@TD-er TD-er deleted the feature/LoRaTTN_decoder branch September 25, 2019 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant