From 0228d2045a37a099bdce80341c5349b5c47f8170 Mon Sep 17 00:00:00 2001 From: Joe DiPrima Date: Tue, 3 Jan 2023 06:13:08 -0600 Subject: [PATCH] 01/03/2023 --- qmutants.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/qmutants.py b/qmutants.py index fb39328..bb9f83a 100644 --- a/qmutants.py +++ b/qmutants.py @@ -1821,13 +1821,16 @@ class MainWindow(QMainWindow): self.layout.addLayout(hbox1) def setup_mqtt(self): - if MQTT_ENABLED: - broker_address="192.168.86.27" - #print("creating new instance") - self.client = mqtt.Client("P1") #create new instance - self.client.username_pw_set("homeassistant", "oes5gohng9gau1Quei2ohpixashi4Thidoon1shohGai2mae0ru2zaph2vooshai") - self.client.connect(broker_address) - + try: + if MQTT_ENABLED: + broker_address="192.168.86.27" + #print("creating new instance") + self.client = mqtt.Client("P1") #create new instance + self.client.username_pw_set("homeassistant", "oes5gohng9gau1Quei2ohpixashi4Thidoon1shohGai2mae0ru2zaph2vooshai") + self.client.connect(broker_address) + except: + pass + #Send mqtt with talking def send_mqtt(self,out_str): if MQTT_ENABLED: