openydt-device

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
CRITICAL — 开始前 MUST 先用 Read 工具读取
../openydt-shared/SKILL.md
:其中包含认证 / profile / 签名 / 状态码 / 限速 / 安全等通用约定。未读基座规范不要执行任何命令。
CRITICAL — MUST use the Read tool to read
../openydt-shared/SKILL.md
before starting
: It contains general conventions such as authentication / profile / signature / status code / rate limit / security. Do not execute any commands without reading the base specification.

何时用本技能

When to Use This Skill

当用户意图是「对停车场现场设备下指令或读设备状态」时使用本技能,例如:远程开闸/关闸、把闸机切到常开模式、给显示屏推文字、让设备语音播报/喊话、抓拍车辆图片、控制云端扫码机(开始扫码/停止扫码/语音/更新配置)、查询设备在线状态。
意图路由:
  • 「开闸 / 关闸 / 抬杆 / 落杆 / 远程开门」→ 传统/云场用
    op-gate
    ;纯云场按通道 ID 开关用
    cloud-open-gate
  • 「常开 / 恢复正常 / 改闸机模式」→
    change-channel-mode
  • 「显示屏 / LED 显示 / 语音播报 / 喊话」→
    op-show-voice
    ;设置默认屏显图片轮播 →
    set-default-screen
  • 「抓拍 / 拍照」→
    channel-snap
  • 「扫码机 / 二维码支付设备」→ 扫码
    cloud-scan-qr-code
    、停止
    cloud-stop-scan-code
    、语音
    cloud-scan-voice
    、更新配置
    cloud-scan-update-config
  • 「设备状态 / 是否在线」→
    get-cloud-equip-status
不涉及现场设备的查询(车辆在场、订单、月票、券)请改用对应业务域技能(
openydt parking
/
openydt trade
/
openydt ticket
/
openydt coupon
等)。
Use this skill when the user intends to "issue commands to or read the status of on-site parking lot devices", such as: remote gate opening/closing, switching the gate to always-open mode, pushing text to the display screen, enabling device voice broadcasting/announcement, capturing vehicle images, controlling cloud QR code scanners (start scanning/stop scanning/voice broadcasting/update configuration), querying device online status.
Intent Routing:
  • "Open gate / Close gate / Lift bar / Lower bar / Remote door opening" → Use
    op-gate
    for traditional/cloud parking lots; use
    cloud-open-gate
    for pure cloud parking lots to open/close by channel ID.
  • "Always open / Restore normal / Change gate mode" →
    change-channel-mode
    .
  • "Display screen / LED display / Voice broadcasting / Announcement" →
    op-show-voice
    ; set default display image carousel →
    set-default-screen
    .
  • "Snapshot / Take photo" →
    channel-snap
    .
  • "QR code scanner / QR code payment device" → Scan with
    cloud-scan-qr-code
    , stop with
    cloud-stop-scan-code
    , voice broadcasting with
    cloud-scan-voice
    , update configuration with
    cloud-scan-update-config
    .
  • "Device status / Whether online" →
    get-cloud-equip-status
    .
For queries not involving on-site devices (vehicles on site, orders, monthly passes, coupons), please use corresponding business domain skills (
openydt parking
/
openydt trade
/
openydt ticket
/
openydt coupon
, etc.).

可用命令

Available Commands

