|
|
|
@ -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: |
|
|
|
|