Environment detection & logging on startup

Incl. OctoPi version & RPi model through bundled plugin that only
gets loaded if OctoPi is detected.
This commit is contained in:
Gina Häußge committed 2017-11-10 17:32:59 +01:00
1 parent 0bb343e1d3
commit b2d70de144
19 files changed
+494 -53

No files matched your search

+2 -1
View File
@@ -91,7 +91,8 @@ def plugin_manager(init=False, plugin_folders=None, plugin_types=None, plugin_en
else:
if init:
if plugin_types is None:
plugin_types = [StartupPlugin,
plugin_types = [EnvironmentDetectionPlugin,
StartupPlugin,
ShutdownPlugin,
TemplatePlugin,
SettingsPlugin,
+10
View File
@@ -105,6 +105,16 @@ class ReloadNeedingPlugin(Plugin):
Mixin for plugin types that need a reload of the UI after enabling/disabling them.
"""
class EnvironmentDetectionPlugin(OctoPrintPlugin, RestartNeedingPlugin):
def get_additional_environment(self):
pass
def on_environment_detected(self, environment, *args, **kwargs):
pass
class StartupPlugin(OctoPrintPlugin, SortablePlugin):
"""
The ``StartupPlugin`` allows hooking into the startup of OctoPrint. It can be used to start up additional services