update
This commit is contained in:
parent
17ae017821
commit
a90818cdb3
2
MQTT.py
2
MQTT.py
|
@ -32,7 +32,7 @@ class MQTTClient:
|
||||||
def on_connect(self, client, userdata, flags, rc):
|
def on_connect(self, client, userdata, flags, rc):
|
||||||
if rc == 0:
|
if rc == 0:
|
||||||
self.client.subscribe(self.topic)
|
self.client.subscribe(self.topic)
|
||||||
client.publish('success', payload='成功订阅' + 'device_name' + ',time=' + str(datetime.datetime.now()),
|
client.publish('success', payload='成功订阅' + subscribe_topic + ',time=' + str(datetime.datetime.now()),
|
||||||
qos=0)
|
qos=0)
|
||||||
|
|
||||||
def on_message(self, client, userdata, msg):
|
def on_message(self, client, userdata, msg):
|
||||||
|
|
Loading…
Reference in New Issue