update
This commit is contained in:
parent
656f97c0be
commit
23d664774f
2
MQTT.py
2
MQTT.py
|
@ -23,7 +23,7 @@ class MQTTClient:
|
|||
self.username = username
|
||||
self.password = password
|
||||
# 千万不要指定client_id 不然死翘翘
|
||||
self.client = mqtt.Client(client_id="测试")
|
||||
self.client = mqtt.Client(client_id=subscribe_topic)
|
||||
self.client.username_pw_set(self.username, self.password)
|
||||
self.client.on_connect = self.on_connect
|
||||
self.client.on_message = self.on_message
|
||||
|
|
Loading…
Reference in New Issue