HIKVISION Devices

How to add Hikvision camera devices into Hubitat for motion and other events

HIKVISION Devices

Adding Device

  1. Navigate to devices, select Add Device.
  2. Select Virtual.
  3. Fill in at least the Device Name field (how you want this device to be named in your devices list).
  4. Choose the Hikvision Camera driver under Type.
  5. Select Save Device.

The last step above will add the device and direct you to its device detail page), where you will also need to:

  1. Under Preferences, find the Camera IP Address setting, provide the IP address of your camera (e.g., 192.168.0.30), and select Save Preferences.

Finally, configure the camera itself to send messages to your hub:

  1. In HIKVISION configuration (via the device interface, i.e., not on Hubitat), navigate to Configuration > Network > Advanced > Alarm Server (or HTTP Server on some firmware versions). Exact options may vary depending on device firmware, but a typical configuration requires you to:
    • Enter the IP address of your hub on port 39501 (e.g., 192.168.1.25:39501) as the destination
    • Enter / (a single forward slash) if prompted for a URL or path
    • Disable ANR if offered
    • Enable Notify Surveillance Center if offered

Using Devices

Motion detection is exposed via the motion attribute on added devices. This can be used in the same way as a regular motion sensor in any app. This attribute is applicable only to basic motion, not Smart Events, in the HIKVISION configuration.

Smart Events (including intrusion, line crossing, etc.) and other camera events are exposed as button events — a pushed event for a certain button number:

Btn. No. Event
1 Line Crossing Detection
2 Video Tampering
3 Hard Drive Full
4 Hard Drive Error
5 Scene Change Detection
6 Face Detection
7 Intrusion Detection
8 Unattended Baggage Detection
9 Object Removal Detection.
10 Alarm Input

Another way to figure out what button events correspond to what events is to watch Logs as these Smart Events are triggered on the HIKVISION device, or check the device Events page for the camera device afterwards.

Notes

  • The cameras must be connected to the same LAN as your Hubitat Elevation hub (in particular, note that HIKVISION NVRs may create a separate subnet that is not accessible to your hub)

  • If you do not receive events on your hub, verfiy configuration in your Hikvision device as noted in Adding Device.