This commit is contained in:
xyj 2023-12-09 17:40:16 +08:00
parent d9db4ee8bd
commit 656e62d1e5
1 changed files with 1 additions and 0 deletions

View File

@ -11,6 +11,7 @@ def on_connect(client, userdata, flags, rc):
if rc == 0: if rc == 0:
print("成功订阅") print("成功订阅")
client.subscribe('lot_mqtt') client.subscribe('lot_mqtt')
client.publish('success', payload='成功订阅', qos=0)
def valid(msg, client): def valid(msg, client):