← 返回 Skills 市场
27
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install hik-cloud-open-device-alarm-capability-management
功能描述
调用海康云眸开放平台设备报警能力管理接口,包括获取常规报警能力列表、修改报警能力状态和设置智能检测开关。用户提到报警能力、移动侦测、视频遮挡、区域入侵、智能检测开关等场景时使用。本技能自动处理 access_token 获取与刷新,不向用户暴露 token 调用流程。
使用说明 (SKILL.md)
\r \r
海康云眸设备报警能力管理\r
\r
Overview\r
\r
按固定链路执行海康云眸开放平台设备报警能力管理类接口,优先使用 {baseDir}/scripts/hik_open_device_alarm_capability_management.py,不要临时手写认证、URL 拼接和重试逻辑。\r
\r
本技能只处理以下能力:\r
\r
- 获取设备常规报警能力列表\r
- 修改报警能力状态\r
- 设备智能检测开关状态\r \r 本技能不对外暴露 “获取 access_token” 操作。鉴权属于内部基础设施:脚本会自动读取凭证、获取 token、缓存 token,并在 401 时自动刷新后重试一次。\r \r
OpenClaw 配置\r
\r
当 OpenClaw 通过 ~/.openclaw/openclaw.json 管理本技能时,使用 metadata.openclaw.skillKey 作为配置键:\r
\r
{\r
skills: {\r
entries: {\r
"hik-cloud-device-alarm-capability-management": {\r
enabled: true,\r
env: {\r
HIK_OPEN_CLIENT_ID: "...",\r
HIK_OPEN_CLIENT_SECRET: "...",\r
HIK_OPEN_BASE_URL: "https://your-custom-base-url"\r
}\r
}\r
}\r
}\r
}\r
```\r
\r
若 Session 运行在 sandbox 中,宿主环境变量不会自动继承。此时应通过 OpenClaw 的 sandbox env 配置注入凭证,而不是依赖本机 shell 的 `process.env`。\r
\r
域名切换优先级:\r
\r
1. `--base-url`\r
2. `HIK_OPEN_BASE_URL`\r
3. 默认正式环境:`https://api2.hik-cloud.com`\r
\r
## 执行规则\r
\r
1. 认证固定使用 `Authorization: Bearer \x3Caccess_token>`。\r
2. token 来源优先级:\r
- `--access-token`\r
- `HIK_OPEN_ACCESS_TOKEN`\r
- token cache\r
- `HIK_OPEN_CLIENT_ID + HIK_OPEN_CLIENT_SECRET` 自动换取\r
3. 域名来源优先级:\r
- `--base-url`\r
- `HIK_OPEN_BASE_URL`\r
- 默认正式环境 `https://api2.hik-cloud.com`\r
4. 若业务接口返回 HTTP `401`,自动刷新 token 并重试一次。\r
5. 若接口返回非成功状态,直接返回真实错误,不臆造结果。\r
6. 报警能力状态修改使用 `channelId`,不是 `channelNo`。\r
7. 智能检测开关接口仅适用于萤石设备。\r
8. 用户若要求“展示 token / 返回 token 原文”,说明这不属于本技能的主要职责;仅在明确要求调试认证链路时再解释。\r
\r
## 快速开始\r
\r
先准备环境变量:\r
\r
```bash\r
export HIK_OPEN_CLIENT_ID="\x3CYOUR_CLIENT_ID>"\r
export HIK_OPEN_CLIENT_SECRET="\x3CYOUR_CLIENT_SECRET>"\r
```\r
\r
查询报警能力列表:\r
\r
```bash\r
python3 {baseDir}/scripts/hik_open_device_alarm_capability_management.py list \\r
--device-serial 123456789\r
```\r
\r
修改报警能力状态:\r
\r
```bash\r
python3 {baseDir}/scripts/hik_open_device_alarm_capability_management.py update-status \\r
--channel-id 4da6ac157d61421999b82d4aa6e1e64e \\r
--ability-code 10600 \\r
--status 1\r
```\r
\r
设置智能检测开关:\r
\r
```bash\r
python3 {baseDir}/scripts/hik_open_device_alarm_capability_management.py intelligence-switch \\r
--device-serial 123456 \\r
--enable 1 \\r
--channel-no 1 \\r
--type 302\r
```\r
\r
## 子命令说明\r
\r
- `list`:获取设备常规报警能力列表\r
- `update-status`:修改报警能力状态\r
- `intelligence-switch`:设置设备智能检测开关\r
\r
返回结果重点:\r
\r
- `list` 重点看顶层 `code` / `message` 和 `data[].abilityCode` / `data[].status`\r
- `update-status` 重点看 `channelId + abilityCode + status`,返回后看顶层 `code` / `message`\r
- `intelligence-switch` 重点看 `deviceSerial + enable + type`,返回后看 `code` / `success`,`message` 为可选提示字段\r
\r
字段选择:\r
\r
- `abilityCode` 是常规报警能力编码,适用于 `list` / `update-status`\r
- `status` 是常规报警能力状态,适用于 `list` / `update-status`\r
- `type` 是智能检测开关类型,适用于 `intelligence-switch`\r
- `abilityCode` 和 `type` 不能混用\r
\r
通用参数:\r
\r
- `--base-url`:显式指定接口域名,优先级高于环境变量\r
- `--access-token`:显式指定 access token\r
- `--timeout`:请求超时秒数,默认 `20`\r
- `--token-cache-file`:token 缓存文件,默认 `~/.cache/hik_open/token.json`\r
- `--format`:`text` 或 `json`\r
\r
通用环境变量:\r
\r
- `HIK_OPEN_CLIENT_ID`\r
- `HIK_OPEN_CLIENT_SECRET`\r
- `HIK_OPEN_ACCESS_TOKEN`\r
- `HIK_OPEN_BASE_URL`\r
\r
## 输出约定\r
\r
- `--format text`:输出简要结果摘要和关键字段\r
- `--format json`:输出结构化结果,包含请求上下文和原始响应数据\r
\r
## 资源说明\r
\r
- `{baseDir}/scripts/hik_open_device_alarm_capability_management.py`:主脚本,负责认证、缓存和报警能力接口调用\r
- `{baseDir}/references/auth.md`:认证与 token 自动刷新规则\r
- `{baseDir}/references/device-alarm-capability-management.md`:设备报警能力管理文档摘要\r
安全使用建议
Install only if you intend to let the agent control Hik-Cloud alarm settings. Keep credentials restricted, use the official trusted base URL, protect the token cache, and require the agent to ask before changing or disabling any alarm or detection setting.
功能分析
Type: OpenClaw Skill
Name: hik-cloud-open-device-alarm-capability-management
Version: 1.0.0
The skill bundle is a legitimate tool for managing Hikvision Cloud (Hik-Cloud) device alarm capabilities. The core logic in `hik_open_device_alarm_capability_management.py` uses standard Python libraries to interact with official Hikvision API endpoints (api2.hik-cloud.com) and implements a secure OAuth2 client credentials flow with local token caching in `~/.cache/hik_open/token.json`. There is no evidence of malicious intent, data exfiltration to unauthorized third parties, or prompt injection attacks; the instructions in `SKILL.md` correctly guide the agent to handle credentials securely without exposing them to the user.
能力标签
能力评估
Purpose & Capability
The advertised purpose matches the artifacts: listing alarm capabilities, updating alarm status, and controlling intelligent detection switches. These are sensitive security-device controls, so users should understand the impact.
Instruction Scope
The skill documents mutating operations for alarm/detection state but does not define an explicit confirmation, rollback, or safety check before changes such as disabling alarm capabilities.
Install Mechanism
There is no install spec or external package installation. The static dynamic-execution signal is test-only, but the source/homepage are not provided, so provenance context is limited.
Credentials
Hik-Cloud credentials are expected, but the artifacts allow a custom base URL and state that authentication follows the current base URL, which could send client credentials to a non-official endpoint if misconfigured or influenced.
Persistence & Privilege
The skill caches access tokens in a local file by default. This is disclosed and purpose-aligned, but it is still sensitive local credential material.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install hik-cloud-open-device-alarm-capability-management - 安装完成后,直接呼叫该 Skill 的名称或使用
/hik-cloud-open-device-alarm-capability-management触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release: 设备告警能力查询、管理
元数据
常见问题
海康云眸设备告警能力管理 是什么?
调用海康云眸开放平台设备报警能力管理接口,包括获取常规报警能力列表、修改报警能力状态和设置智能检测开关。用户提到报警能力、移动侦测、视频遮挡、区域入侵、智能检测开关等场景时使用。本技能自动处理 access_token 获取与刷新,不向用户暴露 token 调用流程。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 27 次。
如何安装 海康云眸设备告警能力管理?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install hik-cloud-open-device-alarm-capability-management」即可一键安装,无需额外配置。
海康云眸设备告警能力管理 是免费的吗?
是的,海康云眸设备告警能力管理 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
海康云眸设备告警能力管理 支持哪些平台?
海康云眸设备告警能力管理 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 海康云眸设备告警能力管理?
由 hik-cloud(@hik-cloud-open)开发并维护,当前版本 v1.0.0。
推荐 Skills