|
@@ -199,7 +199,7 @@ class AiView(View):
|
|
|
# self.do_delete_redis(uid)
|
|
|
|
|
|
# mqtt通知设备关闭AI识别功能
|
|
|
- msg = {'AiStatus', 'inactive'},
|
|
|
+ msg = {'AiStatus': 'inactive'},
|
|
|
req_success = self.requestPublishMqtt(uid, topic_name, msg)
|
|
|
if not req_success:
|
|
|
return response.json(10044)
|
|
@@ -254,10 +254,10 @@ class AiView(View):
|
|
|
|
|
|
# mqtt通知设备开启AI识别功能
|
|
|
msg = {
|
|
|
- 'AiStatus', 'active',
|
|
|
- 'etk', etk,
|
|
|
- 'endTime', endTime,
|
|
|
- 'aiIdentificationUrl', aiIdentificationUrl,
|
|
|
+ 'AiStatus': 'active',
|
|
|
+ 'etk': etk,
|
|
|
+ 'endTime': endTime,
|
|
|
+ 'aiIdentificationUrl': aiIdentificationUrl,
|
|
|
},
|
|
|
req_success = self.requestPublishMqtt(uid, topic_name, msg)
|
|
|
if not req_success:
|
|
@@ -291,7 +291,6 @@ class AiView(View):
|
|
|
'x-amz-customauthorizer-name': authorizer_name,
|
|
|
'Token': Token,
|
|
|
'x-amz-customauthorizer-signature': signature}
|
|
|
- msg = eval(msg)
|
|
|
r = requests.post(url=url, headers=headers, json=msg, timeout=2)
|
|
|
if r.status_code == 200:
|
|
|
res = r.json()
|