From eb94cf8b719f181f376ade1e06a4afdbf4c4c10a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane?= Date: Mon, 18 Jan 2021 17:17:13 +0100 Subject: [PATCH] USB disconnection before shutdown --- octoprint_phom/__init__.py | 1 + setup.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/octoprint_phom/__init__.py b/octoprint_phom/__init__.py index 6e07e9d..2b0b27e 100644 --- a/octoprint_phom/__init__.py +++ b/octoprint_phom/__init__.py @@ -272,6 +272,7 @@ def on_event(self, event, payload): def turn_off(self): # central function with the turn off implementation turned_off = False + self._printer.disconnect() if(self._settings.get(['auto_off_type']) == 'direct'): requests.put("http://{}/api/{}/lights/{}/state".format(self._settings.get(['hue_ip']), self._settings.get(['hue_token']), self._settings.get(['light_id'])), json={"on": False}) turned_off = True diff --git a/setup.py b/setup.py index c000f7f..eba6440 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ plugin_name = "Ophom" # The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module -plugin_version = "1.3.3" +plugin_version = "1.3.4" # The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin # module