01304 827609 info@use-ip.co.uk Find us

Door Entry Apple Home Secure Video Doorbell with Hikvision IP cam with 2-way audio

wardie

Member
Messages
16
Points
3
OK so after a bit of work I’ve managed to get a HomeKit Secure Video Doorbell up and running using a combo of a normal HikVision camera (with 2-way audio, but NOT a doorbell) and a traditional push button battery powered doorbell. I’ve done a diagram to explain it all!

doorbell.png


Good news
  • It actually works!
  • It’s fast and usable as a replacement for a cloud video doorbell (at no extra cost per month if you already are into Apple ecosystem)
  • No custom coding needed
  • Using Apple HomeKit means you get benefit of people recognition that comes with Apple ecosystem - so you get doorbell and object recognition alerts using names
Bad news / limitations
  • It requires quite a lot of tech components to remain up and running
  • Lots of configurations to manage, quite a bit of learning on different platforms
  • Bits of wiring to do
Requirements / the challenge
  • Re-use a traditional push button doorbell as well as an HikVision front door IP camera
  • Impossible to get remote power/ethernet to the doorbell button
  • Set up a video doorbell solution that can work locally and remotely, Apple ecosystem
  • Still have the doorbell function as a ding-dong as normal
Basic idea
  • Use a HikVision bullet cam with 2-way audio support
  • Scrypted server is the middleware between HikVision and Apple HomeKit
  • Doorbell button is instrumented somehow via IoT to create input events toScrypted
Main challenges I came across
  • Getting audio to work through 2-way end to end, particularly the output speaker
  • Getting a doorbell event into Scrypted
Steps

First I wanted to get the basic video feed with 2-way audio working through HikVision to Scrypted to Apple Home.
  • I originally had my camera (DS-2CD2046G2-IU/SL) set up as plug & play PoE into the NVR
  • At first I found the 2-way audio didn’t work via HikConnect, the sound output was delayed and broken up
  • This was resolved by updating to the latest IP camera and NVR firmware (thanks Kyle)
  • However, the audio worked in HikConnect but not Scrypted or Apple HomeKit, the cameras microphone worked out for sound input but I couldn’t get sound output to work
  • Also the HikConnect app is a pain in this mode as every time you want to use audio out you have to tell it if you want to choose NVR or Camera methods - only Camera works at all anyway
  • To solve this I moved my camera off the NVR’s PoE and into my own LAN
  • Then reconfigured the network settings of the camera to my LAN using the SADP tool (thanks Kyle), it uses DHCP but with a reserved IP address on my router - same solution I have for another HikVision camera for other reasons (most my of cameras are plug & play PoE)
  • Then I added the camera separately to HikVision platform, and re-pointed my NVR’s camera entry at the new IP - worked fine
  • Then Scrypted can see the camera directly on LAN, rather than relying on the hosting via NVR
  • Note: I’ve just spotted that there is an integration option on my NVR about switching ONVIF protocol on for the cameras, which may have helped git it working via NVR. Dunno. But Scrypted would not work for sound output via HikVision or ONVIF protocols anyway, so I expect not.
Notes on Scrypted
  • I used the self-contained Scrypted App for MacOS on a Mac mini 2018 I have running anyway (for other purposes), I bought an NVR licence, not 100% sure you need that, but app is really nice for smart event and history review of camera, much better than HikConnect IMHO
  • You need the HikVision plugin, the HomeKit plugin
  • The camera output needs to be using basic H264 - not ideal for space but there we go (this is for HomeKit end)
  • The video streams for camera need to be outputting sound too, codec need to be set right
  • See the basic excellent instructions from Koushik Dutta here: Do It Yourself Doorbell
  • One thing I found doing this on the above instructions is you also need to add in the “[device_name] (Intercom)” device to the device group to make the 2-way audio work
  • You load the doorbell composite device into Apple HomeKit as an standalone device, do not load the Scrypted platform as a whole into HomeKit - Scrypted app gives you a QR code for this, nice, worked first time fine. You need a BinarySensor for the doorbell button - see below.
Notes on Apple HomeKit
  • Pretty simple it just works (very Apple) - or not!, little to configure
  • Very nice when it’s up and running, includes person name recognition as I said above
  • Doorbell event appears on your Lock Screen and you press it to jump strain to 2-way video/audio, lovely
  • Apple (and Scrypted) keeps nice event history available to scroll through
