-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Meshtastic Plugins #8797
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
Closed
Closed
Meshtastic Plugins #8797
+214
−2
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… enhance MPM script for vendored dependencies
…ry' of github.com:MeshEnvy/firmware into meshenvy/module-registry
…ncies in pyproject.toml
… executables from both mpm and firmware virtual environments
…ions to handle None values
…ctions with informative print statements
…lude labels in error messages and improve directory logging
…nsistency and maintain existing plugin exclusions
… management and protobuf generation - Removed the deprecated mpm_pio.py script. - Introduced mpm_generate.py to handle protobuf file generation and plugin include paths. - Updated platformio.ini to use the new mpm_generate.py script in the pre-build process. - Deleted poetry.lock and pyproject.toml files as part of the transition to a simpler dependency management approach.
…ty before running generation - Added a check to determine if the mpm command is available. - Updated error handling to provide clearer warnings when mpm is not found or when generation fails. - Improved the flow to skip protobuf generation if mpm is unavailable.
- Added `#pragma MPM_MODULE` directive for automatic module registration in plugins. - Updated `SampleModule` implementation to align with new registration method. - Removed obsolete `ModuleRegistry` files as they are no longer needed. - Adjusted `Modules.cpp` to include dynamic module initialization. - Enhanced README.md with detailed examples for module registration. This change streamlines the module registration process and improves clarity in the documentation.
- Simplified the addition of plugin directories to the include path by directly including the plugins directory instead of individual plugin source paths. - Updated the print statement to reflect the new include path structure. This change enhances clarity and ensures that includes must be explicit.
- Created a new header file for the sample plugin, defining the plugin version and including the SampleModule. - Removed the redundant `#pragma MPM_MODULE` directive from SampleModule.h as it is now defined in the new plugin header. This change establishes the foundational structure for the sample plugin and streamlines module registration.
Member
|
Thanks for being willing to work upstream :) |
Author
|
You're welcome. I'm closing this one though, as the approach is out of date. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces the concept of Meshtastic Plugins: a clean, decentralized way to extend Meshtastic without touching the core firmware.
Currently, the plugin registry is running as part of the https://meshforge.org/ project at https://registry.meshforge.org but I am open to moving it to an official registry if you guys like this concept. The pip package is also currently named
mesh-plugin-managerbut can be renamed tomeshtastic-plugin-managerif you take it on officially.Key features
Plugins live completely outside the core. They are installed as needed via a simple
git cloneinto./plugins/<plugin-slug>/.A new build helper script
./bin/mpm_pio.py(Meshtastic Plugin Manager) is invoked automatically via a tiny change inplatformio.ini:*.protofiles in plugins and generates the corresponding protobuf codemeshtastic/protobufsfilesmpm_pio.pycan also be used as a standalone CLI tool (python bin/mpm_pio.py list, etc.) to list discovered plugins or manually generate protobuf artifactsNew lightweight dynamic module registration system in
src/modules/ModuleRegistry.cppMESHTASTIC_REGISTER_MODULE(MyModule)in their codeModules.cppin the coreWorking examples
./src/plugins/sample-plugin– a fully functional demo plugin included in this repohttps://github.com/MeshEnvy/mesh-forge/blob/main/registry
Next step (suggestion)
If we like this direction, we could spin up an official
registry.meshtastic.orgthat serves the latestregistry.json. Plugin authors would contribute via PRs to a canonical registry repository, making discovery seamless for users.Looking forward to your feedback! This should make third-party extensions much easier and keep the core lean. There may even be existing modules that could be migrated out of the core.