Setting up the Reolink Video Doorbell in Frigate

One of my goals with my Intel N100 Mini PC was to use it as net video recorder. I’ve been using a Eufy doorbell for a couple of years now, and while it is one of the better options if you want something consumer-friendly, I never was terribly impressed with it due to the inherent limitations of a wireless camera, among other things.

Frigate is an open-source NVR solution that integrates well into Home Assistant. My recommendation is to run it via docker composer, as explained in the Frigate documentation. Regarding a suitable camera, a quick online search turned out that the Reolink PoE Video Doorbell would be a good choice. It is affordable, comes with mobile as well as Windows app, and even a Home Assistant integration. There’s no subscription fee, local storage is possible via an SD card. Replacing the existing doorbell wires with an UTP cable was a straightforward job. I also got a PoE injector (TP-Link TL-POE150S) for providing power.

I did the initial setup in the mobile app. You need to create an account on the camera, the username and password will be used later on for connecting to the camera streams. It might be necessary to turn on the streams in Device information – Network information – Advanced. I ran into an often-reported issue that the camera would not switch to color during daytime. I downloaded an older firmware here and installed it with the Windows app, including a full reset, which seems to have solved the issue even though the camera still reports a newer firmware version.

For configuring the camera in Frigate, I initially followed this article. It was very helpful, but was missing the explanation of how to enable Intel OpenVino for GPU-based object detection. It can also be optimized a bit by using the full-resolution stream for recording and live view, and re-using the go2rtc stream. So, without further ado, here’s my complete configuration:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
mqtt: # required for Home Assistant integration
host: 192.168.0.100
user: xxx
password: yyy
detectors:
ov_0:
type: openvino
device: GPU
model:
width: 300
height: 300
input_tensor: nhwc
input_pixel_format: bgr
path: /openvino-model/ssdlite_mobilenet_v2.xml
labelmap_path: /openvino-model/coco_91cl_bkgr.txt
ffmpeg:
hwaccel_args: preset-vaapi
go2rtc:
streams:
Deurbel:
- ffmpeg:https://192.168.20.100/flv?port=554&app=bcs&stream=channel0_ext.bcs&user=xxx&password=yyy
- rtsp://xxx:yyy@192.168.20.100:554/Preview_01_main # high-res stream
- ffmpeg:doorbell#audio=opus
ffmpeg:
hwaccel_args: preset-vaapi
bin: ffmpeg
volume: -af "volume=30dB"
cameras:
Deurbel: # <------ Name the camera
enabled: true
ffmpeg:
inputs:
- path: rtsp://xxx:yyy@192.168.20.100:554/h264Preview_01_sub # low-res stream for detection
roles:
- detect
- path: rtsp://127.0.0.1:8554/Deurbel # re-use of go2rtc stream for recording
roles:
- record
hwaccel_args: preset-vaapi
output_args:
record: preset-record-generic-audio-copy
detect:
enabled: true # <---- disable detection until you have a working camera feed
width: 300
height: 300
record:
enabled: true
retain:
days: 0
alerts:
pre_capture: 10
post_capture: 10
retain:
days: 30 # <- number of days to keep alert recordings
detections:
pre_capture: 10
post_capture: 10
retain:
days: 30 # <- number of days to keep detections recordings
motion:
mask: 0,0,0,0.262,0.377,0.249,0.372,0.491,0.845,0.43,0.966,0,0.384,0
zones:
voortuin:
coordinates:
0.034,0.706,0.405,0.63,0.429,0.486,0.854,0.434,0.867,0.652,0.942,0.791,0.893,0.971,0.331,0.975,0.112,0.984
loitering_time: 1
inertia: 3
voortuin_rand:
coordinates: 0.02,0.625,0.036,0.699,0.4,0.627,0.424,0.489,0.38,0.497,0.36,0.569
loitering_time: 1
review:
alerts:
required_zones: voortuin
detections:
required_zones:
- voortuin
- voortuin_rand
ui: {}
version: 0.15-1
mqtt: # required for Home Assistant integration host: 192.168.0.100 user: xxx password: yyy detectors: ov_0: type: openvino device: GPU model: width: 300 height: 300 input_tensor: nhwc input_pixel_format: bgr path: /openvino-model/ssdlite_mobilenet_v2.xml labelmap_path: /openvino-model/coco_91cl_bkgr.txt ffmpeg: hwaccel_args: preset-vaapi go2rtc: streams: Deurbel: - ffmpeg:https://192.168.20.100/flv?port=554&app=bcs&stream=channel0_ext.bcs&user=xxx&password=yyy - rtsp://xxx:yyy@192.168.20.100:554/Preview_01_main # high-res stream - ffmpeg:doorbell#audio=opus ffmpeg: hwaccel_args: preset-vaapi bin: ffmpeg volume: -af "volume=30dB" cameras: Deurbel: # <------ Name the camera enabled: true ffmpeg: inputs: - path: rtsp://xxx:yyy@192.168.20.100:554/h264Preview_01_sub # low-res stream for detection roles: - detect - path: rtsp://127.0.0.1:8554/Deurbel # re-use of go2rtc stream for recording roles: - record hwaccel_args: preset-vaapi output_args: record: preset-record-generic-audio-copy detect: enabled: true # <---- disable detection until you have a working camera feed width: 300 height: 300 record: enabled: true retain: days: 0 alerts: pre_capture: 10 post_capture: 10 retain: days: 30 # <- number of days to keep alert recordings detections: pre_capture: 10 post_capture: 10 retain: days: 30 # <- number of days to keep detections recordings motion: mask: 0,0,0,0.262,0.377,0.249,0.372,0.491,0.845,0.43,0.966,0,0.384,0 zones: voortuin: coordinates: 0.034,0.706,0.405,0.63,0.429,0.486,0.854,0.434,0.867,0.652,0.942,0.791,0.893,0.971,0.331,0.975,0.112,0.984 loitering_time: 1 inertia: 3 voortuin_rand: coordinates: 0.02,0.625,0.036,0.699,0.4,0.627,0.424,0.489,0.38,0.497,0.36,0.569 loitering_time: 1 review: alerts: required_zones: voortuin detections: required_zones: - voortuin - voortuin_rand ui: {} version: 0.15-1
mqtt: # required for Home Assistant integration
  host: 192.168.0.100
  user: xxx
  password: yyy