中文名命令读/写关键参数
修改一体机闸机模式
openydt device change-channel-mode
parkCode, channelCode, mode(0常开/1正常)
手动抓拍
openydt device channel-snap
parkCode, channelCode, operator(可选)
云场通道开/关闸
openydt device cloud-open-gate
parkCode, channelId, opType(0开/1关)
扫码机下发扫码
openydt device cloud-scan-qr-code
parkCode, scanMachineId, deviceType, timeLength, voiceType
扫码机更新配置
openydt device cloud-scan-update-config
scanMachineId, channelId
扫码机语音播报
openydt device cloud-scan-voice
parkCode, scanMachineId, voiceType, voiceNum, voiceInterval
扫码机停止扫码
openydt device cloud-stop-scan-code
parkCode, scanMachineId, deviceType(可选)
获取云端设备状态
openydt device get-cloud-equip-status
equipType(0一体机/2卡机/3扫码机), clientId
开/关闸
openydt device op-gate
parkCode, channelCode, opType(0开/1关), operator, operateTime, carNo(可选)
显示屏/语音播报
openydt device op-show-voice
parkCode, channelCode, show/voice(至少一个), qrCode(可选), operator, operateTime
设置默认屏显内容
openydt device set-default-screen
parkCode, deviceType, channelCode, templateData.imageArray
get-cloud-equip-status
(读)外,以上全部为写操作,执行时必须加
--yes
确认。
Chinese NameCommandRead/WriteKey Parameters
Modify All-in-One Gate Mode
openydt device change-channel-mode
WriteparkCode, channelCode, mode(0=Always Open/1=Normal)
Manual Snapshot
openydt device channel-snap
WriteparkCode, channelCode, operator(optional)
Cloud Parking Lot Channel Open/Close
openydt device cloud-open-gate
WriteparkCode, channelId, opType(0=Open/1=Close)
Issue Scanning Command to QR Code Scanner
openydt device cloud-scan-qr-code
WriteparkCode, scanMachineId, deviceType, timeLength, voiceType
Update QR Code Scanner Configuration
openydt device cloud-scan-update-config
WritescanMachineId, channelId
QR Code Scanner Voice Broadcasting
openydt device cloud-scan-voice
WriteparkCode, scanMachineId, voiceType, voiceNum, voiceInterval
Stop QR Code Scanner Scanning
openydt device cloud-stop-scan-code
WriteparkCode, scanMachineId, deviceType(optional)
Get Cloud Device Status
openydt device get-cloud-equip-status
ReadequipType(0=All-in-One/2=Card Machine/3=QR Code Scanner), clientId
Open/Close Gate
openydt device op-gate
WriteparkCode, channelCode, opType(0=Open/1=Close), operator, operateTime, carNo(optional)
Display Screen/Voice Broadcasting
openydt device op-show-voice
WriteparkCode, channelCode, show/voice(at least one), qrCode(optional), operator, operateTime
Set Default Display Content
openydt device set-default-screen
WriteparkCode, deviceType, channelCode, templateData.imageArray
Except for
get-cloud-equip-status
(read), all the above are write operations, and must be executed with
--yes
for confirmation.

业务流程

Business Process

设备控制属于直接作用于现场硬件的高危操作。标准顺序:先定位设备 → 干预前可先查状态 → 用
--dry-run
预览 → 确认无误再加
--yes
真正下发
。务必把前序命令响应里的字段透传到后续命令入参,不要手填臆测值。
  1. 定位通道 / 设备:在停车场域(
    openydt parking
    /
    openydt park
    )拿到
    parkCode
    、通道
    channelCode
    channelId
    、设备
    scanMachineId
    /
    clientId
    。这些是后续所有设备命令的入参来源。
  2. (可选)先查设备在线状态:对云端设备先跑
    get-cloud-equip-status
    (
    equipType
    +
    clientId
    ),响应里设备在线/状态字段确认设备可用,再决定是否下发指令。
    clientId
    即扫码机的
    scanMachineId
  3. 预览写指令(高危,务必先 dry-run):对
    op-gate
    cloud-open-gate
    op-show-voice
    change-channel-mode
    set-default-screen
    channel-snap
    及扫码机系列命令,先用
    --dry-run
    查看将要发送的请求体与目标,核对
    parkCode
    /
    channelCode
    /
    channelId
    /
    opType
    等无误。
  4. 确认下发:复核 dry-run 输出后,把同一组参数加
    --yes
    正式执行。
    • 开关闸:传统场/云场用
      op-gate
      (
      channelCode
      +
      opType
      );纯云场按通道 ID 用
      cloud-open-gate
      (用第 1 步拿到的
      channelId
      而非 channelCode)。
    • 闸机常开:
      change-channel-mode
      (
      mode=0
      常开 /
      mode=1
      正常)。
    • 屏显/喊话:
      op-show-voice
      (
      show
      voice
      至少给一个);扫码机喊话用
      cloud-scan-voice
      (
      scanMachineId
      取自第 1/2 步)。
    • 扫码流程:
      cloud-scan-qr-code
      开始扫码 →(需要时)
      cloud-scan-voice
      提示 →
      cloud-stop-scan-code
      停止,三者复用同一
      scanMachineId
  5. 核对结果:看返回状态码(参见基座规范)。开关闸等动作可再次
    get-cloud-equip-status
    或在停车场域复查在场记录确认生效。
