Commit Graph

436 Commits

Author SHA1 Message Date
julian 52354d194a feat(cameras): large view opens in the tile's state (live tile → Live on the same stream, idle tile → Snapshot)
Build & push images / images (push) Successful in 3m56s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RZgP5oMncSaVmKRKk1UvN4
2026-11-17 15:57:35 +01:00
julian 4fd5bf852e bump(resources): park-lab to stage-2c3bdb7 (camera tiles: green LIVE badge, large view with live-on-demand and Live/Snapshot switch)
Build & push images / images (push) Successful in 3m26s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RZgP5oMncSaVmKRKk1UvN4
2026-11-17 14:25:52 +01:00
julian 2c3bdb7f34 wiki: camera live view — large view, Live/Snapshot switch, when the stream stops
Build & push images / images (push) Successful in 3m31s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RZgP5oMncSaVmKRKk1UvN4
2026-11-17 14:14:20 +01:00
julian 301aefc186 feat(cameras): green pulsing LIVE badge; large view with live-on-demand and a Live/Snapshot switch
Clicking a tile's picture opens a large view that streams live on demand (vehicle event
or not), with a Live / Snapshot switch — a camera-started stream can be stopped to see the
last snapshot, and a snapshot can be switched to live. Closing the view returns the tile to
automatic: a user-started stream stops, a camera-started one carries on in the tile. The
tile and the large view share one live socket. Live is marked by a pulsing green badge.

Verified in headless Firefox against the park-lab cameras.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RZgP5oMncSaVmKRKk1UvN4
2026-11-17 14:14:20 +01:00
julian d893f4e991 bump(resources): park-lab to stage-c6087b9 (booth camera tiles: snapshot at rest, live MJPEG video while a vehicle is in view)
Build & push images / images (push) Successful in 3m49s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 12:56:49 +01:00
julian c6087b990c wiki: camera live view decision; MJPEG install step; park-lab camera addresses vs 11-15 record
Build & push images / images (push) Successful in 4m31s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 12:48:50 +01:00
julian 39fb5fb7c2 feat(cameras): booth camera tiles — latest snapshot at rest, live video while a vehicle is in view
Footer camera chips open/close a tile per camera (bottom right, ~15% wide, stacking
leftwards); the open set is a per-user preference (users.open_cameras). A tile shows the
camera's newest entry/exit snapshot and switches to live video while that camera pushes
vehicle events (per-camera activity, same 30 s TTL as lane status).

- devices: RTSP MJPEG client + RFC 2435 RTP/JPEG reassembly; Hikvision openLiveStream()
  on the sub-stream (x02, must be MJPEG — H.264 is refused with that reason)
- server: CameraLiveHub (one shared upstream per camera, latest-frame delivery, fps cap,
  linger, backoff), CameraActivity, /api/cameras/:id/latest-snapshot, WS
  /api/cameras/:id/live (shared handshake auth with /api/ws + device:read),
  PUT /api/auth/open-cameras, migration 0033 (open_cameras + snapshot device/time index)
- web: CameraDock, footer toggles, binary frames in the platform socket (Tauri too)
- .gitattributes: *.jpg / *.bin binary (byte-exact test fixtures)

Verified on park-lab cameras end to end and in headless Firefox.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 12:48:50 +01:00
julian b6f7ea65a4 wiki: G2 camera bench test and park-lab rig; Dingtian session check on sw V3.1.6236A
- lpr-camera: DS-2CD1043G2-LIU (4MP) and DS-2CD1083G2-LIU (8MP) both serve
  main-stream ISAPI snapshots; only concurrent pulls 503
- passage-confirmation: park-lab rig (entry .6, exit .7, one shared lane),
  camera capabilities, shared-lane open question
