Homekit Secure Video with Frigate

Frigate is one of my favorite open-source NVR solutions. It integrates beautifully with mqtt, as well as Home Assistant, as well as providing AI tracking. But, what if you’re trying, like me, to have a low-cost way of storing two weeks of video in the cloud, such as how Apple’s latest offering?

This is where Scrypted and go2rtc comes into play. As of Frigate 12, go2rtc is bundled within Frigate to assist in the restreaming of video feeds, without putting additional stress/bandwidth on the individual cameras. to use Frigate 12, you will have to update any previous-config files to have a go2rtc section to provide streams to frigate, as well as Scrypted in the future.

Please note: 4/9/2024- the updated firmware for the RLC-820A allows the main camera to be rtsp and have audio by utilizing “- “rtsp://Username:[email protected]:554/””


go2rtc:
  streams:
    front_door_sub: 
      - http://192.168.1.x/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=Username&password=Password
      - "ffmpeg:reolink#audio=opus"
    front_door: 
      - rtsp://Username:[email protected]:554/h264Preview_01_main
      - "ffmpeg:reolink#audio=opus"
    birds:
      - rtsp://Username:[email protected]/live

  webrtc:
    candidates:
      - 192.168.1.x:8555
      - stun:8555

cameras:
  Front_Door:
    ffmpeg:
      output_args:
        record: preset-record-generic-audio-copy
      inputs:
        - path: rtsp://127.0.0.1:8554/front_door?video=copy&audio=aac
          input_args: preset-rtsp-restream
          roles:
            - record
        - path: rtsp://127.0.0.1:8554/front_door_sub?video=copy
          input_args: preset-rtsp-restream
          roles:
            - detect
  BirdCam:
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/birds?video=copy&audio=aac
          input_args: preset-rtsp-restream
          roles:
            - record
            - detect

The example above takes a few things into consideration, including utilizing reolink cameras, as well as one camera using one stream for both recording and detection, as well as one utilizing different streams. It is important to ensure that on the restream links to include “?video=copy” to ensure that you aren’t using the original stream.

Now that we have go2rtc setup, we can start working with Scrypted! Scrypted has built-in “plugins” that allow motion detection, homekit secure video, as well as much, much more. In our case, we will be using the RTSP plugin to add camera streams via the RTSP links (IE rtsp://192.168.1.x:8554/birds?video=copy&audio=aac). Please note: the IP must be the actual frigate host IP address, not the localhost address!

Next, we will have to enable motion detection inside of Scrypted as scrypted doesn’t allow motion alerts via MQTT at this time. Once motion is enabled per camera, we can enable homekit!

While there is the option for one home kit bridge for all cameras, it will not work properly. You will have to go to the “advanced” options inside of the Homekit section and select “enable standalone mode” which will provide you a QR code per camera to enroll it into your homekit system. From there, enable the default snapshot service and you should have all your streams showing happily inside of homekit with all videos’s being encrypted and hosted in the cloud for 2 weeks!

One final thing to note- While the camera’s are homekit secure-video enabled (why you can see the “Recording Options” and “Face Recognition” options), the devices will still show as Default, with “Homekit Certified” being “No”.

I hope this rough guide can help some of you out there, please feel free to reach out if you have any issues setting this up for yourself.


Posted

in

by

Tags:

Comments

2 responses to “Homekit Secure Video with Frigate”

  1. Colton House Avatar
    Colton House

    Thanks for the post been trying to feed frigate into scrypted but could not find a guide.

    1. Blaine Avatar

      Anytime! Let me know if you had any issues. I need to update this with the “mqtt” plugin for using detection from Frigate.

Leave a Reply

Your email address will not be published. Required fields are marked *

WordPress Appliance - Powered by TurnKey Linux