From a90818cdb3af7d15211d0eeb9646a79465e93534 Mon Sep 17 00:00:00 2001 From: xyj <10908227994@qq.com> Date: Mon, 11 Dec 2023 16:57:21 +0800 Subject: [PATCH] update --- MQTT.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MQTT.py b/MQTT.py index 3330159..66df946 100644 --- a/MQTT.py +++ b/MQTT.py @@ -32,7 +32,7 @@ class MQTTClient: def on_connect(self, client, userdata, flags, rc): if rc == 0: 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) def on_message(self, client, userdata, msg):