update
This commit is contained in:
parent
8a813ab293
commit
f67220d983
4
MQTT.py
4
MQTT.py
|
@ -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'))
|
||||||
|
|
Loading…
Reference in New Issue