-
-
Notifications
You must be signed in to change notification settings - Fork 207
Added codec plugin implementation #671
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
base: master
Are you sure you want to change the base?
Added codec plugin implementation #671
Conversation
- encode/decode now has their own Handler trait functions, no longer relies on js module functions to run - rquickjs: now uses call function rather than eval_with_option, to allow id/name functions with exports to be used in js plugin file - encodeDownlink/decodeUplink now needs the export keyword
…nctions & plugins
I'm sorry to say, but I don't see this fit in well within ChirpStack. The purpose of the device-profile templates is more or less overlaps with the need described in this PR. I got sidetracked with some customer projects, but I'm planning to pick up the work on https://github.com/chirpstack/lorawan-device-profiles soon and fully integrate this in ChirpStack. |
Indeed, using https://github.com/chirpstack/lorawan-device-profiles seemed like the definitive way to go for this purpose. However, we quickly found out it would not meet our needs since it only creates the device profile templates and does not update the already existing device profiles themselves (whether derived from the template or not), hence the reason of this pull request so far. I guess we'll have to wait until you pick up the work and see what you have planned for this. As a bare minimum, having the possibility to update existing device profile(s) without having to copy/paste the codec itself via the ChirpStack UI, i'd be more than happy with this. Cheers |
Enables plugin utilization for the payload codec encode/decode functions rather than using javascript directly in the chirpstack panel code editor.
This streamlines the process of CI/CD for codecs as well as easy management/replication of development, staging & production environments. This implementation is strongly inspired from the already existing ADR algorithm plugin feature. Tested with 4.12.0. Default passthrough plugin is implemented if codec plugin is used in the device profile but no custom plugins are defined in the chirpstack configuration file: uplink and downlink payloads is passed as-is with no modifications.