UniFi and Hikvision: How to Make Them Work Together in UniFi Protect

Question:

How can I achieve the seemingly impossible task of integrating UniFi cameras with a Hikvision NVR within the UniFi Protect system?

This question is more concise and direct than the original text, which is more like an introduction to a tutorial. It also uses more specific terms, such as “integrating” instead of “adding”, and “system” instead of “ecosystem”. It also implies that the questioner has some expertise and interest in the topic, as they are aware of the difficulty and rarity of the solution.

Answer:

How to Integrate UniFi Cameras with a Hikvision NVR within the UniFi Protect System

UniFi cameras are popular devices for home and business security, offering high-quality video and audio, smart features, and easy integration with the UniFi network. However, if you want to use a Hikvision NVR to record and manage your UniFi cameras, you might encounter some challenges. This is because UniFi cameras use a proprietary protocol called RTSPS, which is not compatible with most third-party devices. Moreover, newer firmware versions of UniFi cameras have disabled the option for “Standalone Mode”, which allowed users to stream RTSP to other devices without using UniFi Protect.

Fortunately, there is a way to overcome these obstacles and achieve the seemingly impossible task of integrating UniFi cameras with a Hikvision NVR within the UniFi Protect system. This method requires some modifications to the RTSP link, the use of the Recovery Code as the password, and the creation of a custom protocol on the Hikvision NVR. By following these steps, you will be able to record and view your UniFi cameras on your Hikvision NVR, while still enjoying the benefits of UniFi Protect.

Before you begin, make sure you have the following:

  • UniFi cameras connected to the network and added to UniFi Protect
  • UniFi network components, such as the Ultimate Dream Machine Pro (UDM-Pro) as the gateway and UniFi switches (USW)
  • Hikvision NVR connected to the same network as the UniFi cameras
  • A PC with Notepad and VLC installed
  • A web browser to access the UniFi Protect and Hikvision NVR interfaces
  • Step 1: Configure UniFi Camera

    The first step is to configure the UniFi camera settings in UniFi Protect. To do this, follow these instructions:

  • In UniFi Protect, click on the camera, navigate to settings, and name the device.
  • Click “Advance” to expand options, then select the desired resolution under Real Time Streaming Protocol (RTSPS).
  • Copy the RTSPS link provided.
  • Step 2: Modify RTSP Link

    The next step is to modify the RTSP link in Notepad. This is necessary to make the link compatible with the Hikvision NVR. To do this, follow these instructions:

  • Open Notepad on your PC and paste the copied link.
  • Change “rtsps:” to “rtsp:” in the link.
  • Change the port number from “:7441” to “:7447” in the link.
  • Shorten the link by deleting “?” and everything to the right of it.
  • For example:

    Original: rtsps://192.168.0.1:7441/WdOLQ2eIggOGujPO?enableSrtp

    Modified: rtsp://192.168.0.1:7447/WdOLQ2eIggOGujPO

    Step 3: Obtain RTSP Credentials

    The third step is to obtain the RTSP credentials from UniFi Protect. This is necessary to authenticate the RTSP stream on the Hikvision NVR. To do this, follow these instructions:

  • In UniFi Protect, click on “Settings” and then “System”.
  • Reveal the “Recovery Code” and copy it.
  • Paste the Recovery Code into Notepad alongside the modified RTSP link.
  • Step 4: Verify RTSP Stream with VLC

    The fourth step is to verify the RTSP stream with VLC. This is optional, but recommended to ensure that the RTSP link and credentials are working properly. To do this, follow these instructions:

  • Download and install VLC.
  • Open a “Network Stream” in VLC.
  • Paste the updated RTSP link.
  • Enter the following credentials:
  • User Name: ubnt

    Password: [Recovery Code] (Copied to Notepad in Step 3)

    If the RTSP stream is successful, you should see the live video of your UniFi camera in VLC.

    Step 5: Configure Hikvision NVR

    The fifth step is to configure the Hikvision NVR settings. This is necessary to create a custom protocol for the UniFi camera and add it as a device. To do this, follow these instructions:

  • Sign into the Hikvision NVR GUI.
  • Navigate to “Configuration” and select “Channel Management”.
  • Click on “Custom Protocol” and configure as follows:
  • Protocol Name: [Camera Name in UniFi Protect]

    Protocol Type: RTSP

    Transfer Protocol: Auto

    Port: 7447

    Stream Path: “/[Path] from modified RTSP link” (Example: “/WdOLQ2eIggOGujPO” from the modified link in Step 2)

    Step 6: Add UniFi Camera to Hikvision NVR

    The sixth step is to add the UniFi camera to the Hikvision NVR as a device. To do this, follow these instructions:

  • Click “+” to add a new device.
  • Set “Device IP Address” to UDM-Pro IP (Example: 192.168.0.1, which is the same IP as the RTSP link).
  • Select the “Custom Protocol” created earlier.
  • Set “Management Port” to 7447.
  • Change “User Name” to “ubnt” and input the Recovery Code (Copied to Notepad in Step 3) as the password.
  • Leave “Transfer Protocol” as “Auto”.
  • Optionally enable “Network Camera Time Sync”.
  • Click “Ok” to save.
  • Note: If you encounter issues adding the camera and have performed these steps in the same browser session, you may need to clear the cache and refresh the browser by pressing “Ctrl + F5” before reattempting the addition.

    Step 7: Activate Camera on Hikvision NVR

    The final step is to activate the camera on the Hikvision NVR. To do this, follow these instructions:

  • Select the box next to the newly added camera channel.
  • Click “Activate” to make the camera online.
  • Conclusion

    You

have successfully integrated your UniFi cameras with your Hikvision NVR within the UniFi Protect system. You can now record and view your UniFi cameras on your Hikvision NVR, while still enjoying the benefits of UniFi Protect. You have also achieved a rare and difficult task that many thought was impossible. Congratulations!

Leave a Reply

Your email address will not be published. Required fields are marked *

Privacy Terms Contacts About Us