From 01db1e6a1c98ea71f98234afa72b2d2631015355 Mon Sep 17 00:00:00 2001 From: wangfq Date: Fri, 10 Jul 2026 09:12:31 +0800 Subject: [PATCH] =?UTF-8?q?DBNMQTTool:=20=E5=A2=9E=E5=8A=A0=20dld960/+/dev?= =?UTF-8?q?/#=20=E8=AE=A2=E9=98=85=E5=85=BC=E5=AE=B9=E6=97=A7=E5=9B=BA?= =?UTF-8?q?=E4=BB=B6=E5=A4=9A=E7=BA=A7=20topic?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 旧固件响应发布到 dld960/{sn}/dev/config/resp 等多级路径, 单级通配 dld960/+/dev 无法匹配,# 通配确保向后兼容。 --- DBNMQTTool/dbn_mqtt_tool/mqtt_client.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/DBNMQTTool/dbn_mqtt_tool/mqtt_client.py b/DBNMQTTool/dbn_mqtt_tool/mqtt_client.py index be43e36..2bd799c 100644 --- a/DBNMQTTool/dbn_mqtt_tool/mqtt_client.py +++ b/DBNMQTTool/dbn_mqtt_tool/mqtt_client.py @@ -70,6 +70,8 @@ class MqttClient: from .protocol import TOPIC_ALL_DEVICE_UP print(f"[MqttClient] auto-subscribe: {TOPIC_ALL_DEVICE_UP}", flush=True) client.subscribe(TOPIC_ALL_DEVICE_UP, qos=1) + # 兼容旧固件多级 topic: dld960/{sn}/dev/config/resp 等 + client.subscribe("dld960/+/dev/#", qos=1) else: self._connected = False self._notify_status(False, f"连接失败 (rc={rc})")