← Back to Skills Marketplace
🔌

jftech-open-pro-ptz-control

by jftech · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
47
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install jftech-open-pro-ptz-control
Description
面向开发者杰峰设备 API 工具,可支持设备状态、方向控制、一键遮蔽、变倍和聚焦、预置位及巡航计划管理功能等。触发词:云台控制、设备状态、方向转动、预置位、巡航计划、一键遮蔽。
README (SKILL.md)

JF Open Pro PTZ Control

面向开发者杰峰设备云台控制工具 (Python)

支持设备状态查询、方向控制、一键遮蔽、变倍和聚焦、预置位及巡航计划管理功能。


🔒 安全说明

仅支持环境变量存储凭据

方式 支持 说明
环境变量 ✅ 支持 不会在进程列表中暴露,不会执行本地代码
命令行参数 ❌ 不支持 避免凭据泄露风险
配置文件 ❌ 不支持 避免代码执行风险

🚀 快速开始

设置环境变量

export JF_UUID="your-uuid"              # 开放平台用户唯一标识
export JF_APPKEY="your-appkey"          # 开放平台应用 Key
export JF_APPSECRET="your-appsecret"    # 开放平台应用密钥
export JF_MOVECARD=5                    # 签名算法偏移量 (0-9)
export JF_SN="your-device-sn"           # 设备序列号
export JF_USERNAME="admin"              # 设备用户名(可选,默认:admin)
export JF_PASSWORD="your-password"      # 设备密码(可选)

使用技能

# 查询设备状态
python scripts/jf_open_pro_ptz_control.py status

# 云台方向控制(向上转动)
python scripts/jf_open_pro_ptz_control.py ptz --direction up --action start
# 停止转动
python scripts/jf_open_pro_ptz_control.py ptz --direction up --action stop

# 一键遮蔽(开启)
python scripts/jf_open_pro_ptz_control.py mask --enable true

# 一键遮蔽(关闭)
python scripts/jf_open_pro_ptz_control.py mask --enable false

# 变倍控制(放大)
python scripts/jf_open_pro_ptz_control.py zoom --zoom-command ZoomTile --action start
python scripts/jf_open_pro_ptz_control.py zoom --zoom-command ZoomTile --action stop

# 设置预置点
python scripts/jf_open_pro_ptz_control.py preset --preset-command set --id 1 --name "门口"

# 转到预置点
python scripts/jf_open_pro_ptz_control.py preset --preset-command goto --id 1

# 获取预置点列表
python scripts/jf_open_pro_ptz_control.py preset --preset-command list

# 添加巡航点
python scripts/jf_open_pro_ptz_control.py tour --tour-command add --tour-id 0 --preset-id 1

# 启动巡航
python scripts/jf_open_pro_ptz_control.py tour --tour-command start --tour-id 0

# 获取巡航列表
python scripts/jf_open_pro_ptz_control.py tour --tour-command list

📋 环境变量

变量名 说明 必需 默认值
JF_UUID 开放平台用户唯一标识 -
JF_APPKEY 开放平台应用 Key -
JF_APPSECRET 开放平台应用密钥 -
JF_MOVECARD 签名算法偏移量 (0-9) -
JF_SN 设备序列号 -
JF_USERNAME 设备用户名 admin
JF_PASSWORD 设备密码 -
JF_ENDPOINT API 端点 api.jftechws.com

🛠️ 功能

1. 设备状态查询

查询设备在线状态、休眠状态、认证状态、设备 WAN IP 等。

python scripts/jf_open_pro_ptz_control.py status

返回信息:

  • 设备在线状态(online/notfound)
  • 低功耗设备休眠状态
  • 认证状态
  • 设备 WAN IP

2. 方向控制 (PTZ)

云台支持 8 个方向转动:

方向 参数值
up
down
left
right
左上 leftup
左下 leftdown
右上 rightup
右下 rightdown

使用示例:

# 开始向上转动(速度 5)
python scripts/jf_open_pro_ptz_control.py ptz --direction up --action start --step 5

