From 799c6b5406d4d2cb6d83adc11ce07e3de94ac5c4 Mon Sep 17 00:00:00 2001 From: David Zingg Date: Wed, 20 Nov 2019 21:14:42 +0100 Subject: [PATCH] #6 UI Updates senden und anzeigen --- octoprint_mystromswitch/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/octoprint_mystromswitch/__init__.py b/octoprint_mystromswitch/__init__.py index b65eb39..cb2e5ed 100644 --- a/octoprint_mystromswitch/__init__.py +++ b/octoprint_mystromswitch/__init__.py @@ -50,18 +50,18 @@ class MyStromSwitchPlugin(octoprint.plugin.SettingsPlugin, self._logger.info(self.ip) self._logger.info(self.intervall) - self._logger.info("Starting timer.") self._timer = RepeatedTimer(self.intervall, self._timer_task) self._timer.start() def _timer_task(self): if self.ip is not None: + self._logger.debug("send Request") try: request = requests.get( 'http://{}/report'.format(self.ip), timeout=1) self._logger.debug(request.json()) - #self._plugin_manager.send_plugin_message(self._identifier, + # self._plugin_manager.send_plugin_message(self._identifier, # request.json()) except (requests.exceptions.ConnectionError, ValueError): self._logger.info('Connection Error Host: {}'.format(self.ip))