Device control is a high-risk operation that directly affects on-site hardware. Standard sequence:Locate the device first → Check the status before intervention → Preview with
--dry-run
→ Confirm and add
--yes
to actually issue the command
. Be sure to pass the fields from the previous command response to the subsequent command parameters; do not fill in values by guesswork.
  1. Locate Channel / Device: Obtain
    parkCode
    , channel
    channelCode
    or
    channelId
    , device
    scanMachineId
    /
    clientId
    in the parking lot domain (
    openydt parking
    /
    openydt park
    ). These are the parameter sources for all subsequent device commands.
  2. (Optional) Check Device Online Status First: For cloud devices, run
    get-cloud-equip-status
    (
    equipType
    +
    clientId
    ) first, confirm the device is available through the online/status field in the response, then decide whether to issue the command.
    clientId
    is the
    scanMachineId
    of the QR code scanner.
  3. Preview Write Command (High Risk, Must Use dry-run First): For commands such as
    op-gate
    ,
    cloud-open-gate
    ,
    op-show-voice
    ,
    change-channel-mode
    ,
    set-default-screen
    ,
    channel-snap
    and QR code scanner series commands, use
    --dry-run
    first to view the request body and target to be sent, and verify that
    parkCode
    /
    channelCode
    /
    channelId
    /
    opType
    are correct.
  4. Confirm Issuance: After reviewing the dry-run output, add
    --yes
    to the same set of parameters to officially execute.
    • Gate opening/closing: Use
      op-gate
      (
      channelCode
      +
      opType
      ) for traditional/cloud parking lots; use
      cloud-open-gate
      for pure cloud parking lots by channel ID (use
      channelId
      obtained in step 1 instead of channelCode).
    • Gate always open:
      change-channel-mode
      (
      mode=0
      for Always Open /
      mode=1
      for Normal).
    • Display screen/announcement:
      op-show-voice
      (at least one of
      show
      and
      voice
      is required); use
      cloud-scan-voice
      for QR code scanner announcement (
      scanMachineId
      obtained from step 1/2).
    • Scanning process:
      cloud-scan-qr-code
      to start scanning → (if needed)
      cloud-scan-voice
      for prompt →
      cloud-stop-scan-code
      to stop, all reuse the same
      scanMachineId
      .
  5. Verify Result: Check the return status code (refer to the base specification). For actions such as gate opening/closing, you can run
    get-cloud-equip-status
    again or review the on-site record in the parking lot domain to confirm effectiveness.

示例

Examples

bash
undefined
bash
undefined

1) 开闸(写,高危):先预览

1) Open gate (write, high risk): Preview first

openydt device op-gate
--park-code 2KNTYVWC --channel-code 001 --op-type 0
--operator operator --operate-time "2017-09-11 14:04:04" --dry-run
openydt device op-gate
--park-code 2KNTYVWC --channel-code 001 --op-type 0
--operator operator --operate-time "2017-09-11 14:04:04" --dry-run

预览无误后真正执行

Execute after preview is correct

openydt device op-gate
--park-code 2KNTYVWC --channel-code 001 --op-type 0
--operator operator --operate-time "2017-09-11 14:04:04" --yes
openydt device op-gate
--park-code 2KNTYVWC --channel-code 001 --op-type 0
--operator operator --operate-time "2017-09-11 14:04:04" --yes

2) 显示屏 + 语音播报(写,需 --yes;show/voice 至少一个)

2) Display screen + Voice broadcasting (write, requires --yes; at least one of show/voice)

openydt device op-show-voice
--park-code 2KNTYVWC --channel-code 001
--show show --voice voice
--operator operator --operate-time "2017-09-11 14:04:04" --yes
openydt device op-show-voice
--park-code 2KNTYVWC --channel-code 001
--show show --voice voice
--operator operator --operate-time "2017-09-11 14:04:04" --yes

3) 查询云端扫码机状态(读,无需 --yes)

3) Query cloud QR code scanner status (read, no --yes required)

openydt device get-cloud-equip-status --equip-type 3 --client-id 3571F003
undefined
openydt device get-cloud-equip-status --equip-type 3 --client-id 3571F003
undefined