This commit is contained in:
xyj 2023-12-07 18:48:48 +08:00
parent 8a813ab293
commit f67220d983
1 changed files with 2 additions and 2 deletions

View File

@ -32,8 +32,8 @@ def on_message(client, userdata, msg):
# return # return
# print("验证通过") # print("验证通过")
import os import os
device_name = os.environ['device_name'] # device_name = os.environ['device_name']
client.publish('error', payload=device_name, qos=0) # client.publish('error', payload=device_name, qos=0)
client.publish('success', payload='验证通过', qos=0) client.publish('success', payload='验证通过', qos=0)
try: try:
origin_data = json.loads(msg.payload.decode('utf-8')) origin_data = json.loads(msg.payload.decode('utf-8'))