- dingtian-relay: 'config api timeout' = HTTP session check on; works with the
  session cookie on this firmware; resolution and triage

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-17 11:32:22 +01:00
julian 6978f9e406 fix: update MODULES_ENTITLED to only include parking
Build & push images / images (push) Successful in 4m29s
2026-11-16 07:58:15 +01:00
julian 8b1f851add 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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RZgP5ofaSqgLGHMGSL3xYN
2026-11-14 11:08:36 +01:00
julian 13ba593b69 schema cleanup
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-09 19:02:39 +01:00
julian f4dd248e16 chore: .gitattributes with eol=lf after the Windows to Linux migration
Text files normalised to LF; images, icons, fonts and PDFs marked binary;
wiki/raw/ left byte-for-byte (one legacy SQL source is committed with CRLF).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-07 10:43:15 +01:00
julian 580412aa50 wiki: passage-confirmation design and stage-73ada89 deploy notes (2026-10-24)
Wiki pages written on 2026-10-24 but left uncommitted before the Windows to
Linux migration: passage-confirmation concept, open question 20, deploy and
query log entries, index line, incident and barrier page updates. Drops the
stray tracked __pycache__ file. Line endings normalised to LF.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-07 09:38:32 +01:00
julian f5f8865309 bump(resources): park-2 to stage-73ada89 (bounded active-sessions cost, hot-path indexes, deferred UDP timeout; verified on park-lab)
Build & push images / images (push) Successful in 3m17s
2026-10-24 11:26:53 +02:00
julian 44e095cb95 bump(resources): park-lab to stage-73ada89 (bounded active-sessions cost, hot-path indexes, deferred UDP timeout)
Build & push images / images (push) Successful in 3m15s
2026-10-24 11:18:16 +02:00
julian 73ada89a13 fix(server): bound active-sessions cost, index hot paths, no phantom relay timeouts
Build & push images / images (push) Successful in 3m45s
park-2 (2026-10-24): GET /api/sessions/active ran ~2 s synchronously — PayStation.activeSessions
called quote() per open unpaid transient (664 rows), each 3-4 unindexed ledger_events scans by
identity — 2234x/day. The frozen event loop made the Dingtian driver's 2 s timer fire before the
already-received UDP reply (timers run before poll I/O), so healthy pulses logged "timeout"; the
subscription flow then unwound before firing the camera or writing the sessions row, leaving
signed entries with no snapshot. Cost grew ~120 ms/day with the operator's open-ticket count.