# 停止转动
python scripts/jf_open_pro_ptz_control.py ptz --direction up --action stop

参数说明:

  • --direction: 方向(up/down/left/right/leftup/leftdown/rightup/rightdown)
  • --action: 动作(start/stop)
  • --step: 速度(1-8,1 最慢,8 最快,默认:5)

⚠️ 重要: 必须先发送 start 再发送 stop,建议间隔 500ms。如果不发送 stop,设备会一直转动到最大角度。


3. 一键遮蔽 (Mask)

开启后摄像头转至最下方然后转至最右侧,同时关闭视频预览和录像。

# 开启遮蔽
python scripts/jf_open_pro_ptz_control.py mask --enable true

# 关闭遮蔽
python scripts/jf_open_pro_ptz_control.py mask --enable false

4. 变倍和聚焦控制 (Zoom/Focus)

支持变倍(Zoom)和聚焦(Focus)操作:

功能 参数值 说明
变倍 - ZoomWide 缩小(广角)
变倍 + ZoomTile 放大(长焦)
聚焦 - FocusFar 聚焦远处
聚焦 + FocusNear 聚焦近处
光圈 - IrisSmall 缩小光圈
光圈 + IrisLarge 放大光圈

使用示例:

# 开始变倍 +(放大)
python scripts/jf_open_pro_ptz_control.py zoom --zoom-command ZoomTile --action start --step 8

# 停止
python scripts/jf_open_pro_ptz_control.py zoom --zoom-command ZoomTile --action stop

5. 预置位管理 (Preset)

预置点编号范围:1-255(建议不使用 200 以后的编号)

特殊预置点:

  • 100: 移动追踪守望位(追踪停止后自动回归)
  • 128: 自检回归预置点(设备重启或自检时回归)

操作类型:

操作 参数值 说明
设置预置点 set 将当前位置保存为预置点
删除预置点 clear 删除指定预置点
转到预置点 goto 云台转动到预置点位置
编辑预置点名 name 修改预置点名称
获取列表 list 获取所有预置点

使用示例:

# 设置预置点 1,名称为"门口"
python scripts/jf_open_pro_ptz_control.py preset --preset-command set --id 1 --name "门口"

# 转到预置点 1
python scripts/jf_open_pro_ptz_control.py preset --preset-command goto --id 1

# 删除预置点 1
python scripts/jf_open_pro_ptz_control.py preset --preset-command clear --id 1

# 编辑预置点名称
python scripts/jf_open_pro_ptz_control.py preset --preset-command name --id 1 --name "新名称"

# 获取预置点列表
python scripts/jf_open_pro_ptz_control.py preset --preset-command list

6. 巡航计划管理 (Tour)

巡航功能让设备在多个预置点之间自动循环巡视。

操作类型:

操作 参数值 说明
添加巡航点 add 往巡航线路添加预置点
删除巡航点 delete 从巡航线路删除预置点
启动巡航 start 开始自动巡航
停止巡航 stop 停止巡航
清除巡航线路 clear 清空整个巡航线路
获取列表 list 获取巡航配置

使用示例:

# 添加预置点 1 到巡航线路 0
python scripts/jf_open_pro_ptz_control.py tour --tour-command add --tour-id 0 --preset-id 1 --step 5

# 添加预置点 2 到巡航线路 0
python scripts/jf_open_pro_ptz_control.py tour --tour-command add --tour-id 0 --preset-id 2

# 启动巡航线路 0
python scripts/jf_open_pro_ptz_control.py tour --tour-command start --tour-id 0

# 停止巡航
python scripts/jf_open_pro_ptz_control.py tour --tour-command stop --tour-id 0

# 获取巡航配置
python scripts/jf_open_pro_ptz_control.py tour --tour-command list

📖 使用场景示例

场景 1: 基础云台控制

# 1. 检查设备状态
python scripts/jf_open_pro_ptz_control.py status

# 2. 向上转动
python scripts/jf_open_pro_ptz_control.py ptz --direction up --action start
sleep 1
python scripts/jf_open_pro_ptz_control.py ptz --direction up --action stop

