update
This commit is contained in:
parent
5f4b7fc91a
commit
0d3077ad02
10
MQTT.py
10
MQTT.py
|
@ -30,11 +30,11 @@ def valid(msg, client):
|
|||
|
||||
# Message receiving callback
|
||||
def on_message(client, userdata, msg):
|
||||
if not valid(msg, client):
|
||||
# print("验证失败")
|
||||
return
|
||||
# print("验证通过")
|
||||
client.publish('error', payload='通过', qos=0)
|
||||
# if not valid(msg, client):
|
||||
# # print("验证失败")
|
||||
# return
|
||||
# # print("验证通过")
|
||||
# client.publish('error', payload='通过', qos=0)
|
||||
try:
|
||||
origin_data = json.loads(msg.payload.decode('utf-8'))
|
||||
data = origin_data["msg"]
|
||||
|
|
Loading…
Reference in New Issue