mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-15 17:02:53 +08:00
10 lines
230 B
Python
10 lines
230 B
Python
import mqtt
|
|
|
|
client = mqtt.MQTT('broker.emqx.io',port=1883,clinetID='clientid',username='name_',password='passwd_')
|
|
|
|
ret = client.connect()
|
|
print("connect ret:%d" % ret)
|
|
|
|
ret = client.disconnect()
|
|
print("disconnect ret:%d" % ret)
|