← Back to Skills Marketplace
hik-cloud-open

海康云眸设备告警能力管理

by hik-cloud · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
27
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install hik-cloud-open-device-alarm-capability-management
Description
调用海康云眸开放平台设备报警能力管理接口,包括获取常规报警能力列表、修改报警能力状态和设置智能检测开关。用户提到报警能力、移动侦测、视频遮挡、区域入侵、智能检测开关等场景时使用。本技能自动处理 access_token 获取与刷新,不向用户暴露 token 调用流程。
README (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
Usage Guidance
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.
Capability Analysis
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.
Capability Tags
requires-oauth-tokenrequires-sensitive-credentials
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install hik-cloud-open-device-alarm-capability-management
  3. After installation, invoke the skill by name or use /hik-cloud-open-device-alarm-capability-management
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release: 设备告警能力查询、管理
Metadata
Slug hik-cloud-open-device-alarm-capability-management
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is 海康云眸设备告警能力管理?

调用海康云眸开放平台设备报警能力管理接口,包括获取常规报警能力列表、修改报警能力状态和设置智能检测开关。用户提到报警能力、移动侦测、视频遮挡、区域入侵、智能检测开关等场景时使用。本技能自动处理 access_token 获取与刷新,不向用户暴露 token 调用流程。 It is an AI Agent Skill for Claude Code / OpenClaw, with 27 downloads so far.

How do I install 海康云眸设备告警能力管理?

Run "/install hik-cloud-open-device-alarm-capability-management" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is 海康云眸设备告警能力管理 free?

Yes, 海康云眸设备告警能力管理 is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does 海康云眸设备告警能力管理 support?

海康云眸设备告警能力管理 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created 海康云眸设备告警能力管理?

It is built and maintained by hik-cloud (@hik-cloud-open); the current version is v1.0.0.

💬 Comments