Scanning a LAN for ONVIF cameras is the easy part. The useful part is noticing when something changed: a camera replaced, firmware bumped, a profile vanished, a device that moved to a new IP. That is what onvif-scan v0.3.0 adds.
CSV export
scan --csv inventory.csv writes one row per device × profile — because the interesting data (encoder options, PTZ, source association) lives at profile level, and rolling it up per device would either lose fields or invent aggregates. Columns are fixed, values are UTF-8+BOM for Excel, unknowns are empty cells, and the findings column carries finding codes only — the detail text stays in the JSON report. It is built from the same scrubbed report object as the JSON and HTML, so a password cannot leak into the CSV through a different code path. Opt-in only; it does not appear unless you ask for it.
Offline baseline diff
onvif-scan diff old.json new.json compares two inventory reports without scanning anything and without credentials. It reports added/removed devices, firmware changes, level changes, profile-set drift, channel-count changes, finding-code changes and declared-service changes.
Two details matter:
- Identity is MAC first, IP as fallback. Cameras change IP addresses; matching by IP alone would report one device as two (a disappearance plus an appearance). A MAC that appears or disappears is reported as added/removed — honestly, since the identity key itself changed.
- Exit codes are made for cron: 0 = no change, 1 = changes found, 2 = bad input. 1 is not a failure. A scheduled job can run the scan, diff against last week, and alert only on 1.
Also in this release
The issue tracker is now empty: --lang zh-CN for the HTML report and a Scopes-minimal ProbeMatch fixture both landed. 115 tests pass on a LAN host including full WS-Discovery end-to-end runs.
Still simulation-verified only — no real-camera reports yet. If you run it on real hardware, a sanitised device report through the repo's issue template helps more than a star.
Repo:
https://github.com/anguoyang/onvif-scan
Release:
