Browse Source

新增推送类型电动车检测、物理遮挡

linhaohong 7 tháng trước cách đây
mục cha
commit
05360ad395
3 tập tin đã thay đổi với 16 bổ sung4 xóa
  1. 5 2
      AnsjerPush/Config/aiConfig.py
  2. 6 2
      AnsjerPush/config.py
  3. 5 0
      Service/DevicePushService.py

+ 5 - 2
AnsjerPush/Config/aiConfig.py

@@ -27,6 +27,7 @@ AI_IDENTIFICATION_TAGS_DICT = {
 # 1(移动侦测)、2(人形)、4(车型)、8(人脸)、16(宠物)、32(异响)、64(区域闯入)、128(区域离开)、
 # 256(徘徊检测)、512(无人检测)、1024(往来检测)、2048(哭声检测)、
 # 4096(手势检测)、8192(火焰报警)、16384(婴儿遮面检测)、32768(包裹检测)
+# 65536(电动车检测)、131072(物理遮挡)
 # 以下字典元素key与设备定义好的类型,对应value值是APP标签类型,如:设备上报1 则数据返回给APP是57
 DEVICE_EVENT_TYPE = {
     1: 51,
@@ -44,7 +45,9 @@ DEVICE_EVENT_TYPE = {
     4096: 68,
     8192: 69,
     16384: 70,
-    32768: 71
+    32768: 71,
+    65536: 72,
+    131072: 73
 }
 
-ALGORITHM_COMBO_TYPES = [51, 57, 58, 60, 59, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71]
+ALGORITHM_COMBO_TYPES = [51, 57, 58, 60, 59, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73]

+ 6 - 2
AnsjerPush/config.py

@@ -179,7 +179,9 @@ EVENT_DICT_CN = {
     68: '检测到手势 ',
     69: '检测到火焰 ',
     70: '看不到宝宝的脸了,快去看看!',
-    71: '有包裹出现'
+    71: '有包裹出现',
+    72: '检测到电动车',
+    73: '检测到遮挡物'
 }
 
 EVENT_DICT = {
@@ -206,7 +208,9 @@ EVENT_DICT = {
     68: 'Gesture detected ',
     69: 'Flame detected ',
     70: 'Cant see the baby\'s face now, go take a look!',
-    71: 'Package detected '
+    71: 'Package detected ',
+    72: 'Battery operated vehicle detected',
+    73: 'Obstruction detected'
 }
 
 # 小米推送通知类别id

+ 5 - 0
Service/DevicePushService.py

@@ -581,6 +581,11 @@ class DevicePushService:
                 msg_type = '有人徘徊'
             elif event_type == 65:
                 msg_type = '长时间无人出现'
+            elif event_type == 72:
+                msg_type = '检测到电动车'
+            elif event_type == 73:
+                msg_type = '检测到遮挡物'
+
             elif event_type == 1022:
                 msg_type = '有人按下门铃'
             elif event_type == 1023: