From f0c8bc256b8756fea7a1675a97de770f3359d114 Mon Sep 17 00:00:00 2001 From: xyj <10908227994@qq.com> Date: Thu, 25 Jan 2024 16:39:49 +0800 Subject: [PATCH] update --- MQTT.py | 1 + conf/device/device.conf | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/MQTT.py b/MQTT.py index b232d8d..dd27273 100644 --- a/MQTT.py +++ b/MQTT.py @@ -30,6 +30,7 @@ class MQTTClient: def on_connect(self, client, userdata, flags, rc): if rc == 0: + print("连接成功") self.client.subscribe(self.topic) client.publish(info_topic, payload=publish_payload(code=200, msg='成功订阅' + self.topic), qos=0) diff --git a/conf/device/device.conf b/conf/device/device.conf index 371260d..ba28b3b 100644 --- a/conf/device/device.conf +++ b/conf/device/device.conf @@ -3,5 +3,5 @@ # 订阅的控制主题,必须和系统设置的相同 subscribe_topic=xumu_d001 info_topic=info_xumu_d001 -username=lihai_lot_land1 -password=lihai_lot_land1 \ No newline at end of file +username=lihai_lot_land_1 +password=lihai_lot_land_1 \ No newline at end of file