SuperAPI AI Directory

openydt-flow-park-access

General & other

View repository

Updated 10-16 01:26

About this skill

openydt-flow-park-access — Vehicle Entry/Exit Workflow (SOP)

CRITICAL: Before starting, you MUST first use the Read tool to read ../openydt-shared/SKILL.md, to understand general conventions such as authentication / profile / signature / status codes / rate limiting / security. This skill only covers the orchestration of "how to get a vehicle into / out of the parking lot according to the real physical process",it does not restate the parameter tables of each command— for specific input and output parameters, see the respective domain skills.

When to use this skill (division of labor with domain skills)

  • Use this skill: when you want to get a vehicleend-to-endentry or exit, simulate real entry/exit, run through the entire chain, are unsure which command to call first, or encounter an error at some step and do not know how to continue.
  • Use domain skills(do not go through this workflow): only query one record / vehicles on site / lock a vehicle / only want to call a single command → [[openydt-record]](parking record domain),[[openydt-device]](device domain),[[openydt-billing]](payment domain).

Security prerequisites: entry/exit involveswrite operations(supplementary entry, capture, correction, payment, inventory),only rehearse in the test environment; for each write command, first --dry-run preview the signed request, and after confirmation add --yes. See the security conventions in openydt-shared for details.

Two concepts that must be understood first

1. The two entry paths are fundamentally different:

(a) Supplementary entry (b) Capture entry (simulating the real physical process)
Command supplement-parking-record-in channel-snap → (if the license plate is incorrect)correct-car-on-channel
Nature Forced entry, the vehicle will definitely enter Entry is not guaranteed
Capture log No capture record is generated Generated (it is itself a simulated capture)
Applicable The vehicle has actually entered but the platform missed the report, and a supplementary entry record is needed Rehearse the real physical entry process: capture → recognition → correction

2. Channel release mode (the most counterintuitive point): In capture entry, correct-car-on-channel successful correction ≠ the vehicle will definitely enter. Whether it actually enters depends onthe release mode of that channel— if the channel is set to "strictly prohibit temporary vehicle entry", after correction the vehicle alsowill notenter the parking lot. This is by design: the capture chain strictly simulates the real physical release logic. Therefore after correction,be sure to verify whether it is actually on site(see below); do not assume that it has entered just because correction is complete.

Entry workflow

First determine which path to use:If you only need the vehicle to exist in the records (forced) → (a) supplementary entry; if you need to rehearse the real capture-recognition-correction process → (b) capture.

(a) Supplementary entry (forced, the vehicle will definitely enter)

  1. (optional)openydt parking check-channel-exist-car Confirm whether the channel currently already has a vehicle, to avoid duplicate supplementary entry.
  2. openydt parking supplement-parking-record-in --yes: pass parkCode、carCode、enterTime、channelCode、carCodeType、carCodeColor、parkOrArea. The response returns the newly generated parkingCode。

    recordType / enterCarType When not passed, the CLI automatically fills in 1according to the platform documentation defaults, with no need to fill it in manually.

  3. Complete. Supplementary entry is a forced entry, and the record takes effect immediately. For parameter details, see [[openydt-record]]。

(b) Capture entry (simulates the real physical process; entry is not guaranteed)

  1. Capture:openydt device channel-snap --yes(pass parkCode、channelCode) to trigger a capture on the entry channel.

    Prerequisite: the channelhas a capture device; otherwise it returns resultCode=908 找不到设备, so switch to a channel that has a device.

  2. Determine the license plate: check whether the captured license plate is the target license plate.
    • If it is the target license plate → proceed to the release judgment before step 3.
    • If not → correct:openydt parking correct-car-on-channel --yes(pass parkCode、channelCode、newCarNo=target license plate,correctTime)。

      If it reports "session expired", it means the channel currently has no capture session that can be corrected, and you need tofirst successfully channel-snap before correcting.

  3. Verify whether it actually entered(key): use openydt parking get-park-on-site-car(pass parkCodeList + enterTimeFrom/enterTimeTo,time range is required) to check vehicles on site.
    • On site → entry succeeded.
    • Not on site → it is most likely because the channel'srelease mode prohibits temporary vehicles from entering, and correction will not make it enter; switch to (a) supplementary entry, or switch to a channel whose release mode allows it.

Exit process

Key prerequisite (most easily overlooked):correct-car-on-channel at the exit ≠ releasing the vehicle to exit. It only "simulates the exit device capturing a vehicle and triggering the exit processing flow". Whether the vehicle actually leaves depends on release mode × payment status:

  • Automatic release + fully paid → the system automatically releases, and the vehicle exits (the backend closes the loop within about a few seconds to leaveType=1)。
  • Manual release(or still owing fees) → the vehicle is stopped,correct still returns status=1 butthe vehicle does not exit, and the gate needs to be opened separately (see step 4). Thereforefirst pay the fee in full, then capture and correct; correct returning status=1 does not mean the vehicle has left,be sure to use get-car-out-list/get-park-on-site-car to verify。
  1. Check fee:openydt trade get-park-fee(pass carCode + parkCode)。
    • see data.shouldPayValue(Unit: yuan,1 means 1.00 yuan, not 1 cent); take parkingCode、chargeDate、otherAttr for payment callback.

    After checking the fee, within 10 minutespayment must be completed, otherwise the token/bill becomes invalid.

  2. Pay the fee in full (ask first, then act):shouldPayValue>0 whenmust first pay in full, otherwise automatic release will not release the vehicle either.
    • First ask the user "Do you need to pay? What payment method?"——Payment is a real write operation; do not execute it silently.
    • openydt trade pay-park-fee --yes, return parkingCode、chargeDate、actPayCharge(if fully paid, = shouldPayValue, unit: yuan),payOrigin、paymentMode, unique billCode. 0-yuan settlement with voucher (actPayCharge=0 + pass through otherAttr as-is) see [[openydt-billing]]。
    • Verify after payment is cleared get-park-fee the shouldPayValue=0。
  3. exit capture + correction:
    • openydt device channel-snap --yes(parkCode、channelCode=exit channel) → captures "unrecognized NNNNN".
    • openydt parking correct-car-on-channel --yes(newCarNo=target vehicle + correctTime)。

    Prerequisite: this exithas a capture device, and usually needs to bethe exit paired with the entry channel; otherwise channel-snap reports 908 找不到设备. ⚠️ correct occasional resultCode=908 会话已过期: this isintermittent server-side failure(same exit, same command sometimes succeeds and sometimes fails; suspected transient gateway/backend session),not TTL, unrelated to speed。if encountered, retry or try another time, do not conclude from this that "exit is impassable".

  4. Verify + open gate as needed:
    • openydt parking get-car-out-list(carNo + leaveStartTime/leaveEndTime) finds leaveType=1 and get-park-on-site-car count→0 → automatic release site,closed loop, end。
    • If correct succeeds but the vehicle is still on site → most likelymanual release: call openydt device op-gate --yes(parkCode、channelCode、opType=0 open,operator、operateTime) or cloud parking lot openydt device cloud-open-gate --yes(channelId numeric ID,opType=0) release vehicle, then verify the exit record.

Regarding inventory departure inventory-car:⚠️ is a no-op for vehicles entering via open platform capture/supplementary entry(returns status=1 but the vehicle does not leave, getInventoryRecord has no record),not a reliable exit fallback. For physical exit, prioritize the above "payment cleared → exit snap+correct → (if manual release then open gate)".

Cross-command hard constraints and failure quick reference

Symptom / Constraint Meaning Handling
channel-snap reports resultCode=908 找不到设备 this channel has no capture device switch to a channel with a capture device
correct-car-on-channel reports 908 会话已过期 intermittent server-side failure(not TTL, unrelated to speed, sometimes succeeds and sometimes fails) retry / try another time; only after snap succeeds is there a session to correct
after capture entry correction the vehicle is not on site channel release mode prohibits temporary vehicle entry switch to supplementary entry, or switch to a channel whose release mode allows it
exit correct returns status=1 but the vehicle does not exit by design: still owes fees, or exit manual release first clear the fee; for manual release sites use op-gate/cloud-open-gate to open the gate
inventory-car returns success but the vehicle does not leave for capture/supplementary entry vehicles no-op(cannot match) do not use it as an exit fallback; use "payment cleared + exit snap + correct"
Amount understanding shouldPayValue/actPayCharge units such asyuan do not treat 1 as 1 cent
fee query token after fee query, payment must be made within 10 minutes if timed out, query fee again

command attribution (see each domain skill for parameters)

  • Entry backfill / correction / on-site verification / inventory → [[openydt-record]]
  • Snapshot channel-snap → [[openydt-device]]
  • Fee inquiry get-park-fee / Payment pay-park-fee → [[openydt-billing]]

Entry and exit are cross-domainprocess; the input parameters, output parameters, and enumeration values of a single command are all subject to the above domain skills, and this skill is only responsible for chaining them together in the correct order and constraints.