From 7d213a46650064cb91ef9f733f7d61dd16df5bff Mon Sep 17 00:00:00 2001 From: Konstantin Koslowski Date: Wed, 6 Nov 2019 00:03:04 +0100 Subject: [PATCH] homecontrol-dht: minor updates --- main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index f151b6c..22ad410 100644 --- a/main.py +++ b/main.py @@ -7,8 +7,8 @@ import ujson import wifi CONFIG = "config.json" -ADDRESS="http://192.168.11.21:5000" -TIMEOUT_UPDATE = 5 +ADDRESS="http://192.168.11.11:5000" +TIMEOUT_UPDATE = 600 class SensorDHT: def __init__(self): @@ -43,7 +43,7 @@ class SensorDHT: self.send_update(self.id_h, "humidity", h) def send_update(self, id_s, type_s, value): - url = "%s/sensors/update" % ADDRESS + url = "%s/sensor/update" % ADDRESS data = {"id": id_s, "type": type_s, "value": value} try: r = requests.post(url, json=data)