mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-15 17:02:53 +08:00
15 lines
213 B
Python
15 lines
213 B
Python
import mqtt
|
|
|
|
client = mqtt.MQTT()
|
|
|
|
client.set_host('broker.emqx.io')
|
|
client.set_port(1883)
|
|
ret = client.connect()
|
|
print('client.connect:%d' % ret)
|
|
|
|
ret = client.disconnect()
|
|
print('client.disconnect:%d' % ret)
|
|
|
|
|
|
|