Based on advanced computer vision and behavior recognition algorithms, this feature conducts intelligent monitoring of
specific areas within the home environment. The system supports user-defined electronic fences and triggers an early
warning mechanism immediately upon detecting a pet entering restricted zones such as kitchens or bedrooms. Furthermore,
the algorithm has been specifically trained to identify particular违规 behaviors like climbing onto dining tables or
rummaging through trash cans, capable of precisely recognizing these actions while filtering out environmental
interference such as human movement. Once an abnormal behavior is confirmed, the system pushes real-time alarm
notifications and on-site snapshots to the user's terminal, helping pet owners promptly curb bad habits and effectively
maintain the cleanliness and safety of the home environment.
本功能基于先进的计算机视觉与行为识别算法,能够对家庭环境中的特定区域进行智能化监控。系统支持用户自定义设置电子围栏,当检测到宠物闯入厨房、卧室等禁止区域时,即刻触发预警机制。同时,算法针对宠物攀爬餐桌、翻找垃圾桶等特定违规行为进行了专项训练,能够精准识别并过滤人员走动等环境干扰。一旦确认异常行为,系统将实时向用户终端推送报警信息及现场快照,帮助宠物主人及时制止不良习惯,有效维护家庭环境的整洁与安全
本技能明确约定:
memory/YYYY-MM-DD.md、MEMORY.md 等本地文件:查看历史预警报告、宠物禁区预警报告清单、预警报告列表、查询历史报告、显示所有预警报告、宠物禁区预警历史记录,查询宠物禁区预警分析报告
显示所有宠物禁区报告"、"查看历史报告"等),必须:
python -m scripts.pet_restricted_area_warning_analysis --list --open-id 参数调用 API查询云端的历史报告数据
```
requests>=2.28.0
```
在执行宠物禁区预警前,必须按以下优先级顺序获取 open-id:
第 1 步:【最高优先级】检查技能所在目录的配置文件(优先)
路径:skills/smyx_common/scripts/config.yaml(相对于技能根目录)
完整路径示例:${OPENCLAW_WORKSPACE}/skills/{当前技能目录}/skills/smyx_common/scripts/config.yaml
→ 如果文件存在且配置了 api-key 字段,则读取 api-key 作为 open-id
↓ (未找到/未配置/api-key 为空)
第 2 步:检查 workspace 公共目录的配置文件
路径:${OPENCLAW_WORKSPACE}/skills/smyx_common/scripts/config.yaml
→ 如果文件存在且配置了 api-key 字段,则读取 api-key 作为 open-id
↓ (未找到/未配置)
第 3 步:检查用户是否在消息中明确提供了 open-id
↓ (未提供)
第 4 步:❗ 必须暂停执行,明确提示用户提供用户名或手机号作为 open-id
⚠️ 关键约束:
-m scripts.pet_restricted_area_warning_analysis 处理视频文件(必须在技能根目录下运行脚本)--input: 本地视频文件路径--url: 网络视频 URL 地址(API 服务自动下载)--alert-threshold: 异常行为预警阈值,高于该分值发出警报,默认 0.6--open-id: 当前用户的 open-id(必填,按上述流程获取)--list: 显示宠物禁区预警历史报告列表清单(可以输入起始日期参数过滤数据范围)--api-key: API 访问密钥(可选)--api-url: API 服务地址(可选,使用默认值)--detail: 输出详细程度(basic/standard/json,默认 json)--output: 结果输出文件路径(可选)API 进行宠物禁区预警,本地文件上传,网络 URL 由 API 服务自动下载)
报告名称"、"监测时间"、"异常次数"、"点击查看"四列,其中"报告名称"列使用宠物禁区预警报告-{记录id}形式拼接, "点击查看"列使用
格式的超链接,用户点击即可直接跳转到对应的完整报告页面。
| 报告名称 | 监测时间 | 异常次数 | 点击查看 |
|----------|----------|----------|----------|
| 宠物禁区预警报告-20260312172200001 | 2026-03-12 17:22:00 | 3 | 🔗 查看报告 |
# 分析本地宠物监控视频(以下只是示例,禁止直接使用openclaw-control-ui 作为 open-id)
python -m scripts.pet_restricted_area_warning_analysis --input /path/to/monitor.mp4 --alert-threshold 0.6 --open-id openclaw-control-ui
# 分析网络宠物监控视频,调整预警阈值(以下只是示例,禁止直接使用openclaw-control-ui 作为 open-id)
python -m scripts.pet_restricted_area_warning_analysis --url https://example.com/monitor.mp4 --alert-threshold 0.5 --open-id openclaw-control-ui
# 显示历史预警报告/显示预警报告清单列表/显示历史宠物禁区报告(自动触发关键词:查看历史预警报告、历史报告、预警报告清单等)
python -m scripts.pet_restricted_area_warning_analysis --list --open-id openclaw-control-ui
# 输出精简报告
python -m scripts.pet_restricted_area_warning_analysis --input video.mp4 --open-id your-open-id --detail basic
# 保存结果到文件
python -m scripts.pet_restricted_area_warning_analysis --input video.mp4 --open-id your-open-id --output result.json
共 5 个版本