Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions swutil/pwmqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,14 @@ def __init__(self, broker, port, qpub, qsub, name="pwmqtt", user = None, passwor
self.user = user
self.password = password
self.subscriptions = {}

self.connect()
debug("MQTT init done")

def connected(self):
return (self.rc == 0)

def connect(self):
self.mqttc = mosquitto.Mosquitto(self.name)
self.mqttc = mosquitto.Client(self.name)
self.mqttc.on_message = self.on_message
self.mqttc.on_connect = self.on_connect
self.mqttc.on_disconnect = self.on_disconnect
Expand Down