detectors:
  ov_0:
    type: openvino
    device: GPU

model:
  width: 300
  height: 300
  input_tensor: nhwc
  input_pixel_format: bgr
  path: /openvino-model/ssdlite_mobilenet_v2.xml
  labelmap_path: /openvino-model/coco_91cl_bkgr.txt

ffmpeg:
  hwaccel_args: preset-vaapi

go2rtc:
  streams:
    Deurbel:
      - ffmpeg:https://192.168.20.100/flv?port=554&app=bcs&stream=channel0_ext.bcs&user=xxx&password=yyy
      - rtsp://xxx:yyy@192.168.20.100:554/Preview_01_main # high-res stream
      - ffmpeg:doorbell#audio=opus

  ffmpeg:
    hwaccel_args: preset-vaapi
    bin: ffmpeg
    volume: -af "volume=30dB"

cameras:
  Deurbel: # <------ Name the camera
    enabled: true
    ffmpeg:
      inputs:
        - path: rtsp://xxx:yyy@192.168.20.100:554/h264Preview_01_sub # low-res stream for detection
          roles:
            - detect
        - path: rtsp://127.0.0.1:8554/Deurbel # re-use of go2rtc stream for recording
          roles:
            - record
      hwaccel_args: preset-vaapi
      output_args:
        record: preset-record-generic-audio-copy
    detect:
      enabled: true # <---- disable detection until you have a working camera feed
      width: 300
      height: 300

    record:
      enabled: true
      retain:
        days: 0
      alerts:
        pre_capture: 10
        post_capture: 10
        retain:
          days: 30 # <- number of days to keep alert recordings
      detections:
        pre_capture: 10
        post_capture: 10
        retain:
          days: 30 # <- number of days to keep detections recordings

    motion:
      mask: 0,0,0,0.262,0.377,0.249,0.372,0.491,0.845,0.43,0.966,0,0.384,0
    zones:
      voortuin:
        coordinates: 
          0.034,0.706,0.405,0.63,0.429,0.486,0.854,0.434,0.867,0.652,0.942,0.791,0.893,0.971,0.331,0.975,0.112,0.984
        loitering_time: 1
        inertia: 3
      voortuin_rand:
        coordinates: 0.02,0.625,0.036,0.699,0.4,0.627,0.424,0.489,0.38,0.497,0.36,0.569
        loitering_time: 1
    review:
      alerts:
        required_zones: voortuin
      detections:
        required_zones:
          - voortuin
          - voortuin_rand
ui: {}
version: 0.15-1

I’ve created a relatively large motion mask that masks out the camera timestamp, tree branches, and the sky. I’ve got two zones, one along the edge of the front yard that allows for detections but does not create alerts, and a second zone further inward that creates alerts.

So far I haven’t been able to get two-way audio to work, but this does not have high priority to me as this is not a feature that I regularly use. I would be more likely to use it from the Reolink phone app anyways.

I did have an issue with warnings in the log about not being able to keep up, these appear to have been solved by setting the pre_capture and post_capture time to 10. I also set the mem_swappiness to 0 in the docker compose file, as described here.

For display on my Home Assistant dashboard, I downloaded the Advanced Camera Card through HACS. This can also use the Reolink integration as source.

 

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert