bugfix
This commit is contained in:
@@ -40,10 +40,9 @@ while True:
|
||||
data = json.dumps({'payload': 'RING', 'topic': 'lewe/doorbell', 'retain': 'False'}).encode('utf8')
|
||||
request = urllib.request.Request("localhost:8123/api/services/mqtt/publish", data, headers)
|
||||
# request = urllib.request.Request("https://www.nodebucket.de:8123/api/services/mqtt/publish", data, headers)
|
||||
response = urllib.request.urlopen(reqest)
|
||||
response = urllib.request.urlopen(request)
|
||||
except Exception as err:
|
||||
logger.error("Could not ring doorbell")
|
||||
logger.error(err.message)
|
||||
time.sleep(300)
|
||||
else:
|
||||
logger.info(data)
|
||||
|
||||
Reference in New Issue
Block a user