Recap
Let's recap what we just accomplished:
- Created a new, empty plugin.
- Implemented metrics.
We created three different metrics and registered them in MoBro. - Scheduled dynamic metric updates.
We configured the scheduler to periodically update the values of our dynamic metrics. - Added plugin settings.
We exposed the metric update frequency as a customizable setting for users. - Published the plugin.
We packaged the plugin as a single.zip
file. - Installed the plugin.
Finally, we successfully installed the plugin in MoBro.
When reviewing the resulting code, it's clear that the implementation is concise.
The SDK handles most of the complex tasks, such as scheduling, managing settings, and communicating with MoBro.
This allows us to focus on designing and updating metrics effectively.
Additionally, the published plugin is very lightweight—the .zip
file for this plugin is only 4KB in size.
Template
Missed a step in this "Getting Started" tutorial?
Or ran into issues along the way?
No need to worry!
The final result of the plugin we created in this tutorial is available as a GitHub project.
Feel free to review the code and explore the repository here:
Plugin.Template
Next Steps
Wondering what to explore next after creating your first plugin?
Here are some suggestions for topics worth exploring in detail:
- In-depth: Plugin configuration
Discover all the available attributes in themobro_plugin_config.json
file and their purposes.
Learn how to add various fields (checkboxes, drop-downs, etc.) to plugin settings. - In-depth: IMoBroPlugin
Explore additional functions of theIMoBroPlugin
interface, such asInit
, and understand when and why they should be used. - In-depth: Registering items
Dive into registering metrics, metric types, units, custom categories, etc. - In-depth: Updating metrics
Learn more about updating metric values and the restrictions imposed by metric types. - In-depth: Error handling
Discover how to handle errors properly, such as missing or invalid settings, and understand how exceptions are managed. - Existing plugins
Check out some open-source plugins to get inspiration and understand best practices in plugin development.