bitwarden

This commit is contained in:
jaydee 2024-07-07 20:10:54 +02:00
parent 95da8cecb4
commit 3da6cefe8d

View File

@ -934,7 +934,15 @@ client.will_set("home-assistant/" + host.lower() + "/hwstats", payload=payload,
client.on_connect = on_connect
client.on_message = on_message
writeLog(MQTT_HOST)
client.connect(MQTT_HOST, MQTT_PORT, 25)
connected = False
while not connected:
try:
client.connect(MQTT_HOST, MQTT_PORT, 25)
connected = True
except:
writeLog("Failed to connect repeating...")
time.sleep(10)
# client.publish("sectorq/status", payload="{'action':'connect', 'system':'" + host + "', 'ip': '" + IP + "', 'mac':'" + mac + "', 'ver':'?'}", qos=0, retain=False)