|
@@ -65,6 +65,8 @@ class mqtt_client(object):
|
65
|
65
|
self.__client__.subscribe(topic)
|
66
|
66
|
|
67
|
67
|
def send(self, topic, payload):
|
|
68
|
+ logger.debug("Sending message with topic %s and payload %s",
|
|
69
|
+ topic, str(payload))
|
68
|
70
|
self.__client__.publish(topic, payload)
|
69
|
71
|
|
70
|
72
|
def __on_connect__(self, client, userdata, flags, rc):
|
|
@@ -75,7 +77,7 @@ class mqtt_client(object):
|
75
|
77
|
for topic in self.__callbacks__:
|
76
|
78
|
self.__client__.subscribe(topic)
|
77
|
79
|
self.__block_add_callbacks__ = False
|
78
|
|
-
|
|
80
|
+
|
79
|
81
|
def __on_disconnect__(self, client, flags, rc):
|
80
|
82
|
logger.warning("Disconnect with rc=%d", rc)
|
81
|
83
|
|