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.
This commit is contained in:
2026-10-08 08:03:50 +02:00
parent 4d1d245680
commit 4593a397dd
7 changed files with 348 additions and 16 deletions
+12
View File
@@ -188,6 +188,18 @@ database → **factory reset**, then redo 1–3 (the Vehicle target filter defau
Point the Alarm Server at a dumb HTTP sink on the laptop if you need to see the verbatim body
([[lpr-camera]] §"auto-enter but not auto-exit").
**If the camera is a Dahua** (first unit inspected 2026-09-17, [[dahua-ipc-hfw2549t]]): factory
`192.168.1.108`, `admin` + a password set at first boot, web UI on port 80 (HTTPS off by default
on the bench unit). In the wizard: driver `dahua`, host, `admin` password, **channel 1 as printed** (the
driver sent `channel=0` → HTTP 400 until 2026-09-17; fixed). There is no HTTP Alarm Server to
point at the booth: events would be read by the server holding an `eventManager.cgi?action=attach`
stream (**not built yet** — a Dahua today gives snapshots + clock sync only, no lane busy/free
and no ANPR bridge), so no "assign first, then go back to the camera" step — but SMD must be set
to **Vehicle** on the camera. Set the time zone by hand; the app re-syncs the clock from the
booth like it does for Hikvision (the bench unit ran 1 h behind with DST off; NTP is useless on
the isolated VLAN). Five wrong logins lock `admin` for 5 minutes — check the password with one
`curl --digest` before assigning.
## 4. Radar (vehicle presence at the entry barrier)
A dry-contact sensor into a Dingtian input, nothing on the network. Check with the board's input