Skip to content

DirectorLink · Hikvision 1.0.2

Choose a tag to compare

@github-actions github-actions released this 04 Oct 04:28
· 8 commits to main since this release
Immutable release. Only release title and notes can be modified.

DirectorLink · Hikvision 1.0.2

First release. Add one driver, type the camera login once, click Add New Cameras, and every Hikvision camera on the network is in Control4, named and ready.

Free, open-source Control4 driver for Hikvision IP cameras and NVRs. Part of DirectorLink Drivers.

Files

Driver in Composer File
DirectorLink · Hikvision (shows in the project as Hikvision Hub) DirectorLink-Hikvision.c4z
DirectorLink · Hikvision Camera DirectorLink-Hikvision-Camera.c4z

Check the downloads against SHA256SUMS.txt. Keep the file names exactly as they are: a browser's (1).c4z copy installs as a separate driver.

Hikvision Hub

  • Finds everything by itself. Hikvision SADP discovery finds every camera and NVR on the network with its model, address and HTTP port, including NVRs on non-standard ports. Cameras on other subnets go in Extra Camera IPs.
  • One click adds them all. Each camera is added in the hub's room; then drag them to their rooms.
  • One login. The hub fills in every camera's Properties page (address, ports, Digest login) and channel. A login change is sent to every camera, and a camera that loses its login gets it again by itself.
  • Real names. A camera keeps its existing Control4 name (when replacing another driver), else takes its NVR channel name, else the name shown on its video. Model and IP are a last resort. Update Camera Names renames cameras already added.
  • Login checked first. A wrong password never adds cameras. The hub's Status names every device that refused the login.
  • NVR aware. Cameras reachable only through the NVR are added as NVR channels; the rest connect directly. An NVR channel whose camera is disconnected shows as offline.
  • Ignored Cameras: cameras or NVR channels that Add New Cameras should skip.
  • Video that plays: Control4 plays H.264 only, so with Sub Stream To H.264 on Automatic (the default) every camera the hub adds switches its sub stream to H.264. The main stream is not touched. Set All Sub Streams To H.264 does the same for cameras already added.
  • One alerts tile for the home: alerts on, alert, alerts off or snoozed, camera offline, working. Tap it to turn alerts on or off everywhere.
  • One Camera Alert event for all cameras, with LAST_ALERT_CAMERA, LAST_ALERT_TYPE and a snapshot from the alerting camera.
  • Plain-language Status, Cameras (online, offline, disabled, no H.264 video) and Found On Network.

Hikvision Camera

  • One place for settings: address, ports and login are on Control4's camera Properties page, like every Control4 camera. Advanced Properties adds only Camera Enabled and Channel.
  • Camera Enabled = No for a camera that is off or removed: no requests, events or offline alarms, and the hub stops counting it.
  • Video: the H.264 stream that fits each screen; the RTSP port is read from the camera. Control4 cannot play H.265, so Set Sub Stream To H.264 switches the sub stream and leaves the main stream for recording. Snapshots fall back to the main stream when the sub stream gives none.
  • Real-time detections: motion, person, vehicle, line crossing, intrusion, region entrance/exit, tamper, scene change, face, object left/removed, alarm inputs, PIR.
  • Detections and alerts: detections always run automations. Alert (notifications, snapshot, History) follows Alert On (any detection, people and vehicles, people only), the camera's and the hub's alerts switches, and snooze.
  • Controls in the camera view: alerts, alert on, snooze for 1 hour, motion detection, day/night, light (ColorVu and hybrid-light cameras), reboot.
  • Attention line: says when the camera needs an H.264 stream, gives no snapshot, has no detection that notifies Control4, or when the Properties page needs a manual touch.
  • Lockout-safe: a wrong password costs one login attempt. Requests to a device go one at a time, so overlapping Digest logins can't look like a wrong password.

Installing

  1. Upload both files with Driver → Add or Update Driver or Agent.
  2. Search DirectorLink, add DirectorLink · Hikvision, enter the camera login, and run Add New Cameras.
  3. On the cameras: tick Notify Surveillance Center on each detection.

Requirements: Control4 OS 3.2 or newer, Composer Pro. Full steps: directorlink.io/drivers/hikvision.

Known issues

  • Tested on one system (Control4 OS 4.2.4, Hikvision G2 cameras and a K-series NVR). Please report what works and what doesn't on other models, firmware and OS versions.
  • Properties page update: if Control4 does not accept the automatic update of a camera's Properties page, the camera's Attention line lists the values to enter by hand once.
  • H.265: Control4 cannot play it. Some NVRs may refuse the H.264 change for their channels; then set it on the camera's web page.
  • HTTPS: when the camera page uses HTTPS, the live event stream still uses the HTTP port.
  • People and vehicle alerts need AcuSense (human/vehicle) cameras.
  • NVR channel cameras each open their own event connection to the NVR.
  • Notification snapshots of the URL type depend on the notification agent's Digest support and are untested.

For developers

  • The shared engine in src/common/ (XML, Digest/Basic login with a one-failed-login guard, an ISAPI client that sends one request at a time per device) is built into both drivers by tools/build.py.
  • Hub ↔ camera messages over C4:SendToDevice: DL_CONFIGURE, DL_HUB_ALERTS, DL_HUB_HELLO, DL_FIX_SUBSTREAM, DL_CAMERA_STATUS, DL_CAMERA_ALERT.
  • tests/ runs the real drivers in Lua 5.1 against a stubbed Control4 API, with Digest checked by RFC 2617 math.