Use mqtt.loop_start() to reconnect after network disconnect
This commit is contained in:
parent
c5c186accb
commit
a586de99c6
1 changed files with 1 additions and 0 deletions
|
@ -114,6 +114,7 @@ class Prediction(threading.Thread):
|
|||
config["mqtt"]["username"], config["mqtt"]["password"]
|
||||
)
|
||||
self.mqtt.connect(config["mqtt"]["broker"], config["mqtt"]["port"], 60)
|
||||
self.mqtt.loop_start()
|
||||
print("MQTT: Connected to broker", flush=True)
|
||||
|
||||
self.oww = Model(
|
||||
|
|
Loading…
Add table
Reference in a new issue