Przeglądaj źródła

新增包裹检测、新增消息类型文案

zhangdongming 1 rok temu
rodzic
commit
9cdb4be532

+ 4 - 3
AnsjerPush/Config/aiConfig.py

@@ -26,7 +26,7 @@ AI_IDENTIFICATION_TAGS_DICT = {
 # 从右往左数第一位是移动第二位是人形,1则识别了移动标签,0表示未识别到该标签类型,100001则表示识别到了移动和异响
 # 1(移动侦测)、2(人形)、4(车型)、8(人脸)、16(宠物)、32(异响)、64(区域闯入)、128(区域离开)、
 # 256(徘徊检测)、512(无人检测)、1024(往来检测)、2048(哭声检测)、
-# 4096(手势检测)、8192(火焰报警)、16384(婴儿遮面检测)
+# 4096(手势检测)、8192(火焰报警)、16384(婴儿遮面检测)、32768(包裹检测)
 # 以下字典元素key与设备定义好的类型,对应value值是APP标签类型,如:设备上报1 则数据返回给APP是57
 DEVICE_EVENT_TYPE = {
     1: 51,
@@ -43,7 +43,8 @@ DEVICE_EVENT_TYPE = {
     2048: 67,
     4096: 68,
     8192: 69,
-    16384: 70
+    16384: 70,
+    32768: 71
 }
 
-ALGORITHM_COMBO_TYPES = [51, 57, 58, 60, 59, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70]
+ALGORITHM_COMBO_TYPES = [51, 57, 58, 60, 59, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71]

+ 14 - 2
AnsjerPush/config.py

@@ -148,6 +148,11 @@ AI_IDENTIFICATION_TAGS_DICT = {
 
 EVENT_DICT_CN = {
     51: '检测到画面变化 ',
+    52: '传感器报警 ',
+    53: '影像遗失 ',
+    54: 'PIR ',
+    55: '门磁报警 ',
+    56: '外部发报 ',
     57: '有人出现 ',
     58: '有车出现 ',
     59: '有宠物出现 ',
@@ -164,11 +169,17 @@ EVENT_DICT_CN = {
     67: '检测到哭声 ',
     68: '检测到手势 ',
     69: '检测到火焰 ',
-    70: '看不到宝宝的脸了,快去看看!'
+    70: '看不到宝宝的脸了,快去看看!',
+    71: '有包裹出现'
 }
 
 EVENT_DICT = {
     51: 'Screen change detected ',
+    52: 'Sensor alarms ',
+    53: 'Lost images ',
+    54: 'PIR ',
+    55: 'Door magnetic alarm ',
+    56: 'External reporting ',
     57: 'Someone showed up ',
     58: 'A car appeared ',
     59: 'There are pets present ',
@@ -185,7 +196,8 @@ EVENT_DICT = {
     67: 'Cries detected ',
     68: 'Gesture detected ',
     69: 'Flame detected ',
-    70: 'Cant see the baby\'s face now, go take a look!'
+    70: 'Cant see the baby\'s face now, go take a look!',
+    71: 'Package detected '
 }
 
 # 小米推送通知类别id

+ 20 - 0
Service/DevicePushService.py

@@ -489,6 +489,16 @@ class DevicePushService:
         if lang == 'cn':
             if event_type == 51:
                 msg_type = '检测到画面变化'
+            elif event_type == 52:
+                msg_type = '传感器报警'
+            elif event_type == 53:
+                msg_type = '影像遗失'
+            elif event_type == 54:
+                msg_type = 'PIR'
+            elif event_type == 55:
+                msg_type = '门磁报警'
+            elif event_type == 56:
+                msg_type = '外部发报'
             elif event_type == 57:
                 msg_type = '有人出现'
             elif event_type == 58:
@@ -532,6 +542,16 @@ class DevicePushService:
         else:
             if event_type == 51:
                 msg_type = 'Screen change detected'
+            elif event_type == 52:
+                msg_type = 'Sensor alarms'
+            elif event_type == 53:
+                msg_type = 'Lost images'
+            elif event_type == 54:
+                msg_type = 'PIR'
+            elif event_type == 55:
+                msg_type = 'Door magnetic alarm'
+            elif event_type == 56:
+                msg_type = 'External reporting'
             elif event_type == 57:
                 msg_type = 'Person detected'
             elif event_type == 58: