Commit Graph
2 Commits
Author SHA1 Message Date
Isaac ConnorandClaude Opus 5 588822efb0 Correct the IP5M-1190EW row from measured behaviour
Three values in the entry added a few commits ago were wrong, all for the
same reason: I read them off http status codes, in the entry whose own
comment says http status codes cannot be trusted here.  Re-derived with
amcrest_probe.pl, which decides every flag by comparing frames.

CanMoveDiag was 1 because LeftUp returns 200.  It shifts the picture by
1.8 against a 6.0 threshold, so nothing moves.  Now 0.

Pan and tilt speed were 1..8 from the Dahua documentation.  Measured
displacement is 31.5, 36.2, 41.4 for speeds 1, 2, 4 and then flat through
8, 16, 32 and 64, so the usable range is 1..4 even though the firmware
accepts far higher.

NumPresets was 255, the firmware ceiling.  That is the wrong thing to
measure: the classic skin draws one button per preset, and the camera
refuses GotoPreset for any index not yet stored, so 255 gives a wall of
buttons where all but the defined ones error.  Now 25, matching the
sibling Dahua/Amcrest RPC entries.

CanMoveAbs stays 0 but for a better reason than before.  PositionABS is
accepted, reaches distinct positions and reproduces a revisited
coordinate, so it passes the obvious tests.  Its targets are 90 degrees
apart though, and the median step shifts the view 16.4 where a single one
second nudge shifts it 42.5 - the pan argument is being clamped to a
fraction of what was asked, so a moveMap click would not land where it
was aimed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LzHrvNtF13vyYBAJjktam6
2026-08-16 18:54:38 -04:00
Isaac ConnorandClaude Opus 5 cd88b741d5 Move the Controls seed rows to db/controls.sql, add the IP5M-1190EW
The 49 control protocol definitions were sitting inline in
zm_create.sql.in, which makes adding a model-specific entry a scroll
through a wall of positional INSERTs.  Move them to db/controls.sql and
pull them in with

  source @PKGDATADIR@/db/controls.sql

which is how User_Preferences.sql, manufacturers.sql, models.sql,
triggers.sql, Object_Types.sql, AI_Models.sql and coco_dataset.sql are
already handled, and the existing install(FILES ${dbfileslist}) glob puts
the new file where that path resolves to.  The 49 rows move across
byte-identical.

The new entry is the Amcrest IP5M-1190EW, verified against firmware
2.810.00AC004.0.R.  The generic 'Amcrest HTTP API' entry advertises zoom
and continuous zoom and no presets, which is backwards for this model:
pan, tilt, the diagonals and continuous move all physically move it, arg2
really is the speed, and GotoPreset works, while zoom, focus and iris do
not.  ZoomTele, ZoomWide, FocusNear and FocusFar answer OK and do
nothing; autoFocus, getFocusStatus, IrisLarge and AutoPanOn 400.
PositionABS answers OK and is inert, so CanMoveAbs and CanMoveMap stay 0.
The white light exists in Lighting_V2 but is not drivable, so CanLight
stays 0.

Worth recording for anyone rechecking this: ptz.cgi?action=getStatus on
that firmware always reports Postion=0/16.65 MoveStatus=Idle no matter
what the camera is doing, so status cannot tell you whether a move
worked.  All of the above was confirmed by diffing snapshots.

zm_update-1.39.20.sql carries the same row to existing installs, guarded
with NOT EXISTS so it can be re-run.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LzHrvNtF13vyYBAJjktam6
2026-08-16 14:49:27 -04:00