hkdoorbell
is an open-source implementation of an HomeKit IP
doorbell.
It uses ffmpeg
to access the camera stream and publishes the stream to HomeKit using hc by Matthias Hochgatterer.
The doorbell camera stream can be viewed in any HomeKit app.
- live streaming via HomeKit with bi-directional audio
- works with any HomeKit app
- completely written in Go
- runs on multiple platforms (Linux, macOS)
- in memory cache for snapshots
- backend web service (default at 0.0.0.0:8080) with last 100 snapshots
- only one person can answer and see the doorbell camera
- Secure video is not supported at the moment
- motion sensor is not supported (useful only if secure video is implemented)
hkdoorbell uses Go modules and therefore requires Go 1.11 or higher.
The fastest way to get started is to
- download the project on a Mac with a built-in iSight camera
git clone https://github.com/ra1nb0w/hkdoorbell && cd hkdooebell
- run with
make run
ormake bin
to get the binary - open any HomeKit app and add the doorbell to HomeKit (pin for initial setup is
001 02 003
) - if you need to change parameters like pin read the help of the
binary with
./hkdoorbell
These steps require git, go and ffmpeg (with libfdk-aac) to be installed. On macOS you can install them via macports.
sudo port install git go
sudo port install ffmpeg +nonfree
For ffmpeg you can also use pre-compiled binary from ffmpeg for homebridge but pay attention that it violates the GPL license.
To simulate the doorbell button you can write anything in the console and press enter.
If you want to create your own doorbell, you can run
hkdoorbell
on a Raspberry Pi with attached camera module and
input/output audio.
To create the binary run make build-rpi
or to get the package run
make package-rpi
.
The software requires the following things:
- ffmpeg with libfdk-aac and h264_omx. You can use a pre-compiled binary from ffmpeg for homebridge but pay attention that it violates the GPL license.
- enable the camera with
raspi-config
- input/audio HAT like ReSpeaker 2-Mics Pi HAT correctly configured;
check with
alsamixer
the parameters and set/etc/asound.conf
accordingly - one gpio connected to a phisical button with a pull-up resistor and a capacitor; as default GPIO 17 is used; can be changed with a command line parameter
- Compared to a "simple" camera plugin this plugin uses the HomeKit video doorbell profile. A "doorbell" notification with snapshot is sent to all iCloud connected devices. If the same (HomeKit) room containing this camera also has a Lock mechanism accessory, the notification will show a working UNLOCK button. HomeKit/iOS will link them together automatically when they are in the same room.
hkdoorbell
is available under the Apache License 2.0 license.
See the LICENSE file for more info.