brutella / hkcam

Open-Source HomeKit Surveillance Camera
https://hochgatterer.me/hkcam/
Apache License 2.0
925 stars 141 forks source link

How to install on Rasbian Buster? #43

Closed La-te closed 2 years ago

La-te commented 5 years ago

Is all working with freshly released Rasbian Buster? Which is the preferred way for fresh install and which are known to work? hkcam image and apt upgrade, official Rasbian Buster and hkcam ansible or official Rasbian Buster and manual installation?

brutella commented 5 years ago

I haven't tested it on Buster yet.

robacarp commented 5 years ago

@La-te I went through a manual install on Stretch, and my notes are here. I'm sure it's not identical but the installation is straightforward enough that, as long as the packages exist for Buster, I doubt it'll cause any problems.

JekleFPV commented 4 years ago

@La-te I went through a manual install on Stretch, and my notes are here. I'm sure it's not identical but the installation is straightforward enough that, as long as the packages exist for Buster, I doubt it'll cause any problems.

Attempting to install it on Buster according to your notes, it won't install v4l2loopback, tried a workaround by installing it in a different way, but then I get the modprobe: FATAL: Module v4l2loopback not found in directory /lib/modules/4.xxxxx error.

I'm too much of a n00b to figure this out on my own, any clues on what I could do to get it working?

rcarmo commented 3 years ago

See #90 for the changes I did.

PvdGulik commented 3 years ago

Running on Raspberry Pi Zero W, with Buster!!

Hereby my detailed instructions:

_Bases on Robert Carpenter's installation with a few changes/additions:_

1 Preparations:

2 Change basic settings:

3 Before you go any further be sure your camera is working! If not resolve this first:

4 If camera is working, than install the following:

5 Install HKCam

6 Edit/add Systemd Service Configuration and Run Script Systemd Service Configuration: $ sudo nano /etc/systemd/system/hkcam.service add:

# /etc/systemd/system/hkcam.service

[Unit]
Description=HKcam HomeKit Camera
After=syslog.target network-online.target

[Service]
Type=simple
User=hkcam
WorkingDirectory=/home/hkcam
ExecStart=/usr/local/bin/hkcam
Restart=always
RestartSec=10
KillMode=process

[Install]
WantedBy=multi-user.target

followed by; ctrl-x, y, Enter

Run Script, more settings for HKCam found here: sudo nano /etc/hkcam add:

#!/bin/bash
# /etc/hkcam

# set the video4linux ctl parameters
v4l2-ctl --set-fmt-video=width=1280,height=720,pixelformat=YU12
v4l2-ctl -c video_bitrate=1000000

# exec over to hkcam  
exec /usr/local/bin/hkcam --min_video_bitrate=500 --multi_stream=true
# for old camera’s
# exec LD_PRELOAD=/usr/lib/arm-linux-gnueabihf/libv4l/v4l1compat.so /usr/local/bin/hkcam --min_video_bitrate=500

followed by ctrl-x, y, Enter

7 Activate the service sudo systemctl daemon-reload sudo systemctl start hkcam sudo systemctl enable hkcam sudo reboot

Your HKCam should now be working. Connect in the Homekit-app, following the instructions.

Debugging

If experience issues with the hkcam daemon, you can find log outputs at journalctl -xefu hkcam

brutella commented 2 years ago

hkcam supports Buster and Raspberry Pi OS since version 0.1.0.