1.0.1 • Published 8 years ago
homebridge-video-doorbell-rpi v1.0.1
homebridge-video-doorbell-rpi
Raspberry Pi video doorbell plugin for homebridge.
This plugin is based on homebridge-camera-rpi by moritzmhmk licensed under MIT license.
Prerequisite
- camera module activated (
raspi-config) - module
bcm2835-v4l2loaded (addbcm2835-v4l2to/etc/modulesand reboot) - ffmpeg installed (
sudo apt install ffmpegyou probably need to compile ffmpeg by yourself if it isn't available in the package manager)
Installation (as homebridge plugin)
npm install -g homebridge-video-doorbell-rpiedit config.json and add platform rpi-doorbell
{
...
"platforms": [
...
{
"platform": "rpi-doorbell",
"doorbells": [
{
"name": "Pi Video Doorbell",
}
]
}
]
}restart homebridge
add extra camera accessory in the home app (the setup code is the same as for homebridge)
Installation (standalone)
optionally install in opt:
cd /opt
sudo mkdir homebridge-video-doorbell-rpi
sudo chown pi homebridge-video-doorbell-rpiinstall:
git clone https://github.com/Supereg/homebridge-video-doorbell-rpi
cd homebridge-video-doorbell-rpi
npm installtest:
node standalone.js optionally create systemd service /etc/systemd/system/hap-doorbell-rpi.service:
[Unit]
Description=HAP Video Doorbell RPi
[Service]
ExecStart=/usr/local/bin/node /opt/homebridge-video-doorbell-rpi/standalone.js -c /etc/homebridge-video-doorbell-rpi.conf.json
WorkingDirectory=/opt/homebridge-video-doorbell-rpi
Restart=always
RestartSec=10
User=pi
[Install]
WantedBy=multi-user.target create config file /etc/homebridge-video-doorbell-rpi.conf.json:
{
"name": "Pi Video Doorbell",
"id": "Pi Video Doorbell",
"pincode": "031-45-154",
"username": "EC:23:3D:D3:CE:CE"
}id is used to generate the uuid and defaults to name when not defined
enable and start the service:
sudo systemctl enable hap-doorbell-rpi
sudo systemctl start hap-doorbell-rpiOptions
{
"name": "Pi Video Doorbell",
"id": "Pi Video Doorbell",
"rotate": 0,
"verticalFlip": false,
"horizontalFlip": false,
"debug": false
}Note: rotate currently only works for 0 and 180 degrees.