# 3. 向右转动
python scripts/jf_open_pro_ptz_control.py ptz --direction right --action start
sleep 1
python scripts/jf_open_pro_ptz_control.py ptz --direction right --action stop

场景 2: 设置并使用预置位

# 1. 转动到目标位置
python scripts/jf_open_pro_ptz_control.py ptz --direction up --action start
sleep 1
python scripts/jf_open_pro_ptz_control.py ptz --direction up --action stop

# 2. 保存为预置点 1
python scripts/jf_open_pro_ptz_control.py preset --preset-command set --id 1 --name "门口"

# 3. 转动到其他位置...

# 4. 回到预置点 1
python scripts/jf_open_pro_ptz_control.py preset --preset-command goto --id 1

场景 3: 设置自动巡航

# 1. 设置多个预置点
python scripts/jf_open_pro_ptz_control.py preset --preset-command set --id 1 --name "位置 1"
python scripts/jf_open_pro_ptz_control.py preset --preset-command set --id 2 --name "位置 2"
python scripts/jf_open_pro_ptz_control.py preset --preset-command set --id 3 --name "位置 3"

# 2. 添加到巡航线路
python scripts/jf_open_pro_ptz_control.py tour --tour-command add --tour-id 0 --preset-id 1
python scripts/jf_open_pro_ptz_control.py tour --tour-command add --tour-id 0 --preset-id 2
python scripts/jf_open_pro_ptz_control.py tour --tour-command add --tour-id 0 --preset-id 3

# 3. 启动巡航
python scripts/jf_open_pro_ptz_control.py tour --tour-command start --tour-id 0

⚠️ 错误处理

错误码 说明 解决方案
2000 成功 -
4118 连接超时 设备离线/休眠,稍后重试
10001 Token 无效 重新获取 Token
10002 设备未登录 脚本会自动处理登录
526 低电量/不支持 设备电量不足或为固定摄像头

错误码 526 说明

含义: 设备支持云台,但电量过低无法执行

解决方案:

  1. 给设备充电
  2. 等待电量恢复至 20% 以上
  3. 使用电源供电模式

⚠️ 注意事项

  1. 设备需在线 - 操作前确保设备在线
  2. 设备需登录 - 脚本会自动处理设备登录
  3. PTZ 控制 - start/stop 指令需串行发送(间隔 500ms)
  4. 预置点范围 - 建议使用 1-199 编号
  5. 电量检查 - 低电量时云台功能可能被禁用

📚 官方参考资料


📁 脚本工具

# 获取帮助
python scripts/jf_open_pro_ptz_control.py --help

# 查询设备状态
python scripts/jf_open_pro_ptz_control.py status

# PTZ 方向控制
python scripts/jf_open_pro_ptz_control.py ptz --direction \x3C方向> --action \x3Cstart|stop>

# 一键遮蔽
python scripts/jf_open_pro_ptz_control.py mask --enable \x3Ctrue|false>

# 变倍聚焦
python scripts/jf_open_pro_ptz_control.py zoom --zoom-command \x3C命令> --action \x3Cstart|stop>

# 预置点管理
python scripts/jf_open_pro_ptz_control.py preset --preset-command \x3Cset|clear|goto|name|list> [选项]

# 巡航管理
python scripts/jf_open_pro_ptz_control.py tour --tour-command \x3Cadd|delete|start|stop|clear|list> [选项]

脚本路径:scripts/jf_open_pro_ptz_control.py


技能版本: v1.0.0
语言: Python
最后更新: 2026-04-07

