gatewaySensorConfig.py 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. # -*- coding: utf-8 -*-
  2. """
  3. @Author : Rocky
  4. @Time : 2022/8/8 11:20
  5. @File :gatewaySensorConfig.py
  6. """
  7. # MQTT主题名
  8. SMART_SCENE_TOPIC = 'loocam/gateway_sensor/smart_scene/{}'
  9. GET_SCENE_TOPIC = 'loocam/gateway_sensor/get_scene/{}'
  10. # 传感器类型
  11. SENSOR_TYPE = {
  12. 'door_magnet': 215,
  13. 'smart_button': 216,
  14. 'water_flood_sensor': 217,
  15. 'smoke_sensor': 218,
  16. 'body_sensor': 219,
  17. 'tem_hum_sensor': 220,
  18. }
  19. # 事件类型
  20. EVENT_TYPE = {
  21. # 门磁
  22. 'door_magnet_opening': 2150,
  23. 'door_magnet_closure': 2151,
  24. 'door_magnet_removal': 2152,
  25. 'door_magnet_low_power': 2153,
  26. 'door_magnet_start_detection': 2154,
  27. 'door_magnet_closure_detection': 2155,
  28. # 智能按钮
  29. 'smart_button_press': 2160,
  30. 'smart_button_click': 2161,
  31. 'smart_button_double_click': 2162,
  32. 'smart_button_three_click': 2163,
  33. 'smart_button_low_power': 2164,
  34. # 水浸
  35. 'flood_trigger': 2170,
  36. 'flood_recovery': 2171,
  37. 'flood_low_power': 2172,
  38. # 烟雾
  39. 'smoke_trigger': 2180,
  40. 'smoke_recovery': 2181,
  41. 'smoke_removal': 2182,
  42. 'smoke_low_power': 2183,
  43. # 人体红外
  44. 'someone_moves': 2190,
  45. 'no_one_moves': 2191,
  46. 'body_sensor_removal': 2192,
  47. 'body_sensor_low_power': 2193,
  48. 'body_sensor_start_detection': 2194,
  49. 'body_sensor_closure_detection': 2195,
  50. # 温湿度
  51. 'temperature': 2200,
  52. 'humidity': 2201,
  53. 'tem_hum_sensor_low_power': 2202,
  54. }