From c9d706e603f388cea7f2a8821872cddd7592027e Mon Sep 17 00:00:00 2001 From: David Zingg Date: Mon, 25 Nov 2019 19:43:31 +0100 Subject: [PATCH] #9 Relais ausschalten wenn Octoprint heruntergefahren wird #7 Relais einschalten wenn Octoprint gestartet wurde --- octoprint_mystromswitch/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/octoprint_mystromswitch/__init__.py b/octoprint_mystromswitch/__init__.py index 24e2cc4..a18fed7 100644 --- a/octoprint_mystromswitch/__init__.py +++ b/octoprint_mystromswitch/__init__.py @@ -139,13 +139,16 @@ class MyStromSwitchPlugin(octoprint.plugin.SettingsPlugin, def on_after_startup(self): if self.powerOnOnStart: + self._logger.info("Turn on Relais on Start") self._setRelaisState(True) def on_shutdown(self): if self.powerOffOnShutdown: if self.powerOffDelay <= 0: + self._logger.info("Turn on Relais off Shutdown") self._setRelaisState(False) else: + self._logger.info("Turn on Relais off Shutdown Delayed") self._powerCycleRelais(False, self.powerOffDelay) def on_settings_migrate(self, target, current):