Skip to content

Commit

Permalink
MQTT fix
Browse files Browse the repository at this point in the history
  • Loading branch information
enesbcs committed May 18, 2023
1 parent 7b68c24 commit 3ef9f7f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions shellyteacher4domo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 3ef9f7f

Please sign in to comment.