Usage Guidance
This package appears to implement the claimed PTZ features, but there are clear internal inconsistencies you should resolve before trusting it: (1) the registry metadata does NOT list the environment variables the SKILL.md and script require — verify that the skill really comes from an official JFTech source; (2) SKILL.md wrongly claims "will not execute local code" while it instructs you to run the included Python script — treat this as a red flag and inspect the full script yourself; (3) confirm the API endpoints (api.jftechws.com / api-cn.jftech.com) and examine the rest of the script (the provided file was truncated in the package view) for any unexpected network hosts or obfuscated logic; (4) run in an isolated environment (container/VM) and avoid reusing production credentials — if you already supplied credentials to this skill, rotate them after verification. If you cannot confirm the publisher or inspect the entire script, consider not installing or only using read-only/non-sensitive credentials for testing.
Capability Analysis
Type: OpenClaw Skill Name: jftech-open-pro-ptz-control Version: 1.0.0 The skill bundle provides a Python tool for controlling JFTech PTZ cameras via their official API (api.jftechws.com and api-cn.jftech.com). The script jf_open_pro_ptz_control.py implements standard API interactions, including signature calculation, token acquisition, and device control commands. It follows security best practices by using environment variables for credentials and lacks any indicators of data exfiltration, persistence, or malicious intent.
Capability Assessment
Purpose & Capability
The name/description (PTZ control for JF devices) aligns with the included Python script: the code implements device token retrieval, login, PTZ, mask, zoom/focus, preset and tour APIs against jftech endpoints. However, the registry metadata at the top of the package lists no required environment variables or primary credential while SKILL.md and the script clearly require sensitive credentials (JF_UUID, JF_APPKEY, JF_APPSECRET, JF_MOVECARD, etc.). That metadata mismatch is an incoherence.
Instruction Scope
SKILL.md instructs users to set environment variables and run the included Python script (scripts/jf_open_pro_ptz_control.py). Yet the SKILL.md security section states "不会执行本地代码" (will not execute local code), which is false because the instructions explicitly run local code. There are also contradictions inside SKILL.md about which variables are required (e.g., JF_SN shown as optional in one place and required in another). These mixed/contradictory instructions expand agent discretion and are misleading.
Install Mechanism
There is no install spec (instruction-only) which keeps risk lower, but a Python script is included in the package and intended to be executed directly. No third-party downloads, package managers, or remote installers are used — the script runs local HTTPS requests. Presence of runnable code without an install step is acceptable but should be noted.
Credentials
The environment variables requested (UUID, APPKEY, APPSECRET, MOVECARD, device SN, username/password, endpoint) are consistent with authenticating to a device cloud API and are proportionate to PTZ control. That said, the package metadata omitted declaring these required env vars; SKILL.md also inconsistently marks some variables as optional vs required. Because these are sensitive secrets (app secret, device password), the user should only provide them to a trusted source after verifying the code.
Persistence & Privilege
The skill does not request permanent/always inclusion and does not modify other skills; model invocation is allowed (default) which is normal. No elevated persistence or system-wide changes are requested by the package.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install jftech-open-pro-ptz-control
  3. After installation, invoke the skill by name or use /jftech-open-pro-ptz-control
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release of jf-open-pro-ptz-control. - Provides command-line Python tools for PTZ control on JieFeng devices: device status, direction control, masking, zoom/focus, preset, and tour management. - All credentials are set via environment variables for security; config files and CLI params are not supported. - Supports both international and mainland China API endpoints. - Detailed usage instructions and parameter lists are provided for all supported features. - Sample usage scenarios included for fast start and common PTZ workflow reference.
Metadata
Slug jftech-open-pro-ptz-control
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is jftech-open-pro-ptz-control?

面向开发者杰峰设备 API 工具,可支持设备状态、方向控制、一键遮蔽、变倍和聚焦、预置位及巡航计划管理功能等。触发词:云台控制、设备状态、方向转动、预置位、巡航计划、一键遮蔽。 It is an AI Agent Skill for Claude Code / OpenClaw, with 47 downloads so far.

How do I install jftech-open-pro-ptz-control?

Run "/install jftech-open-pro-ptz-control" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is jftech-open-pro-ptz-control free?

Yes, jftech-open-pro-ptz-control is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does jftech-open-pro-ptz-control support?

jftech-open-pro-ptz-control is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created jftech-open-pro-ptz-control?

It is built and maintained by jftech (@jftech); the current version is v1.0.0.

💬 Comments