From b881ca159ffd688df5c9ceb5c563ff6c3ca01e71 Mon Sep 17 00:00:00 2001 From: NilsGrunwald Date: Sun, 2 Oct 2022 18:37:11 +0200 Subject: [PATCH] added keepalive --- web2mqtt/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web2mqtt/__init__.py b/web2mqtt/__init__.py index 97eb3eb..49fb97e 100644 --- a/web2mqtt/__init__.py +++ b/web2mqtt/__init__.py @@ -4,5 +4,5 @@ app = Flask(__name__) # Create an instance of the class for our use import paho.mqtt.client as mqtt client = mqtt.Client("Web2Mqtt") -client.connect("192.168.178.76",1884) +client.connect("192.168.178.76",1884,keepalive=60) client.publish("web2mqtt/status","Web2Mqtt starting up...") \ No newline at end of file