更新配置文件
This commit is contained in:
parent
eb78ec6e48
commit
9916635e9a
|
|
@ -0,0 +1,38 @@
|
|||
[
|
||||
{
|
||||
"rule_id": "RTU_TEMP_HIGH_CRITICAL",
|
||||
"device_id": "rtu_temp_sensor_lab",
|
||||
"data_point_name": "temperature",
|
||||
"compare_type": "GT",
|
||||
"threshold": 30,
|
||||
"level": "CRITICAL",
|
||||
"debounce_seconds": 60,
|
||||
"alarm_mqtt_topic": "alarms/rtu_lab",
|
||||
"message_template": "RTU温度传感器'{device_id}' 检测到温度过高 ({value}°C),已达临界值 {threshold}°C!",
|
||||
"clear_message_template": "RTU温度传感器'{device_id}' 温度已恢复正常 ({value}°C)。"
|
||||
},
|
||||
{
|
||||
"rule_id": "TEST_TEMP_GT_10_WARNING",
|
||||
"device_id": "rtu_temp_sensor_lab",
|
||||
"data_point_name": "temperature",
|
||||
"compare_type": "GT",
|
||||
"threshold": 10,
|
||||
"level": "CRITICAL",
|
||||
"debounce_seconds": 0,
|
||||
"alarm_mqtt_topic": "alarms/rtu_temp_sensor_lab",
|
||||
"message_template": "测试告警 设备 '{device_id}' 温度 ({value}°C) 高于测试阈值 {threshold}°C!",
|
||||
"clear_message_template": "【测试告警解除】设备 '{device_id}' 温度 ({value}°C) 已恢复正常。"
|
||||
},
|
||||
{
|
||||
"rule_id": "SYSTEM_MEM_HIGH",
|
||||
"device_id": "proxy_system",
|
||||
"data_point_name": "mem_usage_percentage",
|
||||
"compare_type": "GT",
|
||||
"threshold": 80,
|
||||
"level": "WARNING",
|
||||
"debounce_seconds": 30,
|
||||
"alarm_mqtt_topic": "alarms/proxy",
|
||||
"message_template": "代理系统内存使用率 ({value}%) 超过 {threshold}%,请检查!",
|
||||
"clear_message_template": "代理系统内存使用率已恢复 ({value}%)。"
|
||||
}
|
||||
]
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"alarm_rules_path": "alarms.json",
|
||||
"config_base_path": "/app/config/",
|
||||
"data_cache_db_path": "edge_data_cache.db",
|
||||
"data_storage_db_path": "edge_proxy_data.db",
|
||||
"device_id": "rk3588-proxy-002",
|
||||
"log_level": "info",
|
||||
"mqtt_broker": "tcp://localhost:1883",
|
||||
"mqtt_client_id_prefix": "edge-proxy-",
|
||||
"piper_executable_path": "/usr/bin/piper",
|
||||
"piper_model_path": "/app/models/model.onnx",
|
||||
"tcp_server_ports": [
|
||||
12345
|
||||
],
|
||||
"video_config_path": "video_config.json",
|
||||
"web_server_port": 8080
|
||||
}
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
{
|
||||
"modbus_rtu_devices": [
|
||||
{
|
||||
"enabled": false,
|
||||
"device_id": "rtu_temp_sensor_lab",
|
||||
"port_path": "/dev/ttyS7",
|
||||
"baud_rate": 9600,
|
||||
"slave_id": 1,
|
||||
"poll_interval_ms": 5000,
|
||||
"data_points": [
|
||||
{
|
||||
"name": "temperature",
|
||||
"address": 0,
|
||||
"type": "INT16",
|
||||
"scale": 0.1
|
||||
},
|
||||
{
|
||||
"name": "humidity",
|
||||
"address": 1,
|
||||
"type": "UINT16",
|
||||
"scale": 0.1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"enabled": false,
|
||||
"device_id": "rotary encoder",
|
||||
"port_path": "/dev/ttyS7",
|
||||
"baud_rate": 9600,
|
||||
"slave_id": 111,
|
||||
"poll_interval_ms": 5000,
|
||||
"data_points": [
|
||||
{
|
||||
"name": "count",
|
||||
"address": 1,
|
||||
"type": "INT16",
|
||||
"scale": 1
|
||||
},
|
||||
{
|
||||
"name": "total_count",
|
||||
"address": 2,
|
||||
"type": "INT16",
|
||||
"scale": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"enabled": false,
|
||||
"device_id": "backup_counter",
|
||||
"port_path": "/dev/ttyS7",
|
||||
"baud_rate": 9600,
|
||||
"slave_id": 10,
|
||||
"poll_interval_ms": 1000,
|
||||
"data_points": [
|
||||
{
|
||||
"name": "count",
|
||||
"address": 32,
|
||||
"type": "UINT32"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"modbus_tcp_devices": [
|
||||
{
|
||||
"enabled": false,
|
||||
"device_id": "plc_workshop1",
|
||||
"ip_address": "192.168.1.120",
|
||||
"port": 502,
|
||||
"slave_id": 1,
|
||||
"poll_interval_ms": 1000,
|
||||
"data_points": [
|
||||
{
|
||||
"name": "motor_speed",
|
||||
"address": 100,
|
||||
"type": "UINT16",
|
||||
"scale": 1
|
||||
},
|
||||
{
|
||||
"name": "pressure",
|
||||
"address": 102,
|
||||
"type": "FLOAT32",
|
||||
"scale": 0.01
|
||||
},
|
||||
{
|
||||
"name": "valve_status",
|
||||
"address": 104,
|
||||
"type": "UINT16",
|
||||
"scale": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"modbus_rtu_bus_configs": {
|
||||
"/dev/ttyS7": {
|
||||
"inter_device_delay_ms": 150
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
"video_service": {
|
||||
"enabled": true
|
||||
},
|
||||
"video_streams": [
|
||||
{
|
||||
"enabled": true,
|
||||
"id": "cam_01_intrusion",
|
||||
"input_url": "rtsp://admin:hzx12345@192.168.1.10:554/Streaming/Channels/1301",
|
||||
"module_config": {
|
||||
"class_num": 80,
|
||||
"intrusion_zone": [
|
||||
100,
|
||||
100,
|
||||
1820,
|
||||
1820
|
||||
],
|
||||
"label_path": "/app/models/coco_80_labels_list.txt",
|
||||
"model_path": "/app/models/RK3588/yolov5s-640-640.rknn",
|
||||
"rknn_thread_num": 3,
|
||||
"time_threshold_sec": 3
|
||||
},
|
||||
"module_type": "intrusion_detection",
|
||||
"output_rtsp": "rtsp://127.0.0.1:8554/ch1301"
|
||||
},
|
||||
{
|
||||
"enabled": false,
|
||||
"id": "cam_01_intrusion",
|
||||
"input_url": "rtsp://admin:hzx12345@192.168.1.10:554/Streaming/Channels/1301",
|
||||
"module_config": {
|
||||
"class_num": 3,
|
||||
"intrusion_zone": [
|
||||
100,
|
||||
100,
|
||||
1820,
|
||||
1820
|
||||
],
|
||||
"label_path": "/app/models/human.txt",
|
||||
"model_path": "/app/models/human_detection.rknn",
|
||||
"rknn_thread_num": 3,
|
||||
"time_threshold_sec": 3
|
||||
},
|
||||
"module_type": "human_detection",
|
||||
"output_rtsp": "rtsp://127.0.0.1:8554/ch1301"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -22,11 +22,12 @@ services:
|
|||
- "110"
|
||||
- "29"
|
||||
volumes:
|
||||
- prod_config_data:/app/config
|
||||
|
||||
- ./config:/app/config
|
||||
- ./models:/app/models
|
||||
- /tmp/.X11-unix:/tmp/.X11-unix:rw
|
||||
environment:
|
||||
- DISPLAY=$DISPLAY
|
||||
- MQTT_HOST=127.0.0.1
|
||||
dns:
|
||||
- 8.8.8.8
|
||||
- 114.114.114.114
|
||||
|
|
@ -52,7 +53,9 @@ services:
|
|||
- ./mosquitto/config:/mosquitto/config
|
||||
- ./mosquitto/data:/mosquitto/data
|
||||
- ./mosquitto/log:/mosquitto/log
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "mosquitto_sub -t '$SYS/#' -C 1 | grep -v Error || exit 1"]
|
||||
interval: 10s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
||||
|
||||
volumes:
|
||||
prod_config_data:
|
||||
Loading…
Reference in New Issue