Files
sentinel-home-ai/fam-core/config/config.yaml

59 lines
2.7 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# FAM-Core 配置文件 (NAS 端) - 新架构 v22026-08-21
#
# NAS 仅作管理后台,不再处理视频。唯一后台线程 Oracle-Sync 每 30 分钟
# 从甲骨文 FAM-Edge 拉取增量镜像到本地 MariaDBsync_videos/events/people
# 所有视频分析在 Oracle 完成。
#
# Tailscale 当前无法从 NAS 反向访问 Oracle故 base_url 用 Oracle 公网 IP。
# token 与 Oracle 端 sync_api.token 一致,均取自环境变量 ORACLE_SYNC_TOKEN。
server:
host: "0.0.0.0"
port: 8000
database:
host: "127.0.0.1"
port: 3306
user: "root"
password: "iLoveJava5!"
database: "sentinel_home_ai"
unix_socket: "/run/mysqld/mysqld10.sock"
# 甲骨文同步(每 30 分钟拉增量镜像)
oracle_sync:
# FAM-Edge 对外同步接口地址(端口同其 server.port=5000
base_url: "http://129.146.203.203:5000"
# 与 Oracle 端 sync_api.token 一致(环境变量注入,避免明文入库)
token: "${ORACLE_SYNC_TOKEN}"
interval_sec: 1800 # 拉取间隔(秒),默认 30 分钟
timeout: 120 # 单次拉取超时(秒)
chat_handler:
# 智能问答统一走 FAM-Edge 编排端点Gemini → NVIDIA → 本地 Ollama 兜底)
qa_url: "http://129.146.203.203:5000/api/edge/chat/ask"
timeout: 120
# 运动监测通知服务2026-08-22 重构为 Webhook 驱动,不轮询)
# SS 配置 Webhook 把运动事件 POST 到 NAS /api/ss/webhook本服务映射字段后
# 推送甲骨文 FAM-Edge单向 NAS -> Oracle甲骨文不再反向访问 NAS
# SS Webhook 不提供 event_id / camera_id由本服务合成 event_id、把摄像头名映射成
# camera_id启动一次性从 SS 拉取 + 以下静态映射兜底),并把 EVENT_TIME 解析成 epoch。
# SS 凭据走环境变量(${DSM_ACCOUNT}/${DSM_PASSWORD}),由启动脚本 source 的 .env 提供。
motion_notifier:
enabled: true
poll_enabled: false # 关闭轮询,改用 SS Webhook 推送
dsm_host: "192.168.50.64" # Surveillance Station 所在地址NAS 本机,用于一次性拉摄像头映射)
dsm_port: 5000
dsm_account: "${DSM_ACCOUNT}"
dsm_password: "${DSM_PASSWORD}"
# 摄像头名 -> camera_id 静态映射(优先);启动时还会从 SS 拉一份补全
camera_name_to_id:
"Generic_ONVIF-001": 2
oracle_base_url: "http://129.146.203.203:5000" # 与 oracle_sync.base_url 一致
oracle_token: "${ORACLE_SYNC_TOKEN}" # 与 oracle_sync.token 一致
timeout_sec: 10 # 单次 SS 请求超时(摄像头映射拉取用)
# 以下为可选轮询参数poll_enabled=true 时才生效,当前默认关闭)
poll_interval_sec: 60
poll_window_hours: 2
batch_size: 100