Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@nicolas-juteau
Copy link

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.

@brocaar
Copy link
Contributor

brocaar commented May 5, 2025

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.

@nicolas-juteau
Copy link
Author

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

@brocaar
Copy link
Contributor

brocaar commented Nov 6, 2025

Just brainstorming a bit more about this, what if the device-profile-templates and the device-profiles would be merged into just device-profiles? In this case the tenant_id of the device-profile would become nullable meaning that:

  • tenant_id: NULL device-profile templates are global and can be used by any tenant but can only be edited by global admins
  • tenant_id: xyz device-profile templates are private to tenant xyz

That way, we remove the need to copy from a device-profile template when creating a new device-profile. It also means that codecs can be updated and will immediately affect all devices using that (global) device-profile.

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.

2 participants