gatewaySensorConfig.py 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. SMART_SOCKET_TOPIC = 'loocam/smart-socket/{}'
  11. ANSJER_GENERIC_TOPIC = 'ansjer/generic/{}'
  12. # 设备类型
  13. DEVICE_TYPE = {
  14. 'gateway': 200,
  15. 'socket': 201,
  16. 'switch': 202,
  17. 'C516': 24
  18. }
  19. # 传感器类型
  20. SENSOR_TYPE = {
  21. 'door_magnet': 215,
  22. 'smart_button': 216,
  23. 'water_flood_sensor': 217,
  24. 'smoke_sensor': 218,
  25. 'body_sensor': 219,
  26. 'tem_hum_sensor': 220,
  27. }
  28. # 事件类型
  29. EVENT_TYPE = {
  30. # 门磁
  31. 'door_magnet_opening': 2150,
  32. 'door_magnet_closure': 2151,
  33. 'door_magnet_removal': 2156,
  34. 'door_magnet_low_power': 2153,
  35. 'door_magnet_start_detection': 2154,
  36. 'door_magnet_closure_detection': 2155,
  37. # 智能按钮
  38. 'smart_button_press': 2160,
  39. 'smart_button_click': 2161,
  40. 'smart_button_double_click': 2162,
  41. 'smart_button_three_click': 2163,
  42. 'smart_button_low_power': 2164,
  43. # 水浸
  44. 'flood_trigger': 2170,
  45. 'flood_recovery': 2171,
  46. 'flood_low_power': 2172,
  47. # 烟雾
  48. 'smoke_trigger': 2180,
  49. 'smoke_recovery': 2181,
  50. 'smoke_removal': 2182,
  51. 'smoke_low_power': 2183,
  52. # 人体红外
  53. 'someone_moves': 2190,
  54. 'no_one_moves': 2191,
  55. 'body_sensor_removal': 2192,
  56. 'body_sensor_low_power': 2193,
  57. 'body_sensor_start_detection': 2194,
  58. 'body_sensor_closure_detection': 2195,
  59. # 温湿度
  60. 'temperature': 2200,
  61. 'humidity': 2201,
  62. 'tem_hum_sensor_low_power': 2202,
  63. # 插座电源
  64. 'socket_power_on': 2010,
  65. 'socket_power_off': 2011,
  66. # 摄像头
  67. 'detection_reminder_on': 1002,
  68. 'detection_reminder_off': 1003,
  69. 'snapshot': 1004,
  70. 'record_video': 1005,
  71. 'human_tracking_on': 1006,
  72. 'human_tracking_off': 1007,
  73. }