#6 UI Updates senden und anzeigen
This commit is contained in:
parent
79bc4eb897
commit
799c6b5406
@ -50,13 +50,13 @@ 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)
|
||||
|
Loading…
Reference in New Issue
Block a user