Skip to content
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

Pass recvTime to uplink decoder for TS013 compatibility #7467

Open
3 of 6 tasks
johanstokking opened this issue Jan 9, 2025 · 0 comments
Open
3 of 6 tasks

Pass recvTime to uplink decoder for TS013 compatibility #7467

johanstokking opened this issue Jan 9, 2025 · 0 comments
Assignees
Labels
c/application server This is related to the Application Server size/small This should not be a lot of work
Milestone

Comments

@johanstokking
Copy link
Member

Summary

Application Server does not pass recvTime in the input object to the uplink decoder. This is required for compliance with TS013. See https://resources.lora-alliance.org/technical-specifications/ts013-1-0-0-payload-codec-api.

Current Situation

The codecs are TS013 compliant except for this recvTime field.

Why do we need this? Who uses it, and when?

We need it for TS013 compliance. The field is there for the codecs to insert metadata or even decode data based on time.

Proposed Implementation

  1. Add recvTime to https://github.com/TheThingsNetwork/lorawan-stack/blob/v3.33/pkg/messageprocessors/javascript/javascript.go#L172-L175. In JavaScript it should be Date, probably time.Time is converted by goja, otherwise we need some conversion in the wrapper script
  2. Pass the recvTime to the function in https://github.com/TheThingsNetwork/lorawan-stack/blob/v3.33/pkg/messageprocessors/javascript/javascript.go#L203-L205
  3. Add unit tests
  4. Update documentation: https://www.thethingsindustries.com/docs/integrations/payload-formatters/javascript/uplink/

Contributing

  • I can help by doing more research.
  • I can help by implementing the feature after the proposal above is approved.
  • I can help by testing the feature before it's released.

Validation

Code of Conduct

@johanstokking johanstokking added c/application server This is related to the Application Server needs/triage We still need to triage this labels Jan 9, 2025
@johanstokking johanstokking added this to the v3.33.1 milestone Jan 9, 2025
@johanstokking johanstokking added size/small This should not be a lot of work and removed needs/triage We still need to triage this labels Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/application server This is related to the Application Server size/small This should not be a lot of work
Projects
None yet
Development

No branches or pull requests

2 participants