1
0

3 Коммитууд da3812fc0b ... 6bf13b2fff

Эзэн SHA1 Мессеж Огноо
  locky 6bf13b2fff 忽略日志文件更改 2 долоо хоног өмнө
  locky 29f8577662 优化快照接口 2 долоо хоног өмнө
  locky 31626d9485 优化快照接口 2 долоо хоног өмнө

+ 2 - 1
.gitignore

@@ -7,4 +7,5 @@
 /object/__pycache__
 /service/__pycache__
 /__pycache__/*.pyc
-/logs/info.log
+/logs/info.log
+logs/info.log

+ 8 - 0
azoauth/config.py

@@ -1,3 +1,5 @@
+import logging
+LOGGER = logging.getLogger('django')
 
 RESP_SERVER_DOMAIN_DATA = {
     'CN': 'rtsp.zositech.xyz',
@@ -11,6 +13,12 @@ SERVER_PREFIX_TEST = 'http://test.zositechc.cn'
 
 RTSP_PREFIX = 'rtsp'
 
+SERVER_API = {
+    'US': 'http://www.dvema.com',
+    'EU': 'http://api.zositeche.com',
+    'TEST': 'http://test.zositechc.cn'
+}
+
 ALEXA_EVENT_API = {
     # 美洲
     'US': 'https://api.amazonalexa.com/v3/events',

+ 2 - 2
azoauth/urls.py

@@ -16,7 +16,7 @@ Including another URLconf
 from django.conf.urls import url
 from django.contrib import admin
 from django.urls import path, re_path
-from controller import index, beian, AppToApp, DeviceController
+from controller import index, beian, AppToApp, DeviceController, Snapshot
 from controller import deviceStatus
 
 urlpatterns = [
@@ -33,7 +33,7 @@ urlpatterns = [
 
     path('oa2/rtspStart', index.oa2RtspStartView.as_view()),            # 通知摄像头设备推流
     path('oa2/powerController', index.powerController.as_view()),       # 控制智能插座开关
-    path('oa2/getSnapshot', index.GetSnapshotView.as_view()),           # 摄像头快照
+    re_path('snapshot/(?P<operation>.*)', Snapshot.SnapshotView.as_view()),       # 摄像头快照
 
     re_path('device/(?P<operation>.*)', DeviceController.DeviceView.as_view()),
 

+ 102 - 0
controller/Snapshot.py

@@ -0,0 +1,102 @@
+# @Author    : Rocky
+# @File      : Snapshot.py
+# @Time      : 2025/7/29 8:51
+import threading
+
+import requests
+from django.http import JsonResponse
+from django.views import View
+
+from azoauth.config import LOGGER, SERVER_API
+from model.models import UserModel
+from object.ResObject import ResObject
+from service.CommonService import CommonService
+
+
+class SnapshotView(View):
+    def get(self, request, *args, **kwargs):
+        request.encoding = 'utf-8'
+        operation = kwargs.get('operation')
+        return self.validation(request.GET, operation)
+
+    def post(self, request, *args, **kwargs):
+        request.encoding = 'utf-8'
+        operation = kwargs.get('operation')
+        return self.validation(request.POST, operation)
+
+    def validation(self, request_dict, operation):
+        response = ResObject()
+        if operation == 'sendMqtt':             # 下发快照指令
+            return self.send_mqtt(request_dict)
+        elif operation == 'asynEventResponse':  # 异步事件响应
+            return self.asyn_event_response(request_dict, response)
+        else:
+            return response.json(10, 'error url')
+
+    @classmethod
+    def send_mqtt(cls, request_dict):
+        uid = request_dict.get("uid", None)
+        access_token = request_dict.get("access_token", None)
+        correlation_token = request_dict.get("correlation_token", None)
+
+        if not all([uid, access_token, correlation_token]):
+            return JsonResponse({'result_code': '444', '错误': '参数错误'})
+
+        try:
+            user_qs = UserModel.objects.filter(access_token=access_token)
+            if not user_qs.exists():
+                return JsonResponse({'result_code': '500', '错误': '用户数据不存在'})
+
+            # 更新correlation_token
+            user_qs.update(correlation_token=correlation_token)
+
+            region = user_qs.values('region_code')[0]['region_code']
+            send_res = cls._send_mqtt_snapshot_command(uid, region)
+            if send_res:
+                return JsonResponse({'result_code': '0'})
+            else:
+                return JsonResponse({
+                    'result_code': '500',
+                    'msg': 'send mqtt failed'}
+                )
+
+        except Exception as e:
+            return JsonResponse({'result_code': '500', 'error_msg': 'error_line:{}, error_msg:{}'.
+                                format(e.__traceback__.tb_lineno, repr(e))})
+
+    @staticmethod
+    def _send_mqtt_snapshot_command(uid, region):
+        thing_name = CommonService.query_serial_with_uid(uid)
+        topic_name = 'ansjer/generic/{}'.format(thing_name)
+
+        msg = {
+            "commandType": "alexaSnapshot",
+        }
+
+        try:
+            result = CommonService.req_publish_mqtt_msg(thing_name, topic_name, msg)
+            LOGGER.info('快照指令下发结果 {}: {}'.format(uid, result))
+
+            if result:
+                return True
+
+            domain_name = SERVER_API[region]
+            url = '{}/iot/requestPublishMessage'.format(domain_name)
+            request_data = {'UID': uid, 'commandType': 'alexaSnapshot'}
+
+            response = requests.post(url, data=request_data, timeout=10)
+            if response.status_code == 200:
+                result = response.json()
+                if result.get('result_code') == 0:
+                    LOGGER.info('快照远程MQTT接口成功')
+                    return True
+                else:
+                    LOGGER.info('快照远程MQTT接口失败, res:{}'.format(result))
+                    return False
+            else:
+                LOGGER.info('快照远程MQTT接口失败, 状态码: {}', response.status_code)
+                return False
+
+        except Exception as e:
+            LOGGER.info('快照MQTT函数异常: error_line:{}, error_msg:{}'.format(e.__traceback__.tb_lineno, repr(e)))
+            return False

+ 0 - 83
controller/index.py

@@ -990,86 +990,3 @@ logger = logging.getLogger('django')
 
 def get_uuid():
     return str(uuid.uuid4())
-
-
-class GetSnapshotView(View):
-    def post(self, request, *args, **kwargs):
-        request.encoding = 'utf-8'
-        request_dict = request.POST
-        return self.validate(request_dict)
-
-    def get(self, request, *args, **kwargs):
-        request.encoding = 'utf-8'
-        request_dict = request.GET
-        return self.validate(request_dict)
-
-    def validate(self, request_dict):
-        uid = request_dict.get("uid", None)
-        access_token = request_dict.get("access_token", None)
-        correlation_token = request_dict.get("correlation_token", None)
-
-        if not all([uid, access_token, correlation_token]):
-            return JsonResponse({'result_code': '444', '错误': '参数错误'})
-
-        try:
-            user_qs = UserModel.objects.filter(access_token=access_token)
-            if not user_qs.exists():
-                return JsonResponse({'result_code': '500', '错误': '用户数据不存在'})
-
-            # 更新correlation_token
-            user_qs.update(correlation_token=correlation_token)
-
-            region = user_qs.values('region_code')[0]['region_code']
-            threading.Thread(
-                target=self._send_mqtt_snapshot_command,
-                args=(uid, region),
-                daemon=True
-            ).start()
-            return JsonResponse({'result_code': '0'})
-
-        except Exception as e:
-            return JsonResponse({'result_code': '500', 'error_msg': 'error_line:{}, error_msg:{}'.
-                                format(e.__traceback__.tb_lineno, repr(e))})
-
-    @staticmethod
-    def _send_mqtt_snapshot_command(uid, region):
-        thing_name = CommonService.query_serial_with_uid(uid)
-        topic_name = 'ansjer/generic/{}'.format(thing_name)
-
-        msg = {
-            "commandType": "alexaSnapshot",
-        }
-
-        try:
-            result = CommonService.req_publish_mqtt_msg(thing_name, topic_name, msg, qos=1)
-            logger.info('快照指令下发结果 {}: {}'.format(uid, result))
-
-            if result:
-                return True
-
-            if region == 'EU':
-                domain_name = SERVER_PREFIX_EU
-            elif region == 'CN':
-                domain_name = SERVER_PREFIX_TEST
-            else:
-                domain_name = SERVER_PREFIX
-
-            url = '{}/iot/requestPublishMessage'.format(domain_name)
-            request_data = {'UID': uid, 'commandType': 'alexaSnapshot'}
-
-            response = requests.post(url, data=request_data, timeout=10)
-            if response.status_code == 200:
-                result = response.json()
-                if result.get('result_code') == 0:
-                    logger.info('快照远程MQTT接口成功')
-                    return True
-                else:
-                    logger.info('快照远程MQTT接口失败, res:{}'.format(result))
-                    return False
-            else:
-                logger.info('快照远程MQTT接口失败, 状态码: {}', response.status_code)
-                return False
-
-        except Exception as e:
-            logger.info('快照MQTT函数异常: error_line:{}, error_msg:{}'.format(e.__traceback__.tb_lineno, repr(e)))
-            return False

+ 215 - 0
logs/info.log

@@ -5650,3 +5650,218 @@ WARNING 2020-12-28 08:50:57,119 log 228 Not Found: /cloudstorage/queryvodlist
 WARNING 2020-12-28 08:50:57,120 basehttp 124 "POST /cloudstorage/queryvodlist HTTP/1.1" 404 3398
 WARNING 2020-12-28 08:51:25,030 log 228 Not Found: /cloudstorage/queryvodlist
 WARNING 2020-12-28 08:51:25,031 basehttp 124 "POST /cloudstorage/queryvodlist HTTP/1.1" 404 3398
+INFO 2023-08-25 10:38:04,172 autoreload 637 Watching for file changes with StatReloader
+INFO 2023-12-28 13:37:28,658 autoreload 637 Watching for file changes with StatReloader
+INFO 2023-12-28 14:02:22,140 autoreload 637 Watching for file changes with StatReloader
+INFO 2023-12-28 14:16:25,080 autoreload 637 Watching for file changes with StatReloader
+INFO 2024-04-30 14:36:27,672 autoreload 637 Watching for file changes with StatReloader
+INFO 2024-04-30 15:11:59,732 autoreload 637 Watching for file changes with StatReloader
+INFO 2024-04-30 15:39:55,329 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\model\models.py changed, reloading.
+INFO 2024-04-30 15:39:57,002 autoreload 637 Watching for file changes with StatReloader
+INFO 2024-04-30 15:40:04,461 autoreload 637 Watching for file changes with StatReloader
+INFO 2024-04-30 15:43:28,142 autoreload 637 Watching for file changes with StatReloader
+INFO 2024-04-30 15:44:29,993 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\azoauth\settings.py changed, reloading.
+INFO 2024-04-30 15:44:49,970 autoreload 637 Watching for file changes with StatReloader
+INFO 2024-04-30 15:46:50,172 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\azoauth\settings.py changed, reloading.
+INFO 2024-04-30 15:46:51,517 autoreload 637 Watching for file changes with StatReloader
+INFO 2024-04-30 15:46:54,365 autoreload 637 Watching for file changes with StatReloader
+INFO 2024-04-30 15:47:57,828 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\azoauth\settings.py changed, reloading.
+INFO 2024-04-30 15:47:58,925 autoreload 637 Watching for file changes with StatReloader
+INFO 2024-04-30 15:48:03,410 autoreload 637 Watching for file changes with StatReloader
+INFO 2024-04-30 15:53:21,260 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\azoauth\settings.py changed, reloading.
+INFO 2024-04-30 15:53:22,484 autoreload 637 Watching for file changes with StatReloader
+INFO 2024-04-30 15:53:24,737 autoreload 637 Watching for file changes with StatReloader
+INFO 2024-04-30 15:54:26,429 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\azoauth\settings.py changed, reloading.
+INFO 2024-04-30 15:54:29,020 autoreload 637 Watching for file changes with StatReloader
+INFO 2024-05-14 15:49:13,958 autoreload 637 Watching for file changes with StatReloader
+INFO 2024-05-14 15:50:06,840 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\azoauth\settings.py changed, reloading.
+INFO 2024-05-14 15:50:09,322 autoreload 637 Watching for file changes with StatReloader
+INFO 2024-05-16 16:45:10,021 autoreload 637 Watching for file changes with StatReloader
+INFO 2024-05-20 17:50:05,795 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-05-07 17:04:55,457 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-05-08 11:48:18,367 autoreload 637 Watching for file changes with StatReloader
+ERROR 2025-05-08 11:52:38,995 log 230 Internal Server Error: /vseesTest/rtc
+Traceback (most recent call last):
+  File "G:\Software\anaconda3\envs\ASJAzoauth37\lib\site-packages\django\core\handlers\exception.py", line 47, in inner
+    response = get_response(request)
+  File "G:\Software\anaconda3\envs\ASJAzoauth37\lib\site-packages\django\core\handlers\base.py", line 188, in _get_response
+    self.check_response(response, callback)
+  File "G:\Software\anaconda3\envs\ASJAzoauth37\lib\site-packages\django\core\handlers\base.py", line 311, in check_response
+    "instead." % name
+ValueError: The view controller.index.VesseTest didn't return an HttpResponse object. It returned None instead.
+ERROR 2025-05-08 11:52:38,999 basehttp 161 "POST /vseesTest/rtc HTTP/1.1" 500 31515
+INFO 2025-05-08 11:53:15,931 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\azoauth\config.py changed, reloading.
+INFO 2025-05-08 11:53:17,125 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-05-08 11:53:41,458 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\controller\index.py changed, reloading.
+INFO 2025-05-08 11:53:42,772 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-05-08 11:54:05,899 basehttp 161 "POST /vseesTest/rtc HTTP/1.1" 200 70
+INFO 2025-05-08 11:54:43,117 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\controller\index.py changed, reloading.
+INFO 2025-05-08 11:54:44,329 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-05-08 11:54:52,600 basehttp 161 "POST /vseesTest/rtc HTTP/1.1" 200 70
+INFO 2025-05-08 11:55:10,743 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\azoauth\config.py changed, reloading.
+INFO 2025-05-08 11:55:11,818 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-05-08 11:55:21,597 basehttp 161 "POST /vseesTest/rtc HTTP/1.1" 200 70
+INFO 2025-05-08 13:29:21,902 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\controller\index.py changed, reloading.
+INFO 2025-05-08 13:29:23,107 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-05-08 13:29:47,357 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\controller\index.py changed, reloading.
+INFO 2025-05-08 13:29:48,449 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-05-08 13:33:04,013 basehttp 161 "POST /vseesTest/rtc HTTP/1.1" 200 70
+INFO 2025-05-08 13:45:33,978 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\controller\index.py changed, reloading.
+INFO 2025-05-08 13:45:35,242 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-05-08 13:45:41,163 basehttp 161 "POST /vseesTest/rtc HTTP/1.1" 200 70
+INFO 2025-05-08 13:46:57,867 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\controller\index.py changed, reloading.
+INFO 2025-05-08 13:46:58,995 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-05-08 13:47:54,174 basehttp 161 "POST /vseesTest/rtc HTTP/1.1" 200 70
+INFO 2025-05-08 14:17:10,713 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\controller\index.py changed, reloading.
+INFO 2025-05-08 14:17:12,124 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-05-08 14:17:16,243 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\controller\index.py changed, reloading.
+INFO 2025-05-08 14:17:17,453 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-05-08 14:19:37,654 basehttp 161 "POST /vseesTest/rtc HTTP/1.1" 200 70
+INFO 2025-05-08 14:19:47,824 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\controller\index.py changed, reloading.
+INFO 2025-05-08 14:19:49,119 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-05-08 14:20:02,634 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\controller\index.py changed, reloading.
+INFO 2025-05-08 14:20:03,877 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-05-08 14:20:33,257 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\controller\index.py changed, reloading.
+INFO 2025-05-08 14:20:34,605 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-05-08 14:21:03,058 basehttp 161 "POST /vseesTest/rtc HTTP/1.1" 200 70
+INFO 2025-05-08 14:21:27,642 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\controller\index.py changed, reloading.
+INFO 2025-05-08 14:21:28,856 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-05-15 16:04:43,109 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-05-16 09:33:08,469 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-05-16 09:35:22,401 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-05-16 09:58:31,553 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-05-16 10:04:58,189 autoreload 251 G:\Software\anaconda3\envs\ASJAzoauth37\Lib\site-packages\cryptography\exceptions.py changed, reloading.
+INFO 2025-05-16 10:04:59,295 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-05-16 10:05:52,293 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-05-16 10:08:17,879 autoreload 251 G:\Software\anaconda3\envs\ASJAzoauth37\Lib\site-packages\cryptography\hazmat\primitives\asymmetric\ec.py changed, reloading.
+INFO 2025-05-16 10:08:19,021 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-05-16 10:10:52,148 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\controller\index.py changed, reloading.
+INFO 2025-05-16 10:10:54,025 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-05-16 10:23:12,091 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-05-16 10:44:45,572 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-05-16 10:45:04,899 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\azoauth\settings.py changed, reloading.
+INFO 2025-05-16 10:45:06,531 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-05-16 10:45:18,695 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-05-16 11:26:18,262 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-05-16 14:44:49,123 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\azoauth\urls.py changed, reloading.
+INFO 2025-05-16 14:44:50,885 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-05-16 14:45:17,667 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\azoauth\urls.py changed, reloading.
+INFO 2025-05-16 14:45:18,855 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-05-16 14:47:44,359 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\azoauth\urls.py changed, reloading.
+INFO 2025-05-16 14:47:45,694 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-05-16 14:50:24,044 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\azoauth\urls.py changed, reloading.
+INFO 2025-05-16 14:50:25,167 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-05-16 14:51:23,549 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\azoauth\urls.py changed, reloading.
+INFO 2025-05-16 14:51:24,661 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-05-16 14:54:54,128 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\azoauth\urls.py changed, reloading.
+INFO 2025-05-16 14:54:55,419 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-05-16 15:21:45,017 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-05-16 15:22:23,596 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\controller\DeviceController.py changed, reloading.
+INFO 2025-05-16 15:22:25,445 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-05-16 15:24:40,004 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\controller\DeviceController.py changed, reloading.
+INFO 2025-05-16 15:24:41,742 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-05-16 15:24:52,636 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\controller\DeviceController.py changed, reloading.
+INFO 2025-05-16 15:24:54,568 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-05-16 15:25:02,887 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\controller\DeviceController.py changed, reloading.
+INFO 2025-05-16 15:25:04,957 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-05-16 15:25:15,095 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\controller\DeviceController.py changed, reloading.
+INFO 2025-05-16 15:25:17,688 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-05-16 15:26:22,201 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\controller\DeviceController.py changed, reloading.
+INFO 2025-05-16 15:26:24,762 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-05-16 15:27:03,697 DeviceController 61 --------00A966创建/更新IoT设备信息--------
+INFO 2025-05-16 15:27:03,875 basehttp 161 "POST /device/creatOrUpdateIotInfo HTTP/1.1" 200 70
+INFO 2025-05-16 15:28:36,079 DeviceController 61 --------00A966创建/更新IoT设备信息--------
+INFO 2025-05-16 15:28:36,261 basehttp 161 "POST /device/creatOrUpdateIotInfo HTTP/1.1" 200 70
+INFO 2025-05-16 15:28:58,311 DeviceController 61 --------00A966创建/更新IoT设备信息--------
+INFO 2025-05-16 15:28:58,500 basehttp 161 "POST /device/creatOrUpdateIotInfo HTTP/1.1" 200 70
+INFO 2025-05-16 15:33:45,509 DeviceController 61 --------00A966创建/更新IoT设备信息--------
+INFO 2025-05-16 15:34:00,540 basehttp 161 "POST /device/creatOrUpdateIotInfo HTTP/1.1" 200 70
+INFO 2025-07-14 08:53:45,897 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-07-14 08:59:20,920 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-07-14 08:59:46,485 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\azoauth\urls.py changed, reloading.
+INFO 2025-07-14 08:59:48,151 autoreload 637 Watching for file changes with StatReloader
+ERROR 2025-07-14 09:00:00,425 log 230 Internal Server Error: /appToApp/oa2/getAuthCodeAndToken
+Traceback (most recent call last):
+  File "G:\Software\anaconda3\envs\ASJAzoauth37\lib\site-packages\django\core\handlers\exception.py", line 47, in inner
+    response = get_response(request)
+  File "G:\Software\anaconda3\envs\ASJAzoauth37\lib\site-packages\django\core\handlers\base.py", line 188, in _get_response
+    self.check_response(response, callback)
+  File "G:\Software\anaconda3\envs\ASJAzoauth37\lib\site-packages\django\core\handlers\base.py", line 311, in check_response
+    "instead." % name
+ValueError: The view controller.index.RtcController didn't return an HttpResponse object. It returned None instead.
+ERROR 2025-07-14 09:00:00,426 basehttp 161 "POST /appToApp/oa2/getAuthCodeAndToken HTTP/1.1" 500 31985
+INFO 2025-07-14 09:01:56,937 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\azoauth\urls.py changed, reloading.
+INFO 2025-07-14 09:01:58,093 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-07-14 09:03:05,046 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\azoauth\urls.py changed, reloading.
+INFO 2025-07-14 09:03:06,480 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-07-14 09:19:56,202 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-07-14 11:45:04,297 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-07-14 11:45:19,778 basehttp 161 "POST /appToApp/oa2/getAuthCodeAndToken HTTP/1.1" 200 199
+INFO 2025-07-14 11:47:10,484 AppToApp 73 根据用户验证码获取访问令牌参数<QueryDict: {'code': ['fATu2Rg1QqsCT6KcEdaA35S0nu9sA8qb']}>
+INFO 2025-07-14 11:47:11,950 basehttp 161 "POST /appToApp/oa2/getTokenWithAuthCode HTTP/1.1" 200 49
+INFO 2025-07-14 11:47:57,468 AppToApp 73 根据用户验证码获取访问令牌参数<QueryDict: {'code': ['71d47efb77fd58ca822650a2cf03cd85']}>
+INFO 2025-07-14 11:47:59,305 basehttp 161 "POST /appToApp/oa2/getTokenWithAuthCode HTTP/1.1" 200 149
+INFO 2025-07-16 10:44:59,292 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-07-16 14:34:48,596 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-07-16 14:35:29,816 deviceStatus 756 --------发送ChangeReport事件--------
+INFO 2025-07-16 14:35:29,816 deviceStatus 762 uid: 517J385BNUGP3CPP111A
+INFO 2025-07-16 14:35:43,263 deviceStatus 868 Alexa响应: 202, 
+INFO 2025-07-16 14:35:45,383 basehttp 161 "POST /deviceStatus/objectDetectionSensorChangeReport HTTP/1.1" 200 60
+INFO 2025-07-16 14:37:00,908 deviceStatus 756 --------发送ChangeReport事件--------
+INFO 2025-07-16 14:37:00,909 deviceStatus 762 uid: 517J385BNUGP3CPP111A
+INFO 2025-07-16 14:41:16,425 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-07-16 14:43:08,867 deviceStatus 756 --------发送ChangeReport事件--------
+INFO 2025-07-16 14:43:08,868 deviceStatus 762 uid: 517J385BNUGP3CPP111A
+INFO 2025-07-16 14:43:11,489 deviceStatus 867 Alexa响应: 202, 
+INFO 2025-07-16 14:43:11,494 basehttp 161 "POST /deviceStatus/objectDetectionSensorChangeReport HTTP/1.1" 200 60
+INFO 2025-07-16 15:09:09,314 deviceStatus 756 --------发送ChangeReport事件--------
+INFO 2025-07-16 15:09:09,315 deviceStatus 762 uid: 4YHAGKCMR9UJWV65111A
+INFO 2025-07-16 15:09:11,814 deviceStatus 867 Alexa响应: 202, 
+INFO 2025-07-16 15:09:11,817 basehttp 161 "POST /deviceStatus/objectDetectionSensorChangeReport HTTP/1.1" 200 60
+INFO 2025-07-16 15:09:26,815 deviceStatus 756 --------发送ChangeReport事件--------
+INFO 2025-07-16 15:09:26,815 deviceStatus 762 uid: 814BW7BPB1ASLE84111A
+INFO 2025-07-16 15:09:29,595 deviceStatus 867 Alexa响应: 202, 
+INFO 2025-07-16 15:09:29,597 basehttp 161 "POST /deviceStatus/objectDetectionSensorChangeReport HTTP/1.1" 200 60
+INFO 2025-07-23 17:37:12,478 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-07-23 17:39:02,262 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-07-23 17:49:29,456 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-07-23 17:49:41,283 basehttp 161 "POST /oa2/getSnapshot HTTP/1.1" 200 274
+INFO 2025-07-23 17:49:43,046 index 1092 快照MQTT函数异常: error_line:1061, error_msg:AssertionError()
+INFO 2025-07-23 17:50:14,640 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\controller\index.py changed, reloading.
+INFO 2025-07-23 17:50:16,461 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-07-23 17:51:39,039 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\azoauth\urls.py changed, reloading.
+INFO 2025-07-23 17:51:40,447 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-07-23 17:56:11,952 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\controller\index.py changed, reloading.
+INFO 2025-07-23 17:56:13,828 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-07-23 17:56:47,834 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\controller\index.py changed, reloading.
+INFO 2025-07-23 17:56:49,505 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-07-23 18:00:59,942 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\controller\index.py changed, reloading.
+INFO 2025-07-23 18:01:02,034 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-07-23 18:04:39,029 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\controller\index.py changed, reloading.
+INFO 2025-07-23 18:04:40,864 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-07-23 18:05:29,132 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\controller\index.py changed, reloading.
+INFO 2025-07-23 18:05:31,248 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-07-23 18:58:22,015 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\controller\index.py changed, reloading.
+INFO 2025-07-23 18:58:23,865 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-07-23 19:10:22,790 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-07-23 19:10:34,184 basehttp 161 "POST /oa2/getSnapshot HTTP/1.1" 200 20
+INFO 2025-07-23 19:10:38,468 index 1043 快照指令下发结果 517J385BNUGP3CPP111A: True
+INFO 2025-07-24 15:39:16,731 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-07-24 15:44:32,088 basehttp 161 "POST /oa2/getSnapshot HTTP/1.1" 200 20
+INFO 2025-07-24 15:44:35,930 index 1045 快照指令下发结果 517J385BNUGP3CPP111A: True
+INFO 2025-07-29 09:29:48,634 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-07-29 09:30:32,677 basehttp 161 "POST /snapshot/sendMqtt HTTP/1.1" 200 84
+INFO 2025-07-29 09:36:19,900 Snapshot 76 快照指令下发结果 517J385BNUGP3CPP111A: False
+INFO 2025-07-29 09:36:20,441 Snapshot 92 快照远程MQTT接口失败, res:{'result_code': 444, 'reason': 'Wrong parameters!', 'result': {}, 'error_code': 444}
+INFO 2025-07-29 09:36:29,676 basehttp 161 "POST /snapshot/sendMqtt HTTP/1.1" 200 20
+INFO 2025-07-29 09:37:19,664 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\controller\Snapshot.py changed, reloading.
+INFO 2025-07-29 09:37:20,907 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-07-29 09:37:34,373 basehttp 161 "POST /snapshot/sendMqtt HTTP/1.1" 200 20
+INFO 2025-07-29 09:37:47,597 Snapshot 76 快照指令下发结果 517J385BNUGP3CPP111A: False
+INFO 2025-07-29 09:37:56,698 Snapshot 92 快照远程MQTT接口失败, res:{'result_code': 444, 'reason': 'Wrong parameters!', 'result': {}, 'error_code': 444}
+INFO 2025-07-29 09:41:54,200 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\controller\Snapshot.py changed, reloading.
+INFO 2025-07-29 09:41:55,492 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-07-29 09:42:00,942 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\controller\Snapshot.py changed, reloading.
+INFO 2025-07-29 09:42:02,121 autoreload 637 Watching for file changes with StatReloader
+INFO 2025-07-29 09:42:13,977 autoreload 251 F:\Ansjer\git\servers\ASJAzoauth\controller\Snapshot.py changed, reloading.
+INFO 2025-07-29 09:42:15,243 autoreload 637 Watching for file changes with StatReloader