- pay-station: price every list row from the one ledger scan (rows grouped per identity ->
  #quoteFromRows); tariff resolver built once per request; quote(identity) wraps the same core.
  validations: sessionValidationsFromRows / liveValidationsFromRows. Test pins list == quote().
- db 0032_hot_path_indexes: ledger_events(identity,index), device_events(category,kind,
  occurred_at), device_events(kind,occurred_at), snapshots(identity), sessions(state),
  sessions(subscription_id,state). Additive.
- access-dingtian binaryUdp: defer the timeout rejection with setImmediate so a datagram that
  already arrived wins over an expired timer.
- subscription-flow: snapshot fired and session cache written/closed BEFORE the pulse.

wiki/concepts/park-2-event-loop-stall.md has the full analysis.
2026-10-24 11:17:30 +02:00
julian 6eb65361a8 docs(wiki): park-2 event-loop stall incident + bounded-request-cost decision; Dingtian firmware retired, dev-board pinout, edge-controller memo
- concepts/park-2-event-loop-stall: /api/sessions/active ~2 s synchronous (quote() per open
  unpaid transient x664, unindexed ledger scans) froze the loop; Node runs expired timers before
  queued UDP replies, so healthy Dingtian pulses reported "timeout" and signed entries lost
  their snapshot/session row. Standing decision: bounded request cost whatever the operator data.
- Dingtian: custom firmware retired (2026-10-23), runbook shelved, vendor pinout in raw/,
  relay-proxy PoC marked retired; edge-controller hardware memo (open).
2026-10-24 11:17:30 +02:00
julian c08e232339 feat(firmware): relay-proxy PoC — NodeMCU as a Dingtian DT-R004 + cloud proxy/watchdog
A NodeMCU v3 (ESP8266) that speaks the Dingtian wire contract (binary UDP 60000 with
relay_pw, string UDP 60001, config CGI incl. the setconfig gotcha, userset.cgi, Digest
input push) so the booth's existing driver needs no change, plus a heartbeat/command/
watchdog path to an ephemeral cloud stand-in (poc/cloud-standin.mjs). Verified at park-lab:
the booth's assign flow configured it like real hardware and a button press reached the
booth (401→Digest→200) and the cloud with the booth's status. Watchdog probes /health and
power-cycles the PC via a spare relay with backoff. IO behind one interface for the ESP32/
Dingtian port.

wiki: relay-proxy-firmware page; esp32-flashability-test runbook (esptool lock test);
dingtian-relay "can we flash our own firmware" (vendor locks the standard SKU);
site-device-installation: booth ufw must allow device-net → 3000 (push targets PORT, not
Caddy's 80); open-questions: cloud takeover vs signed ledger (parked).

.gitignore: firmware venv/.pio/secrets.h.
2026-10-22 12:08:20 +02:00
julian e842f036e2 feat(komodo): park-lab stack on its own 7070 (server park-lab, all modules); wiki: GRUB CLASS lines, dell-wmi-sysman admin password
Build & push images / images (push) Successful in 2m56s
- resources.toml: repoint the park-lab stack from art-docker-station to the
  dedicated park-lab Periphery; drop the shared-host port remaps
  (HTTP_PORT/SERVER_PORT/VISION_HOST_PORT); entitle every registered module
  (parking,validation,carwash); pin TAG=stage-9659373 (park-2's image).
- appliance-provisioning §5: both CLASS= lines in /etc/grub.d/10_linux work
  for --unrestricted (the else-branch interpolates the first); submenu stays
  restricted; conffile note.
- appliance-provisioning §1: authentication/Admin/is_enabled=1 means a BIOS
  admin password IS set; writes without it fail "Operation not supported",
  wrong ones "Permission denied"; feed it via read -rs.
- fleet-deployment-komodo: park-lab back on a dedicated box (2026-10-20),
  preflight list (docker group, periphery enable + linger, reboot so the user
  manager picks up the group), destroy the old stack on the previous host.
2026-10-20 17:15:35 +02:00
julian 005447f938 docs(wiki): park-2 host failure (Dell 2,7), AC Recovery/Block Sleep BIOS rules, SSD-to-replacement-PC runbook 2026-10-17 18:32:45 +02:00
julian 06d9297e9a bump(resources): park-2 to stage-9659373 (same-code read debounce, per-reader window)
Build & push images / images (push) Successful in 2m56s
2026-10-11 19:03:54 +02:00
julian 965937352d fix(readers): never replay a failed read decision; bound the recent-reads map
Build & push images / images (push) Successful in 3m3s
Follow-up to ec01591. A first decision that threw was cached and replayed
to repeats inside the window, and the telemetry hook on it had no rejection
handler, so one throwing flow became an unhandled rejection per repeat. A
failed decision is now forgotten (the next read decides afresh) and the
hook handles rejection. The recent-reads map prunes above 512 entries and
never exceeds 4096, whatever a misbehaving reader sends.
2026-10-11 18:58:10 +02:00
julian ec015911e9 feat(readers): same-code debounce at the dispatcher, per-reader window (default 5000 ms)
Build & push images / images (push) Successful in 3m7s
park-2, 2026-10-11: the DT-008 entry reader reported one card twice 560 ms
apart; the permit flow opened two sessions on the same permit and pulsed the
barrier twice (caught by the new relay-pulse log). The 24h before showed
2 entry + 2 exit opens within 2 s of the previous one.

ReadDispatcher now treats the same value from the same reader inside the
reader's debounceMs window as ONE presentation: the first verdict is replayed
(same beep, no second decision, nothing signed twice) and the repeat lands in
device_events as unsigned telemetry. Every lane and every credential kind,
so a ticket re-scanned at exit inside its grace period no longer signs a
noSession refusal for a car that just left. The window slides with repeats;
a repeat arriving while the first read is still deciding gets that decision.

The window is a Setup field on all three reader drivers ("Same-code
debounce (ms)", default 5000, 0 = off); readers configured before the field
existed get the default.
2026-10-11 18:55:29 +02:00
julian c94269379e bump(resources): park-2 to stage-d93089a (relay pulse log, camera clock zone, ANPR every-frame loop)
Build & push images / images (push) Successful in 3m21s
2026-10-11 18:23:36 +02:00
julian d93089a491 feat(anpr): read every frame, settle every plate, debounce per plate
Build & push images / images (push) Successful in 3m9s
Measured on park-2 (i5-9500): a main-stream pull is ~0.1s and /analyze
~0.25s while the host sat under 3% CPU; the loop's fixed 1s sleep was the
limit (one frame per ~1.35s). The camera's picture endpoint is single-
threaded (4 parallel GETs -> two 503s) and the vision service serialises
inference, so no threads: pulls are back-to-back and serial per camera,
~3 fps. ANPR_POLL_MS is now a floor (default 0).

The loop no longer breaks on the first confident plate, and the 12s
camera-level debounce is gone: 40 of 57 plate-driven opens at park-2 had a
push dropped in that blind window, so a tailgating car was never looked at.
Each confident plate is settled once per loop (emit / anpr-skip / decline)
and the loop runs on while the camera keeps pushing, so a second car is
read by the same loop. Debounce is keyed deviceId:plate only; the card/QR
mid-poll guard is per subscriber instead of aborting the loop; the pass
sample is one per plated car. ANPR_POLL_WINDOW_MS=0 is honoured (it used to
fall back to 8s silently).

The camera event model was re-confirmed from 2780 pushes: every push is an
independent VMD/active with activePostCount=1, ~1.2s apart while a car
moves, never inactive. Nothing is held for 30s on the camera side.
2026-10-11 18:17:25 +02:00
julian 7b29331f52 fix(devices): Hikvision clock sync owns the time zone (fixed offset, re-set at DST edges)
park-2's cameras burned Beijing time into every frame: factory zone CST-8,
and the sync compared instants only, so zero drift meant the zone was never
touched. The G3H firmware also accepts a POSIX zone with a DST rule, echoes
it back, and ignores the rule.

syncClock now derives the site's current UTC offset as a fixed Hikvision
zone (hikvisionFixedZone) and rewrites it when it differs, sending the clock
with it. The device monitor adds a third trigger beside offline->ready and
the 24h backstop: the moment the site's UTC offset changes, so a DST switch
is handled within one poll. ClockSyncResult reports zoneChanged/timeZone.

Both park-2 cameras were set to CST-2:00:00 by hand on 2026-10-09; this
must be deployed there before 2026-10-25 or the OSD reads 1h ahead from
that day until it is.
2026-10-11 18:17:25 +02:00
julian 9332802e5d feat(server): log every relay pulse and echo it to device_events (kind relay)
One pulse path, pulseBarrier (relay-pulse.ts), for all six callers: entry
button/operator mint, reader and booth exits, subscription opens, manual
(forgiven) exits and the setup relay test. Each pulse writes an info line
naming relay, controller, direction, identity and operator, and inserts a
device_events row of kind "relay" for success and failure alike; failures
are still re-thrown so each flow keeps its own anomaly handling.

Prompted by the 2026-10-09 park-2 "barrier opened by itself" claim: the
ledger showed the why, but nothing recorded the moment a relay was actually
driven. The signed ledger stays the authority; this is unsigned telemetry.

Also git-ignores tmp/ (site snapshots pulled for incident review).
2026-10-11 18:17:25 +02:00
julian a86af4eb20 bump(resources): park-2 to stage-2ac26b5 (exit tile is the manual-exit control)
Build & push images / images (push) Successful in 3m22s
2026-10-09 09:24:00 +02:00
julian 2ac26b5825 feat(booth): the exit lane light is the manual-exit control — two tiles, Hyrje and Dalje Manuale
Build & push images / images (push) Successful in 3m20s
BarrierLight gains onOpen/opening (not presence-gated). For an operator with
barrier:create + own shift the exit tile is labelled 'manual exit', clickable and
opens the manual-exit dialog while still showing the lane state; for everyone else it
stays the plain 'Dalje' light. The separate ghost button is removed. Wiki as-built note.
2026-10-09 09:17:16 +02:00
julian 3f903cdbdd bump(resources): park-2 to stage-ffcf0d3 (manual-exit wording)
Build & push images / images (push) Successful in 3m12s
2026-10-09 09:06:25 +02:00
julian ffcf0d3eda fix(i18n): update Albanian translations for manual exit functionality
Build & push images / images (push) Successful in 3m7s
2026-10-09 09:02:59 +02:00
julian e3b3a636e2 fix(i18n): update wording for manual exit in English and Albanian translations
Build & push images / images (push) Successful in 3m10s
2026-10-09 08:46:34 +02:00
julian 55c9c33432 bump(resources): park-2 to stage-82e5833 (manual-exit dialog + wording)
Build & push images / images (push) Successful in 3m15s
2026-10-09 08:41:41 +02:00
julian 82e5833e4e feat(exit): manual-exit dialog + wording — styled modal replaces window.prompt; copy says 'manual exit' / 'dalje manuale'
Build & push images / images (push) Successful in 3m13s
- BoothScreen: the no-ticket open uses the app's Modal (explainer, optional reason,
  red confirm; Enter confirms, Escape/Cancel abort) instead of a browser prompt.
- en/sq: forgive/forgiven/forgone wording dropped from every user-facing string
  (buttons, dialog, results, live-feed reasons, shift figures); Albanian edited by the
  user, English aligned. Printed Z line is 'Dalje manuale (N)'. The signed English
  fallback sentences follow. Identifiers (exit.forgiven, forgoneMinor, barrier:create)
  unchanged.
- wiki: forgiven-exit §Wording, shift, log.
2026-10-09 08:37:44 +02:00
julian 2e98167dba bump(resources): park-2 to stage-a761398 (forgiven exit; pass samples)
Build & push images / images (push) Successful in 3m3s
2026-10-09 08:19:52 +02:00
julian a761398301 feat(exit): forgiven exit — open the exit barrier with no payment (barrier:create)
Build & push images / images (push) Successful in 3m23s
The owner (or any role the owner grants barrier:create) lets a car out for free.
Exit side only. Every use is signed, attributed, photographed and on the operator's
Z-report; the shift's cash/card/drawer are untouched by construction.

- shared: resource 'barrier' + permission 'barrier:create'; reason codes
  exit.forgiven / exit.forgiven.noSession; LedgerPayload.forgoneMinor.
- pay-station: forgive() signs a $0 payment carrying the quoted fee as forgoneMinor
  (no tender), refuses a ticket with module charge lines (a wash is not forgiven).
- exit-flow: reopenBarrier(..., { forgiven }) bypasses the walk-back check and stamps
  the forgiven reason on the anomaly + vehicle_exit; forgiveExitNoSession() for a car
  with no ticket (anomaly under forgiven:<id> + exit snapshot + pulse). Relay driving
  shared in #pulseExit.
- route POST /api/barrier/forgive { identity?, note? }: barrier:create + open shift;
  the reason is optional (an empty note is signed as '(no reason given)').
- shift-service: forgoneTotalMinor + forgoneCount on the report/summary/signed
  shift_z_report (only when > 0), print line 'Dalje të falura (N)'.
- web: 'Forgive & open' in the pay/exit modal for an open transient that owes money;
  'Forgive & open exit' on the booth header for the no-ticket case; forgone line on
  the X-report, close confirm and history; en/sq. Prints nothing.
- tests: exit-flow, pay-station, shift-service, HTTP route (403 without the
  permission, 409 no shift, empty note accepted, ledger sequence, report figures).
- wiki: decisions/forgiven-exit.md (decision + as-built), booth-exit-flow, shift,
  index, log.
2026-10-09 08:14:36 +02:00
julian 5d247a5729 bump(resources): park-2 to stage-30a1180 (trial: pass samples for every detected car)
Build & push images / images (push) Successful in 4m11s
2026-10-08 19:36:25 +02:00
julian 30a1180108 feat(review): sample every detected car, not only ticketed entries
Build & push images / images (push) Successful in 5m20s
The entry stream for the reviewer was fed from the session-tied read only (ticket
printed / exit signed). park-2 ran an afternoon with its barriers up: hundreds of
camera vehicle pushes, zero tickets, zero samples.

- anpr-entry: keep the best-framed vehicle of each poll loop (highest body-type
  confidence with a box), store that frame as a snapshot (identity pass:<id>, no
  session) and emit a vehicle read with the camera id — plate or no plate. One
  sample per detection, fire-and-forget, never on the ANPR path.
- snapshot.ts: normalizedBoxes() shared by the session-tied read and the bridge;
  vehicle reads now carry deviceId.
- review-outbox: sampleEntry(deviceId) dedups per camera for 30 s so the pass
  sample and a ticket entry's read (same car, seconds apart) go once.
- wiki: outbox page (entry stream, troubleshooting checklist for 'nothing arrives':
  the month-long silence was a missing Netbird policy, not code), park-2 camera
  port-forward procedure (site-device-installation §7), log.
2026-10-08 19:30:03 +02:00
julian 354de04a3d bump(resources): all stacks to stage-32b4d9e (CI tags with the push head; stage-1167e27 was never built)
Build & push images / images (push) Successful in 8m24s
2026-10-08 17:36:52 +02:00
julian 32b4d9e92b bump(resources): all stacks to stage-1167e27 (the fc93db7 build failed on lint; same content plus the test fix)
Build & push images / images (push) Successful in 3m40s
2026-10-08 16:15:32 +02:00
julian 1167e27b1d fix(vision): wrap the health-filter test lines (ruff E501 broke the image build) 2026-10-08 16:15:27 +02:00
julian f4e5c5037b bump(resources): park-buzi, park-2, park-lab and wash-collector to stage-fc93db7 (log noise cut; DT-008 discovery + auto-config)
Build & push images / images (push) Failing after 27s
2026-10-08 16:11:57 +02:00
julian fc93db73c2 fix(logs): silence health probes, one line per request, demote per-event chatter to debug
Measured on park-2 minutes after a redeploy: 128 server lines / 15 min, 60 of them the Docker
HEALTHCHECK's /health logged as "incoming request" + "request completed"; 160 vision lines,
143 of them uvicorn access lines for GET /health (Docker's probe + the booth server's footer
chip polling every 8 s). Levels were never the problem — all of it was info.

- server: /health route logLevel "silent"; disableRequestLogging + an onResponse hook that
  logs one line "METHOD url → status Nms". That flag also stops Fastify's default error
  handler from logging handler errors, so an onError hook logs 5xx with the stack
  (fastify 5.8.5 lib/error-handler.js checks the same flag). Pinned by request-logging.test.ts.
- vision: a logging.Filter on uvicorn.access drops /health access lines (tested).
- devices: stubLog gains a level; the per-snapshot "captureSnapshot (N bytes)" line is
  debug; the hik-alarm HIT line is debug (ACCEPTED/REJECTED carry everything).
  LOG_LEVEL=debug restores all of it. Wiki: app-logs §Noise cut.
2026-10-08 16:06:39 +02:00
julian 44f757ee37 docs(wiki): memo on discovery mechanisms for cameras, printers and the relay (SADP/ONVIF probed on the lab VLAN); park-2 readers switched to HTTP from the wizard 2026-10-08 15:51:45 +02:00
julian b00182d95d bump(resources): park-2 to stage-b7efa08 (DT-008 reader discovery + auto-config in the wizard)
Build & push images / images (push) Successful in 2m54s
2026-10-08 15:22:51 +02:00
julian b7efa081ec feat(devices): DT-008 reader discovery + auto-configuration over the vendor UDP protocol
Build & push images / images (push) Successful in 3m7s
The Dingtian DT-008's Windows-only config tool speaks a small binary UDP protocol
(reader :24680 unicast get/set, :24582 broadcast search/set-network), reversed in
wiki/raw/dingtian_qr_linux (PROTOCOL.md + dingtian_qr.py, copied to scripts/). Reading
park-2's readers with it from the booth found both in WG26 output mode — the "beeps but
captures nothing" enrolment failure: they never pushed HTTP at all.

The app now speaks the protocol itself (packages/devices dingtian-qr-config.ts, Node dgram,
host-network container) and the dingtian-qr-reader driver uses it:
- discover(): first driver to implement the wizard's Scan capability; rows show serial, IP,
  output mode, current server target, card format, firmware.
- preconditions: output type must be HTTP (fixable — save switches it); typed serial must
  equal the reported one and the reader must answer on UDP (both block the save).
- configureInputPush(): set-network the reader's server to this booth's IP + listen port,
  confirmed by polling (the reader applies it without an ack and is silent for seconds).
- usesPushAuth=false: the scan GET carries no credentials, so no push secret is stored.
- a reader saved without an IP warns instead of failing (legacy vendor-tool setup).

Verified on the bench unit: WG26→HTTP, target 8080→8081→8080, struct byte-identical after.
15 protocol tests against a fake reader + 17 adapter tests. Wiki: device-discovery,
first-run-setup, dingtian-dt008-reader, site-device-installation §2 (SSH procedure; the
"needs a Windows laptop" claim withdrawn), new source page dingtian-qr-linux-tool.
2026-10-08 15:22:33 +02:00
julian 08351a09bf chore(deploy): stack ports as env variables; park-lab moves to art-docker-station
Build & push images / images (push) Successful in 2m56s
art-docker-station already serves :80, so the lab stack could not come up there.
HTTP_PORT (Caddy listen), SERVER_PORT (host-net server + advertised device push
port) and VISION_HOST_PORT (vision loopback publish) now flow from the stack env
through docker-compose.prod.yml; the Caddyfile reads {$HTTP_PORT:80} and
{$SERVER_PORT:3000}. Unset = the old :80 -> :3000 / 8089 layout, so booths are
unchanged. park-lab: server = art-docker-station, ports 8080 / 3100 / 8189.

Verified: caddy validate + adapt (with env -> :8080 / 127.0.0.1:3100, without
-> :80 / :3000) and docker compose config with the lab values. Wiki:
container-deployment §proxy, fleet-deployment-komodo §park-lab, log.
2026-10-08 11:00:04 +02:00
julian 4593a397dd fix(devices): Dahua snapshot channel is 1-based; add Dahua clock sync; wiki page for the bench IPC-HFW2549T
Build & push images / images (push) Successful in 3m25s
The dahua driver decremented the wizard's channel on the belief the CGI is
0-based. On real hardware (IPC-HFW2549T-AS-IL, fw V2.880, 2026-09-17)
snapshot.cgi?channel=0 answers HTTP 400 and channel=1 returns the 2880x1620
JPEG — so every Dahua assignment sat at degraded "HTTP 400". The channel is
now sent as entered (clamped >= 1) and the URL is pinned in camera.test.ts.

DahuaCamera.syncClock reads global.cgi getCurrentTime and, past the drift
limit, writes setCurrentTime with the host's naive local wall time (no offset):
the OSD burned into snapshots must match the booth clock; the camera's tz/DST
config is left alone. Verified live: a 2h-off set, set back, 1s drift -> no
write. The device monitor picks it up via isClockSyncable unchanged.

Wiki: new entities/dahua-ipc-hfw2549t.md (endpoint table, verbatim
eventManager attach parts — VideoMotion Start/Stop, VideoMotionInfo,
TimeChange — RealUTC is the camera's belief of UTC, 5-strike login lockout,
unit not factory-fresh); lpr-camera Dahua bullet corrected; runbook §3 Dahua
paragraph; index + log. The server-side attach-stream subscriber is not built.
2026-10-08 08:03:50 +02:00
julian 4d1d245680 docs(wiki): DT-008 card-technology findings, box leaflet source, install checklist; add scripts/reader-sink.py
Two DT-008 units read disjoint card sets (park-buzi 125 kHz, lab unit 13.56 MHz only)
although the box leaflet claims EM-ID + M1 + ISO 14443A/B + 15693 in one unit; recorded as
unresolved with the EM4100 test that settles it (open question #18). Phone taps give a
random 08… UID per tap, so phones are never RF credentials; 6H keeps the first three UID
bytes reversed. Runbook §2 gains the tool's Setting-tab layout, a capability-identification
checklist and the per-technology parameter table. reader-sink.py is a stdlib bench sink
answering the push with the SDK verdict and Connection: close.

Claude-Session: https://claude.ai/code/session_01FWncR69HgGPuei1dLrW3cU
2026-09-17 09:47:40 +02:00
julian 5afdcc78ae chore(komodo): park-lab posts review crops as booth-lab; collector lists its token
Build & push images / images (push) Successful in 2m48s
Own pseudonymous id and own secret (wash_review_token_booth_lab), never a real
booth's, so bench crops stay separable per booth on the collector and can be
labelled unusable. Fleet page row updated.

Claude-Session: https://claude.ai/code/session_01FWncR69HgGPuei1dLrW3cU
2026-09-16 10:55:21 +02:00