diff --git a/sensor_to_local.py b/sensor_to_local.py index d1703d0..52ac798 100755 --- a/sensor_to_local.py +++ b/sensor_to_local.py @@ -186,6 +186,7 @@ def local(): } t = LOT_DATA(**data) add(t) + time.sleep(1) except Exception as e: print(e) pass diff --git a/sensor_to_server.py b/sensor_to_server.py index 8ba691f..126624b 100755 --- a/sensor_to_server.py +++ b/sensor_to_server.py @@ -218,6 +218,7 @@ def test(): t2 = LOT_DATA(**data) client.publish('demo', payload=json.dumps(data, ensure_ascii=False), qos=0) add(t2) + time.sleep(1) def on_connect(client, userdata, flags, rc):