mirror of https://github.com/OpenIPC/python-dvr
Browse Source
Thin wrappers `get_detect_info()` / `set_detect_info(data)` in both the
sync (`dvrip.py`) and async (`asyncio_dvrip.py`) clients for the
top-level `Detect` config path — per-channel MotionDetect /
HumanDetection (and, on multi-channel NVRs, BlindDetect / LossDetect).
The library already supported this via the generic `get_info("Detect")` /
`set_info("Detect", …)`, but the path and payload shape were undocumented.
README now carries a worked example showing the per-channel-array schema
and the sparse-merge semantics (fields omitted from a SET payload retain
their current value), plus a caveat that AlarmInfo push behaviour is
firmware-dependent — some XM builds emit events to the existing TCP
session, others only to a separately-configured `AlarmServer`, and some
do neither.
Verified on a live XM IPC unit (single-channel, hostname
IVG85HG50PYA-S-2): the canonical OpenIPC "turn motion detection on"
snippet returns `Ret: 100`, round-trip GET shows the change, sparse merge
works (`{"MotionDetect":[{"Level":4}]}` flips only `Level`).
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
pull/7/head
4 changed files with 60 additions and 0 deletions
Loading…
Reference in new issue