From 3ef9f7f10fcabfd70804471b2fcab2ba8c1823a9 Mon Sep 17 00:00:00 2001 From: enesbcs Date: Thu, 18 May 2023 18:31:16 +0200 Subject: [PATCH] MQTT fix --- shellyteacher4domo.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/shellyteacher4domo.py b/shellyteacher4domo.py index db10802..15c99fd 100755 --- a/shellyteacher4domo.py +++ b/shellyteacher4domo.py @@ -10,6 +10,9 @@ class MQTTClient(mqtt.Client): # Gen1 detailed infos and Gen2 alive subscribechannel = "" + def _on_pre_connect(self, func): + pass + def on_connect(self, client, userdata, flags, rc): try: self.subscribe(self.subscribechannel,0) @@ -55,6 +58,9 @@ def on_message(self, mqttc, obj, msg): class MQTTClientOnlineCheck(mqtt.Client): #Gen2 hack to get some infos... subscribechannel = "" + def _on_pre_connect(self, func): + pass + def on_connect(self, client, userdata, flags, rc): try: self.subscribe(self.subscribechannel,0)