curl -sL https://deb.nodesource.com/setup_14.x | sudo bash -
sudo apt install -y nodejs gcc g++ make python net-tools
node -v
sudo npm install -g --unsafe-perm homebridge homebridge-config-ui-x
sudo hb-service install --user homebridge
sudo npm install -g homebridge-camera-ffmpeg
and/or maybe
npm install -g homebridge-ip-camera
http://<ip address of your server>:8581
/var/lib/homebridge
add to homebridge config:
{
"platform": "Camera-ffmpeg",
"cameras": [
{
"name": "piCam",
"uploader": false,
"videoConfig": {
"source": "-re -f video4linux2 -i /dev/video0",
"stillImageSource": "-re -f video4linux2 -ss 0.9 -i /dev/video0 -vframes 1",
"maxStreams": 2,
"maxWidth": 1920,
"maxHeight": 1080,
"maxFPS": 30,
"vcodec": "h264_omx"
}
}
]
}
add multiple camera
``{ "platform": "Camera-ffmpeg", "cameras": [ { "name": "piCam", "uploader": false, "videoConfig": { "source": "-re -f video4linux2 -i /dev/video0", "stillImageSource": "-re -f video4linux2 -ss 0.9 -i /dev/video0 -vframes 1", "maxStreams": 2, "maxWidth": 1920, "maxHeight": 1080, "maxFPS": 30, "vcodec": "h264_omx" } }, { "name": "piCam", "videoConfig": { "source": "-re -i http://admin:192.168.178.71:8081/usr/bin/motion", "stillImageSource": "-i 192.168.178.71:8081/", "maxStreams": 2, "maxWidth": 1920, "maxHeight": 1080, "maxFPS": 15 } } ] }
# adding motion
`"motion" : true,`
# File storage
try /data/output/Camera1/
/home/ftp/sdcard/Camera1