You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cameras are a complicated situation. If you are running the [Docker way](https://github.com/NRCHKB/node-red-contrib-homekit-docker) then FFMPEG will be preinstalled for you with several of the options preset (may not have all hardware accelerations built). Alternately you can download and compile your own version of FFMPEG with the build flags you need for your cameras.
20
+
Cameras are a complicated situation. If you are running the [Docker way](https://github.com/NRCHKB/node-red-contrib-homekit-docker) then FFmpeg will be preinstalled for you with several of the options preset (may not have all hardware accelerations built). If you are on a system with `apt` (Raspberry pi, Ubuntu, Debian, etc) you can use the FFmpeg install script which is maintained by a couple of our users and designed for nrchkb users. This script is documented [here](https://github.com/marcus-j-davies/nrchkb-ffmpeg-build) and can be run at any time using this one-line terminal command then following the prompts:
21
21
22
-
For those writing examples, please include how you have installed FFMPEG!
For those writing examples, please include how you have installed FFmpeg (including any special build flags)!
23
27
24
-
It is recommended to add only one camera per bridge. The camera should be the "parent" service with "motion" and "doorbell" (if used) as linked services.
28
+
It is recommended use "Accessory" as the Host Type for cameras. The camera should be the "parent" service with "motion" and "doorbell" (if used) as linked services.
25
29
26
30
### How to debug issues
27
31
28
-
If you have problems with FFMPEG (if you think the camera is set up properly but it "does nothing" then you might have FFMPEG problems) then please follow these steps to properly debug your FFMPEG setup.
32
+
If you have problems with FFmpeg (if you think the camera is set up properly but it "does nothing" then you might have FFmpeg problems) then please follow these steps to properly debug your FFmpeg setup.
29
33
30
34
- Configure Camera Control node in Node-RED
31
35
- Run Node-RED with `DEBUG=NRCHKB*,CameraSource*` and tick "debug mode" in Camera Control
32
36
-
33
37
- Try to open Camera stream in Home.app
34
-
- It will error again but will also print FFMPEG command in logs
38
+
- It will error again but will also print FFmpeg command in logs
35
39
- Run that command in terminal separately to get real problem
36
40
37
41
## Examples
38
42
39
43
### * Raspberry Pi Zero W
40
44
41
-
Example written by CRXPorter. Date 21 November 2020. Plugin version 1.2.0, Node-RED version 1.2.5.
45
+
Example written by CRXPorter. Date 21 November 2020, updated February, 2022. Plugin version 1.4.3, Node-RED version 2.1.5.
42
46
43
47
Hardware:\
44
48
-Raspberry Pi Zero W\
@@ -50,7 +54,11 @@ Step **zero**: I assume you are able to set up a pi zero with SSH and Wi-Fi. I a
50
54
51
55
Step **one**: use `raspi-config` to enable the camera interface on the pi
52
56
53
-
Step **two**: install FFMPEG for HomeBridge using the script [found here](https://github.com/homebridge/ffmpeg-for-homebridge)
57
+
Step **two**: install FFmpeg for HomeBridge using our script:
Step **five**: import this flow. It should be a single homekit node
60
68
61
69
```json
62
-
[{"id":"36df1f80.39e34","type":"homekit-service","z":"c9e35eda.bb75f8","isParent":true,"bridge":"f18ad79f.5081e8","parentService":"","name":"Pi zero camera","serviceName":"CameraControl","topic":"","filter":false,"manufacturer":"NRCHKB","model":"1.2.0","serialNo":"Default Serial Number","firmwareRev":"1.2.0","hardwareRev":"1.2.0","softwareRev":"1.2.0","cameraConfigVideoProcessor":"ffmpeg","cameraConfigSource":"-re -r 6 -s 1280x720 -f video4linux2 -i /dev/video0","cameraConfigStillImageSource":"-s 1280x720 -f video4linux2 -i /dev/video0","cameraConfigMaxStreams":2,"cameraConfigMaxWidth":"1280","cameraConfigMaxHeight":"720","cameraConfigMaxFPS":"6","cameraConfigMaxBitrate":300,"cameraConfigVideoCodec":"h264_omx","cameraConfigAudioCodec":"h264_omx","cameraConfigAudio":false,"cameraConfigPacketSize":"564","cameraConfigVerticalFlip":false,"cameraConfigHorizontalFlip":false,"cameraConfigMapVideo":"0:0","cameraConfigMapAudio":"0:1","cameraConfigVideoFilter":"","cameraConfigAdditionalCommandLine":"-tune zerolatency","cameraConfigDebug":false,"cameraConfigSnapshotOutput":"disabled","cameraConfigInterfaceName":"","characteristicProperties":"{}","waitForSetupMsg":false,"outputs":3,"x":430,"y":260,"wires":[[],[],[]]},{"id":"f18ad79f.5081e8","type":"homekit-bridge","bridgeName":"Camera","pinCode":"111-11-111","port":"","allowInsecureRequest":false,"manufacturer":"Raspberry Pi","model":"Pi zero w","serialNo":"00001","firmwareRev":"1.2.0","hardwareRev":"1.2.0","softwareRev":"1.2.0","customMdnsConfig":false,"mdnsMulticast":true,"mdnsInterface":"","mdnsPort":"","mdnsIp":"","mdnsTtl":"","mdnsLoopback":true,"mdnsReuseAddr":true,"allowMessagePassthrough":true}]
70
+
[{"id":"36df1f80.39e34","type":"homekit-service","z":"c9e35eda.bb75f8","isParent":true,"bridge":"f18ad79f.5081e8","parentService":"","name":"Pi zero camera","serviceName":"CameraControl","topic":"","filter":false,"manufacturer":"NRCHKB","model":"1.2.0","serialNo":"Default Serial Number","firmwareRev":"1.2.0","hardwareRev":"1.2.0","softwareRev":"1.2.0","cameraConfigVideoProcessor":"ffmpeg","cameraConfigSource":"-re -r 6 -s 1280x720 -f video4linux2 -i /dev/video0","cameraConfigStillImageSource":"-s 1280x720 -f video4linux2 -i /dev/video0","cameraConfigMaxStreams":2,"cameraConfigMaxWidth":"1280","cameraConfigMaxHeight":"720","cameraConfigMaxFPS":"6","cameraConfigMaxBitrate":300,"cameraConfigVideoCodec":"h264_v4l2m2m","cameraConfigAudioCodec":"h264_v4l2m2m","cameraConfigAudio":false,"cameraConfigPacketSize":"564","cameraConfigVerticalFlip":false,"cameraConfigHorizontalFlip":false,"cameraConfigMapVideo":"0:0","cameraConfigMapAudio":"0:1","cameraConfigVideoFilter":"","cameraConfigAdditionalCommandLine":"-tune zerolatency","cameraConfigDebug":false,"cameraConfigSnapshotOutput":"disabled","cameraConfigInterfaceName":"","characteristicProperties":"{}","waitForSetupMsg":false,"outputs":3,"x":430,"y":260,"wires":[[],[],[]]},{"id":"f18ad79f.5081e8","type":"homekit-bridge","bridgeName":"Camera","pinCode":"111-11-111","port":"","allowInsecureRequest":false,"manufacturer":"Raspberry Pi","model":"Pi zero w","serialNo":"00001","firmwareRev":"1.2.0","hardwareRev":"1.2.0","softwareRev":"1.2.0","customMdnsConfig":false,"mdnsMulticast":true,"mdnsInterface":"","mdnsPort":"","mdnsIp":"","mdnsTtl":"","mdnsLoopback":true,"mdnsReuseAddr":true,"allowMessagePassthrough":true}]
63
71
```
64
72
65
-
(Note to self: need to add this to the examples for next release)
66
-
67
73
Step **six**: add it to your Home.app and enjoy!
68
74
69
75
Notes:\
@@ -90,54 +96,16 @@ Cameras tested:
90
96
- Unifi G3 Bullet
91
97
- Unifi G4 Doorbell
92
98
93
-
Motion detection and doorbell presses are available for advanced users, ask @crxporter on discord. A new Unifi node is pending from CRXPorter - hopefully coming late 2020.
94
-
95
-
FFMPEG was installed on a pi 4. Node-RED was installed with the official Node-RED on pi install script.
96
-
97
-
#### FFMPEG Install
99
+
Motion detection and doorbell presses are available for advanced users, ask @crxporter on discord. A new Unifi node is in active development, check [here](https://github.com/NRCHKB/node-red-contrib-unifi-os) for that project.
98
100
99
-
Install build tools
101
+
FFmpeg was installed on a pi 4. Node-RED was installed with the official Node-RED on pi install script.
This is a work in progress. Written October 9, 2020. Please find me (crxporter) on [our discord server](https://discord.gg/uvYac5u) if you're having problems or would like more information.
134
+
This is a work in progress. Updated 18 February 2022. Please find me (crxporter) on [our discord server](https://discord.gg/uvYac5u) if you're having problems or would like more information.
0 commit comments