2026-08-03 16:56:10 +08:00
|
|
|
|
# ====== 插件注册信息(控制加载方式) ======
|
|
|
|
|
|
[workers]
|
|
|
|
|
|
type = "aibox_sophon_adapter"
|
|
|
|
|
|
module = "plugins.aibox_sophon_adapter"
|
|
|
|
|
|
factory = "create_workers"
|
|
|
|
|
|
cleanup = "cleanup"
|
|
|
|
|
|
count = 1
|
|
|
|
|
|
|
2026-07-27 14:26:48 +08:00
|
|
|
|
[worker]
|
|
|
|
|
|
name = "aibox_sophon_adapter"
|
|
|
|
|
|
version = "0.1.0"
|
|
|
|
|
|
description = "AI Box Sophon 设备适配器 — MQTT 心跳上报与设备状态监控"
|
|
|
|
|
|
config_version = "1.0"
|
|
|
|
|
|
defaults = { method = "GET", timeout = 30, auth_required = false, cacheable = false, internal = false }
|
|
|
|
|
|
|
|
|
|
|
|
[worker.registration]
|
2026-08-03 09:18:27 +08:00
|
|
|
|
router_prefix = "/aibox_sophon_adapter"
|
|
|
|
|
|
tags = ["aibox_sophon_adapter", "sophon", "adapter"]
|
2026-07-27 14:26:48 +08:00
|
|
|
|
|
2026-08-03 16:56:10 +08:00
|
|
|
|
# ====== Worker 运行时配置(由 lifespan_setup 传递给 create_workers) ======
|
|
|
|
|
|
[workers.config]
|
|
|
|
|
|
data_dir = "./data"
|
|
|
|
|
|
mediamtx_addr = "rtsp://127.0.0.1:8554" # MediaMTX 地址
|
|
|
|
|
|
link_path = "/data/bm-app" # 软链接路径
|
|
|
|
|
|
|
|
|
|
|
|
[workers.config.heartbeat]
|
2026-07-27 14:26:48 +08:00
|
|
|
|
interval = 5 # 设备上报间隔(秒)
|
|
|
|
|
|
timeout = 15 # 超时阈值(秒),超过此时间未收到心跳视为离线
|
|
|
|
|
|
check_interval = 10 # 服务端检查离线设备的间隔(秒)
|
2026-08-03 15:05:35 +08:00
|
|
|
|
|
2026-08-03 16:56:10 +08:00
|
|
|
|
[workers.config.mqtt_forward]
|
2026-08-03 15:05:35 +08:00
|
|
|
|
enabled = true
|
|
|
|
|
|
uri = "mqtt://admin:Mixc%402021@dg.datagoo.cn:48081" # %40 是 @ 的 URL 编码
|
|
|
|
|
|
topic = "/board_ping" # 转发目标主题
|
|
|
|
|
|
|
2026-08-03 16:56:10 +08:00
|
|
|
|
[workers.config.alarm_retention]
|
2026-08-03 15:05:35 +08:00
|
|
|
|
max_records = 100 # 最多保留的告警记录数,设为 0 表示不限制
|