#17 Logs aufgeräumt

This commit is contained in:
David Zingg 2020-01-16 16:57:39 +01:00
parent f8fa67a43d
commit 9015fd16de
2 changed files with 11 additions and 12 deletions

View File

@ -1,7 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="7e2e0eec-b22e-4d48-8f24-196d1ed9b51a" name="Default Changelist" comment="" /> <list default="true" id="7e2e0eec-b22e-4d48-8f24-196d1ed9b51a" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/octoprint_mystromswitch/__init__.py" beforeDir="false" afterPath="$PROJECT_DIR$/octoprint_mystromswitch/__init__.py" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -45,13 +47,6 @@
<option name="presentableId" value="Default" /> <option name="presentableId" value="Default" />
<updated>1574193087583</updated> <updated>1574193087583</updated>
</task> </task>
<task id="LOCAL-00009" summary="#6 UI Updates senden und anzeigen">
<created>1574280534955</created>
<option name="number" value="00009" />
<option name="presentableId" value="LOCAL-00009" />
<option name="project" value="LOCAL" />
<updated>1574280534955</updated>
</task>
<task id="LOCAL-00010" summary="#6 UI Updates senden und anzeigen"> <task id="LOCAL-00010" summary="#6 UI Updates senden und anzeigen">
<created>1574280753494</created> <created>1574280753494</created>
<option name="number" value="00010" /> <option name="number" value="00010" />
@ -388,7 +383,14 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1579188503178</updated> <updated>1579188503178</updated>
</task> </task>
<option name="localTasksCounter" value="58" /> <task id="LOCAL-00058" summary="#17 Logging zur Fehleranalyse eingebaut">
<created>1579190155814</created>
<option name="number" value="00058" />
<option name="presentableId" value="LOCAL-00058" />
<option name="project" value="LOCAL" />
<updated>1579190155814</updated>
</task>
<option name="localTasksCounter" value="59" />
<servers /> <servers />
</component> </component>
<component name="UnknownFeatures"> <component name="UnknownFeatures">

View File

@ -80,7 +80,6 @@ class MyStromSwitchPlugin(octoprint.plugin.SettingsPlugin,
try: try:
request = requests.get( request = requests.get(
'http://{}/report'.format(self.ip), timeout=1) 'http://{}/report'.format(self.ip), timeout=1)
self._logger.info("timer request finish")
if request.status_code == 200: if request.status_code == 200:
timestamp = time.time() timestamp = time.time()
data = request.json() data = request.json()
@ -135,8 +134,6 @@ class MyStromSwitchPlugin(octoprint.plugin.SettingsPlugin,
self._logger.info('http://{}/timer'.format(self.ip)) self._logger.info('http://{}/timer'.format(self.ip))
request = requests.post( request = requests.post(
'http://{}/timer'.format(self.ip), params={'mode': value, 'time': time}, timeout=1) 'http://{}/timer'.format(self.ip), params={'mode': value, 'time': time}, timeout=1)
self._logger.info("a")
self._logger.info("powerCycle Request Status: " + str(request.status_code))
if request.status_code == 200: if request.status_code == 200:
return return
else: else: