/hikvision-isapi:hikvision-isapifrom hikvision-isapi
Build, debug and review integrations with Hikvision devices over ISAPI. Covers Digest auth, login lockout, person/card/face sync, access events, snapshots, RTSP URLs, and PTZ control.
Ships in hikvision-isapi. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
ISAPI is a per-device REST API at http(s)://{device}/ISAPI/.... There is no cloud; each device is called directly. XML is native; many endpoints, and most of /ISAPI/AccessControl/, also accept JSON with ?format=json.
capabilities endpoint before relying on optional fields or commands. Never assume a field exists because the guide lists it.Auth
qop=auth, MD5 unless the challenge names another algorithm). Hash the exact path and query you send, including ?format=json.nc; on a new 401, take the new challenge and retry once. Never loop on 401.401 body with <lockStatus>locked</lockStatus> means the account is locked: stop and wait <unlockTime> seconds. The lock triggers after 3 to 20 failed attempts (5 by default).401 on one endpoint while GET /ISAPI/System/deviceInfo works means missing permission, not a wrong password.NODE_TLS_REJECT_UNAUTHORIZED=0 or disable verification globally.Responses
statusCode in the body, not only the HTTP status. HTTP 200 with a failed ResponseStatus happens.statusCode: 1 OK, 2 Device Busy, 3 Device Error, 4 Invalid Operation, 5 Invalid Format, 6 Invalid Content, 7 Reboot Required, 9 Additional Error. Branch on subStatusCode (notSupport, lowPrivilege, methodNotAllowed, badParameters, ...), never on statusString.statusCode 6. Upsert = Record, then Modify on 6.methodNotAllowed, some firmware wants PUT instead of POST or the reverse; retry once with the other.Searches
searchID for all pages, searchResultPosition advanced by records received, maxResults 30 is safe.responseStatusStrg is MORE; also stop on an empty page (some firmware says MORE forever). NO MATCH (with a space) means nothing found; do not treat a failed or empty search as "absent" before deleting.Access control
employeeNo (string, up to 32 chars). Create the person before cards or faces.PUT .../Delete with a condition body, not HTTP DELETE.multipart/form-data, part 1 FaceDataRecord JSON {faceLibType:"blackFD", FDID:"1", FPID:<employeeNo>}, part 2 the JPEG (named img or FaceImage; both appear in Hikvision samples). JPEG under 200 KB, one frontal face. Measure lengths in bytes.PUT /ISAPI/AccessControl/RemoteControl/door/{n} with XML <RemoteControlDoor><cmd>open</cmd></RemoteControlDoor>. Commands: open, close, alwaysOpen, alwaysClose, resume; check door/capabilities, not every model has all.minor (0 = all).currentVerifyMode for the method and treat any *_PASS code as granted.serialNo and skip older ones to make polling idempotent.Events
GET /ISAPI/Event/notification/alertStream open (multipart/mixed); listening = the device POSTs to a host set in /ISAPI/Event/notification/httpHosts.Content-Type, cut parts by Content-Length, expect XML, JSON and JPEG parts. Drop videoloss/inactive heartbeats. Reconnect when nothing arrives for a minute or two.PUT httpHosts replaces the whole list; GET first and keep entries you do not own. Test with POST httpHosts/{id}/test. Reply 200 immediately in the handler.center ("notify surveillance center").AcsEvent searches.Video
{camera}{stream}: 101 main, 102 sub. PTZ uses the plain camera number (/ISAPI/PTZCtrl/channels/1/...).rtsp://{device}:554/Streaming/Channels/101. Playback: /Streaming/tracks/101?starttime=YYYYMMDDTHHMMSSZ&endtime=.... URL-encode passwords in RTSP URLs.pan/tilt/zoom all zero. Always send the stop.fetch calls.serialNumber, not IP.ResponseStatus.capabilities or the device web UI's network tab rather than guessing.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub uchkunr/hikvision-best-practices --plugin hikvision-isapiOther plugins' skills for the same job