From 8b1f851add2f21843c7bf41103bf49220f46b691 Mon Sep 17 00:00:00 2001 From: Julian Cuni Date: Sat, 14 Nov 2026 11:08:36 +0100 Subject: [PATCH] wiki: ZKTeco CMP200 barrier page, close-input wiring; park-lab reinstall gotchas - entities/zkteco-cmp200-barrier: terminal map from the CMP200 manuals, board photo findings (v1.2 layout, RS485 socket empty), relay-contact drive from the Dingtian, interlocked close relay, limit outputs as status inputs - concepts/passage-confirmation: barrier model open question answered for the unit on hand - decisions/appliance-provisioning: Komodo gotchas 14-16 from the park-lab reinstall (2026-11-13) - index and log entries Co-Authored-By: Claude Fable 5.2 Claude-Session: https://claude.ai/code/session_01RZgP5ofaSqgLGHMGSL3xYN --- wiki/concepts/passage-confirmation.md | 4 +- wiki/decisions/appliance-provisioning.md | 17 +++++ wiki/entities/zkteco-cmp200-barrier.md | 95 ++++++++++++++++++++++++ wiki/index.md | 1 + wiki/log.md | 30 ++++++++ 5 files changed, 146 insertions(+), 1 deletion(-) create mode 100644 wiki/entities/zkteco-cmp200-barrier.md diff --git a/wiki/concepts/passage-confirmation.md b/wiki/concepts/passage-confirmation.md index 6c17df5..e318f44 100644 --- a/wiki/concepts/passage-confirmation.md +++ b/wiki/concepts/passage-confirmation.md @@ -110,7 +110,9 @@ credentials. Nothing of park-lab's device registry has a camera yet (only the re - Window cap and "lane clear" dwell before a close (start: cap 60 s, dwell 3 s). - Does the DS-2CD1043G2-LIU keep pushing VMD for a car *reversing*? (It should — motion is motion.) - Stream-to-event latency and frame drop rate on the booth PC (measure, don't assume). -- Which barrier operator model is at the sites, and does park-lab have one for steps 1–6? +- Which barrier operator model is at the sites? The unit on hand is a [[zkteco-cmp200-barrier]]: + its close input is `DOWN` (dry contact to `G`), and the manual says `DET`/`PHO` reverse a falling + boom — steps 1–3 can be run on it. Related: [[lane-presence-and-anpr-entry]], [[barrier-not-a-door]], [[entry-double-press]], [[append-only-event-chain]], [[opencv-anpr-service]], [[park-2-event-loop-stall]]. diff --git a/wiki/decisions/appliance-provisioning.md b/wiki/decisions/appliance-provisioning.md index ac5913a..fd3eebe 100644 --- a/wiki/decisions/appliance-provisioning.md +++ b/wiki/decisions/appliance-provisioning.md @@ -605,3 +605,20 @@ board) and the SSD went into another OptiPlex 7070: throughout (Periphery restarting itself never touches the already-running compose stack). **Always dry-run a version bump on a lab/dev box before a live booth**, even with a clean release-notes check — this project only had one lab box to test against and used it first. +14. **`Failed to login to image registry … Os { code: 2, kind: NotFound }` on Deploy = Docker is + not installed on the booth** (or `docker` is not on Periphery's PATH), NOT a credentials + problem. Periphery spawns `docker login`; the OS error is the missing executable. Periphery + onboards and shows green in Core without Docker, so the first sign is this deploy failure + (park-lab reinstall, 2026-11-13). §6 comes before §7 — do not skip it. +15. **Periphery goes under `admin`, never the operator/desktop account.** It needs the `docker` + group (root-equivalent) and linger; putting either on the auto-login account hands the + remote-exec agent to the adversary of [[threat-model]] (§5c). An install made from the wrong + account (park-lab, 2026-11-13, from the desktop user) is removed there (`systemctl --user + disable --now periphery`, delete its unit, binary, `~/.config/komodo`, `~/.komodo`) and + re-onboarded from `admin` with a new onboarding key and the same `--connect-as`. +16. **`permission denied … docker.sock` in Periphery's log although `admin` IS in `docker`:** + linger starts `admin`'s user manager at boot, so a manager started before `usermod -aG docker + admin` keeps the old group list, and so does every unit it launches. A fresh SSH login shows + the group; Periphery does not (`grep ^Groups /proc/$(pgrep -x periphery)/status` lacks the + docker gid). Restarting Periphery is not enough: `sudo systemctl restart user@$(id -u + admin).service` or reboot (park-lab, 2026-11-13). diff --git a/wiki/entities/zkteco-cmp200-barrier.md b/wiki/entities/zkteco-cmp200-barrier.md new file mode 100644 index 0000000..ce9f2ac --- /dev/null +++ b/wiki/entities/zkteco-cmp200-barrier.md @@ -0,0 +1,95 @@ +--- +type: entity +tags: [parking, hardware, barrier, relay, wiring] +sources: [] +updated: 2026-11-14 +--- + +# ZKTeco CMP200 Barrier Gate + +The boom barrier on hand. Its mainboard (silkscreen on our unit: `TT-DZ-200504E-A1`) drives an +**AC capacitor-start motor** through on-board relays; limits are Hall switches. Mains 110/220 V AC, +100 W rated. Not to be confused with the [[zkteco-controller]] (access panel, rejected). + +Web research 2026-11-14. Sources: ZKTeco CMP200 user manual v1.0 (2019) and v1.2 (March 2022), +wiring diagrams read from the PDFs: +, +. +No public document names the `TT-DZ-200504E-A1` board, but a photo of our unit (user, 2026-11-14) +matches the **v1.2** layout: `MOTOR UP/COM/DOWN`, `COM/RED/GREEN`, `L/N/E`, `O.LM OUT`, `C.LM OUT`, +`STOP/DOWN/UP/STUDY` keys, status LEDs, and a 2x8 socket marked `RS485`. MCU is an **STC 15W408AS** +(8051 family); on-board transformer 220 V to 12 V / 600 mA; PCB date code 230602. The labels of +the low-voltage terminals sit under the plug-in connectors and were not visible — pull the plugs +to confirm them against the table. + +## Terminal map (manual) + +| Terminal | Function | Signal | +| --- | --- | --- | +| `G` / `STOP` / `DOWN` / `UP` | "Line-controlled interface": wired open/close/stop | dry contact, short to `G` | +| `G` / `DET` | vehicle (loop) detector | dry contact to `G` | +| `G` / `PHO` | infrared / "crash proof" sensor | dry contact to `G` | +| `CAR` (v1.2 only) | "count input" | dry contact to `G`; behaviour undocumented | +| `RS485 B / A / G` (v1.2 only) | "communication module" | see below | +| `+12V` / `G`, `+5V` / `G` | auxiliary supply | 12 V total under 100 mA | +| `O.LM OUT`, `C.LM OUT` | open-limit and close-limit relay outputs | volt-free NO/COM/NC each | +| `G` / `C.LM` / `O.LM` | external limit junction | — | +| `MOTOR UP/COM/DOWN`, `LAMP COM/RED/GREEN`, `L/N/E` | motor, AC traffic lamp, mains | **mains voltage** | + +The v1.0 board has no RS485 and no `CAR`. The 4-pin `REMOTE` header takes the 433 MHz receiver. + +## Behaviour the manual states + +- `UP` during a fall reverses to rising at once. `DOWN` during a rise is ignored. `STOP` halts. +- `PHO` shorted during a fall: reverse to open, then **stay open**. +- `DET` shorted during a fall: reverse to open, then **close automatically** when released. `DET` + shorted while open or rising: the boom **falls by itself** once the detector clears. So `DET` is + both anti-smash and auto-close-after-passage, done in the barrier's own firmware. +- Timeout protection stops the motor if a travel exceeds the rise/fall time. +- No menu, no parameters, no auto-close timer are documented. Power-loss behaviour is not stated + beyond "manual release motor" — the boom does not lift by itself. + +## Driving it from the [[dingtian-relay]] + +**Relay contact, not RS485.** ZKTeco's own integration drawings (LPR camera, inBio260) wire a relay +`COM → G` and `NO → UP`. That is exactly our `pulseOpen`: one Dingtian relay, `COM` to `G`, `NO` to +`UP`, jogged. It expresses intent only and never times a close ([[barrier-not-a-door]]). + +- **Closing** normally comes from the loop/radar on `DET`, in barrier firmware. Without a vehicle + tripping `DET` the boom stays up — the abandoned-entry free pass of [[passage-confirmation]]. +- **Host close (only under [[passage-confirmation]]'s conditions):** a second relay on `DOWN`, + interlocked in series so it is dead while the open relay is active — relay 1 `COM → G`, + `NO → UP`, `NC →` relay 2 `COM`; relay 2 `NO → DOWN`. Never one relay with `NC → DOWN` (a + permanent close command; closes on controller power loss). Per the manual a `DET` or `PHO` + contact reverses a falling boom, so the close is not blind **if a detector is fitted** — to be + proven on the unit (test plan steps 2–3 there) before any use. +- **Status back to the host:** `O.LM OUT` and `C.LM OUT` are volt-free contacts, so they can go + straight onto two Dingtian inputs (contact to GND, like the button). That gives the host a real + "boom reached open / closed" signal for [[device-status-monitoring]] and for the anomaly "boom + opened with no signed host command" ([[threat-model]]). +- **Sharing a detector:** a radar/loop with one dry contact cannot feed both `DET` and a Dingtian + input directly (two different supplies on one contact). Use a detector with two relay outputs + or an interposing relay. +- Keep the low-voltage terminals apart from the mains block on the same board edge. + +**RS485 — not a usable path today.** + +1. The barrier's RS485 protocol is **undocumented**. The manual labels the terminals and a plug-in + "RS485 communication module" header and says nothing else: no baud, no address, no frames. On + our board the **socket is empty — no module fitted**, so the `B/A/G` terminals have no + transceiver behind them and are dead as shipped. Manuals for similar Chinese `DZ`-family boards show + a 4-byte, 9600 bps, XOR-checksum frame, but nothing ties that to this board — unverified. +2. The Dingtian's RS485 port is an **inbound control channel** (Modbus-RTU / Dingtian string: a + master commands the Dingtian). Stock firmware is not documented as an RS485 master or an + Ethernet-to-RS485 bridge, and our `harden()` disables that channel. `(unsourced beyond the + programming manual's protocol list — check the vendor manual before relying on either way)` +3. A serial "open" command would also be an unauthenticated open path on a wire in the lane + cabinet — worse than the password-carrying relay frame we already have. + +## Open + +- Pull the low-voltage plugs and read the silkscreen under them (`G DET CAR +12V G +5V G C.LM O.LM` + and `G STOP DOWN UP / B A G / G PHO` expected). +- What `CAR` does (probably queues several opens for a convoy) — test on the bench. +- Fail-state: on power loss the boom holds position, so "exit fails open" ([[fail-state-safety]]) + needs the manual release or a UPS, not this board. diff --git a/wiki/index.md b/wiki/index.md index 25bf391..3886fa2 100644 --- a/wiki/index.md +++ b/wiki/index.md @@ -46,6 +46,7 @@ Counts: 4 sources · 19 entities · 47 concepts · 9 decision records. - [[dingtian-dt008-reader]] — Dingtian DT-008 QR/RFID reader on hand; HTTP-GET push, server replies the verdict; ⚠️ our two units read disjoint card sets (125 kHz vs 13.56 MHz) — unresolved, see open question #18. - [[zkteco-controller]] — ❌ rejected/historical; aux-input path was a contender, not pursued. - [[dingtian-relay]] — ✅ CHOSEN access controller; decoupled inputs solve the button blocker (driver verified on hardware); spare relays drive aux outputs (`setAux`). +- [[zkteco-cmp200-barrier]] — the boom barrier on hand: mainboard terminal map, relay-contact drive from the Dingtian, limit outputs as status inputs; RS485 undocumented. - [[relay-proxy-firmware]] — RETIRED 2026-10-23 (mini PCs instead). PoC (2026-10-22): NodeMCU firmware that IS a DT-R004 to the booth (binary/string UDP, config CGI, userset, Digest push) + cloud heartbeat/command/watchdog (power-cycles the PC). Verified against the emulator and end to end at park-lab (2026-10-22, after the ufw rule). - [[dahua-ipc-hfw2549t]] — first Dahua on the bench (IPC-HFW2549T-AS-IL, fw 2.880, 2026-09-17): the driver's channel decrement gave HTTP 400 (channels are 1-based — fixed + verified live); Dahua clock-sync built (`global.cgi`, naive wall time); events = held `eventManager attach` multipart stream, verbatim `VideoMotion Start/Stop` + `TimeChange` parts captured, subscriber not built; `RealUTC` is the camera's belief of UTC; 5-strike login lockout. - [[hikvision-radar]] — vehicle-presence radar on a Dingtian input; the entry presence gate (per-input active-level caveat). diff --git a/wiki/log.md b/wiki/log.md index 8a29291..a0a483a 100644 --- a/wiki/log.md +++ b/wiki/log.md @@ -3631,3 +3631,33 @@ sub-stream watcher, tracker over the existing YOLOX boxes, drawn segment, three lane-free on passage, evidence-driven close (standing decision to be revised after park-lab tests). Measured in park-lab's vision container: YOLOX-S@640 = 132/79/66 ms per frame at 2/4/6 threads; decode negligible. Stream test blocked: lab Dahua off, office Hikvisions need credentials. + +## [2026-11-13] deploy | park-lab reinstalled from scratch — three Periphery/Docker gotchas + +Fresh OS on park-lab; stack `stage-73ada89` deployed and healthy (proxy, server, vision). Three +failures on the way, filed as Komodo gotchas 14–16 in [[appliance-provisioning]]: registry login +`Os { code: 2 }` = Docker not installed; Periphery installed from the desktop account instead of +`admin` (removed, re-onboarded from `admin`); `docker.sock` permission denied because the lingering +user manager predated the `docker` group membership (fixed by reboot). Open on the box: the desktop +account still holds `sudo`, `lxd`, `lpadmin`, `adm` — §5c demotion not yet applied. + +## [2026-11-14] query | ZKTeco CMP200 barrier — wiring and Dingtian drive (web research) + +Read the CMP200 manuals v1.0 and v1.2 (wiring diagrams). Drive = one Dingtian relay `COM→G`, +`NO→UP` (ZKTeco's own LPR/inBio drawing); close comes from the detector on `DET` in barrier +firmware; `O.LM`/`C.LM` volt-free outputs can feed Dingtian inputs as boom status. RS485 on the +v1.2 board is undocumented and the Dingtian RS485 is an inbound control port — not a path. The +board marking `TT-DZ-200504E-A1` appears in no public document. Filed: [[zkteco-cmp200-barrier]]. + +## [2026-11-14] query | CMP200 mainboard photo — v1.2 layout, RS485 socket empty + +User photo of the `TT-DZ-200504E-A1` board: matches the manual's v1.2 layout; MCU STC 15W408AS; +the `RS485` 2x8 socket carries no module, so the RS485 terminals are dead as shipped. Relay-contact +drive stands. Updated [[zkteco-cmp200-barrier]]. + +## [2026-11-14] query | CMP200 close input for the abandoned-entry close + +User raised the abandoned ANPR entry (boom left up, next car enters free) — the case +[[passage-confirmation]] already covers. Recorded on [[zkteco-cmp200-barrier]]: close input is +`DOWN`; wiring is two relays with a series interlock, never one relay `NC → DOWN`. Answered the +"which operator model" open question on [[passage-confirmation]] for the unit on hand.