Next, the doorbell button itself
  • So the basic idea is IoT enable my physical push button on the wall
  • I already have a Habitat Elevation 8 hub with Z-wave and Zigbee networks, so I used another Fibaro Smart Implant (tiny gadget) to take binary switched physical wire input from the push button, and that is a divide with on/off state on the hub, as well as it’s output controls a Honeywell Home battery doorbell ding-dong (it has a floating contact on it to trigger). Downside of this is the Implant needs a power supply, but that was OK to rig up with generic 12v transformer. This is the only wireless component but Z-Wave Plus is pretty stable.
  • The next challenge was to get the event into the Scrypted platform. To do this I used MQTT as a lightweight IoT event middleware.
  • Hubitat has a MQTT plug in to generate events on/off from the Fibaro device.
  • This does through a MQTT broker I happen to be already running (for other purposes) on a Raspberry Pi 4.
  • Scrypted has a MQTT plugin you can use to subscribe to the right MQTT topic the Hubitat is publishing on. This creates a simple device on the Scrypted platform with on/off status.
  • This device then forms part of the composite Doorbell Scrypted device as per Koushik’s instructions.
Credit to Koushik Dutta for DIY Scrypted Doorbell instructions, and to the excellent Kyle @ Use-IP as ever for help on getting the HikVision end working.

(name removed in below Lock Screen notification but it correctly identified me!)

Screenshot 2023-09-19 at 22.06.55.png
 
If you use the alarm input on the camera you can do it with Hik-Connect without any extra software etc, I posted a year or two ago.

My solution was a bit Heath Robinson, but will work with an NVR connected camera. You just connect a standard bell push to the camera alarm input and in parallel, solder across the button of a standard wireless door chime for the ‘ding dong’

When the notification appears after the caller pushes the button - Live view, 2 way audio, IP camera and that’s it.

It’s a bit of a tart on as you’re only getting a single ping on receipt of the notification. I now use the KV6113 door station on its own as the new firmware allows you to connect that to a wireless bell push and you get a proper call to Hik-Connect instead of a a brief notification.

PS I’m also a big Hubitat fan (johnwill1 on their forum)
 
I should also have said that you could simplify the push button bit at least, but I was re-using infrastructure I already had. For example:
  • You could get rid of the Raspberry Pi MQTT broker by using the built-in Broker in the MQTT Plug-In on Scripted.
  • You could go further and get rid of the Habitat IoT hub element by running Z-Wave Usb stick on Srypted server, there is a Plug-In for that too I believe.
etc. YMMV.
 
If you use the alarm input on the camera you can do it with Hik-Connect without any extra software etc, I posted a year or two ago.

My solution was a bit Heath Robinson, but will work with an NVR connected camera. You just connect a standard bell push to the camera alarm input and in parallel, solder across the button of a standard wireless door chime for the ‘ding dong’

When the notification appears after the caller pushes the button - Live view, 2 way audio, IP camera and that’s it.

It’s a bit of a tart on as you’re only getting a single ping on receipt of the notification. I now use the KV6113 door station on its own as the new firmware allows you to connect that to a wireless bell push and you get a proper call to Hik-Connect instead of a a brief notification.

PS I’m also a big Hubitat fan (johnwill1 on their forum)
Given I now have a choice of 3 apps to try video doorbell functionality out on my phone (!!!) I'm finding Apple Home way better than HikConnect or even Scripted App (in beta for iPhone, uses TestPilot). Just very simple and quick to go from a notification to actually talking to someone at your door. And with face ID/object recognition etc.
 
Given I now have a choice of 3 apps to try video doorbell functionality out on my phone (!!!) I'm finding Apple Home way better than HikConnect or even Scripted App (in beta for iPhone, uses TestPilot). Just very simple and quick to go from a notification to actually talking to someone at your door. And with face ID/object recognition etc.
The cameras are one thing I’ve never added to HomeKit. I was going to when using Homebridge and now I’ve dropped that and I’m using Hubitats built in HomeKit integration. I’m already using a Pi in my setup for MQTT and node-red (node-red gives some interesting possibilities for directly switching camera settings)
 
The cameras are one thing I’ve never added to HomeKit. I was going to when using Homebridge and now I’ve dropped that and I’m using Hubitats built in HomeKit integration. I’m already using a Pi in my setup for MQTT and node-red (node-red gives some interesting possibilities for directly switching camera settings)
I have very similar setup, tried Homebridge for camera to HomeKit but binned it, bit flaky. Very impressed with Scrypted so far, at least running using the self-contained app on macOS on my Mac Mini. Plug-ins seem to play nice with both Hikvision stuff and HomeKit.
 
Back
Top