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!
Good news
First I wanted to get the basic video feed with 2-way audio working through HikVision to Scrypted to Apple Home.
(name removed in below Lock Screen notification but it correctly identified me!)
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
- 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
- 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
- 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
- Getting audio to work through 2-way end to end, particularly the output speaker
- Getting a doorbell event into Scrypted
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.
- 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.
- 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
- 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.
(name removed in below Lock Screen notification but it correctly identified me!)