2022-11-12 22:21:23 +08:00

20 lines
511 B
Python

import _mqtt
class MQTT(_mqtt._MQTT):
def __init__(self,
ip: str,
port=1883,
clinetID='mac',
username='',
password='',
version='3.1.1',
ca='',
keepalive=60):
print('MQTT init')
print(port)
print('ip:', ip)
super().__init__(ip, port, clinetID,
username, password, version,
ca, keepalive)