diff --git a/MQTT.py b/MQTT.py index e6c6cf2..4491986 100755 --- a/MQTT.py +++ b/MQTT.py @@ -11,6 +11,7 @@ def on_connect(client, userdata, flags, rc): if rc == 0: print("成功订阅") client.subscribe('lot_mqtt') + client.publish('success', payload='成功订阅', qos=0) def valid(msg, client):