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-runpreview 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)
- (optional)
openydt parking check-channel-exist-carConfirm whether the channel currently already has a vehicle, to avoid duplicate supplementary entry. openydt parking supplement-parking-record-in --yes: passparkCode、carCode、enterTime、channelCode、carCodeType、carCodeColor、parkOrArea. The response returns the newly generatedparkingCode。recordType/enterCarTypeWhen not passed, the CLI automatically fills in1according to the platform documentation defaults, with no need to fill it in manually.- 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)
- Capture:
openydt device channel-snap --yes(passparkCode、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. - 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(passparkCode、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-snapbefore correcting.
- Verify whether it actually entered(key): use
openydt parking get-park-on-site-car(passparkCodeList+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-channelat 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,
correctstill returnsstatus=1butthe 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 returningstatus=1does not mean the vehicle has left,be sure to useget-car-out-list/get-park-on-site-carto verify。
- Check fee:
openydt trade get-park-fee(passcarCode+parkCode)。- see
data.shouldPayValue(Unit: yuan,1means 1.00 yuan, not 1 cent); takeparkingCode、chargeDate、otherAttrfor payment callback.
After checking the fee, within 10 minutespayment must be completed, otherwise the token/bill becomes invalid.
- see
- Pay the fee in full (ask first, then act):
shouldPayValue>0whenmust 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, returnparkingCode、chargeDate、actPayCharge(if fully paid, =shouldPayValue, unit: yuan),payOrigin、paymentMode, uniquebillCode. 0-yuan settlement with voucher (actPayCharge=0 + pass through otherAttr as-is) see[[openydt-billing]]。- Verify after payment is cleared
get-park-feetheshouldPayValue=0。
- 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-snapreports908 找不到设备. ⚠️ correct occasionalresultCode=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". - Verify + open gate as needed:
openydt parking get-car-out-list(carNo+leaveStartTime/leaveEndTime) findsleaveType=1andget-park-on-site-carcount→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=0open,operator、operateTime) or cloud parking lotopenydt device cloud-open-gate --yes(channelIdnumeric 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/ Paymentpay-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.