Repository navigation
Plugin proto
Provides a minimal working example and starting point for developing OSPy plug-ins.
| Item | Value |
|---|---|
| Version | 1.0.0 |
| Category | Utilities and development examples |
| Author | Martin Pihrt |
| License | GPL-3.0 |
| OSPy |
3.0.211 or newer |
| Python |
3.8 or newer |
| Permissions | None |
| Hardware | No dedicated hardware requirement declared |
| Dependencies | None |
| Python/OS packages | None |
| Interfaces | No provider or mobile API declared |
| Source | Open the plug-in directory |
Provides a minimal working example and starting point for developing OSPy plug-ins.
Tested in Python 3+
The example now includes a plugin.json manifest, uses the shared OSPy plug-in runtime for its worker, and demonstrates a health() report with lifecycle, counter, latest cycle and error information.
The proto plugin is designed as a starting point for creating new plugin for OSPy. It does not perform any useful action but contains the basic components necessary for a functioning plugin. More detailed information can be found directly in the plugin on the help page.
The basic structure is as follows:
plugins + plugin_name + data + docs + static + templates + init.py + plugin.json \ README.md
The static files will be made accessible automatically at the following location: /plugins/plugin_name/static/...
All *.md files in the docs directory will be visible in the help page. The README.md (if available) will be the first entry in the help page and might be used in the future as a description for plug-in browsing.
The following notes are generated from the help page shipped with this plug-in. Field names are also explained directly in the OSPy settings page.
The proto plugin is designed as a starting point for creating new plugin for OSPy. It does not perform any useful action but contains the basic components necessary for a functioning plugin.
The plugin includes the folowing files
The basic structure is as follows:
plugins
-
plugin_name
-
data
-
docs
-
static
-
templates
-
init.py
README.md
The static files will be made accessible automatically at the following location:
/plugins/plugin_name/static/...
All *.md files in the docs directory will be visible in the help page.
The README.md (if available) will be the first entry in the help page and might be used in the future as a description for plug-in browsing.
- init.py The python program that does the actual work of the plugin. Location:
plugin_name/init.py
- proto.html A web.py template that provides a user interface for the plugin. It includes both Python code and web page markup. Location:
plugin_name/templates/proto.html
- proto_help.html Provides documentation for the plugin including any special hardware needed and set up instructions. Location:
plugin_name/templates/proto_help.html
- README.MD Provides basic documentation in the Github reposytory and plugin manager for instal. Location:
plugin_name/README.MD
Using images or files in plugin
- image_1.png The image used in these example. Location:
plugin_name/static/images/img_1.png
- image_2.png The image used in these example. Location:
plugin_name/static/images/img_2.png
Using the proto plugin
This plugin is disabled by default. If you are reading this, the proto plugin is probably enabled on your system. Otherwise you can enable it using the plugin manager.
Inside the plugin, there is a demonstration of how to display statements in the log, in the footer area on the home page and in the station running area (where we can list, for example, the flow rate in liters at a given station).
Github plugins repository
Check OSPy → Diagnostics first and remove passwords, tokens, private addresses and other secrets before sharing logs. Report reproducible plug-in problems in the OSPy-plugins issue tracker.
Start
Reference
Catalog sections

