Help Installing Frigate and running the add-on on HAOS

Here’s where I am so far. I have a Neolink camera and Neolink integration. I’m able to view the streams including motion on my card in the dashboard. So the hardware is working.

Installed Frigate and Frigate Lovelace from HACS.

Set up an MQTT broker on my Synology drive which is 192.168.1.103 with the correct port open. MQTT broker is running.

Installed MQTT in HA pointing to my Synology broker, proper password and login.

Created a frigate.yml in root/config. Installed the add-on for Frigate.

Have put this into my frigate.yml file:

mqtt:
  host: 192.168.1.103
cameras:
  camera_1: Neolink
  back:
    ffmpeg:
      inputs:
        - path: rtsp://viewer:{FRIGATE_RTSP_PASSWORD}@192.168.1.105:55/cam/realmonitor?channel=1&subtype=2
          roles:
            - detect
            - rtmp
    detect:
      width: 1280
      height: 720

When trying to start the add-on, it returns the STOP and RESTART buttons. in RED.

Clicking on Frigate on the side bar gives me an error that the add-on is not running.

So I’m stuck here. Not sure what the IP should be in the rtsp viewer line, not sure if I need a password or which password that would be.

You need to check the addon logs to see what the error is. Most likely it is an issue because MQTT requires user / pass by default

The logs were VERY helpful. It seems that the formatting of the config file is very important. So I believe I now have the nvr working properly and integrated into HA.

One t hing confuses me. I thought that RTSP (or is it RTMP) was the way to stream the neolink video, but on a support page it suggested this to connect to the stream:

http://192.168.1.105/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=#####&password=######

And in the integration, it seems to have set it to flv. Should I be switching the integration and modify the config accordingly?

that’s talking about connecting to reolink cameras directly. Your reolink camera does not support that so you need to use whatever neolink offers

1 Like

I think my camera supports both.

well, then why are you using neolink at all vs just connecting to the camera directly?

That was going to be my comment. By default Neolink uses port 8554 (which you can change). @harryfine your config looks like it is circumventing your Neolink instance. You should be able to put your Neolink RTSP stream into VLC media player and it should work flawlessly. Just use the same stream into your frigate.yml

Here’s my config - forgive the comments out - I’ve done a lot of enabling and disabling of options

birdseye:
  enabled: True
  mode: continuous

record:
  enabled: True
  events:
    retain:
      default: 14

mqtt:
  host: 10.0.45.5
  user: 
  password: 

cameras:
  frontdoor_cam:
    rtmp:
      enabled: false
    ffmpeg:
#      input_args:
#        - -avoid_negative_ts
#       - make_zero
#       - -fflags
#       - nobuffer+genpts+discardcorrupt
#       - -flags
#        - low_delay
#        - -strict
#        - experimental
#        - -analyzeduration
 #       - 1000M
 #       - -probesize
 #       - 1000M
 #       - "5000000"
      output_args:
        record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v copy -c:a aac
      hwaccel_args: -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 
      # -hwaccel_output_format yuv420p

      inputs:
        - path: rtsp://10.0.45.22:8554/frontdoor
          roles: 
            - detect
            - clip
            - rtmp

    motion:
      mask:
#   HD     - 661,360,918,374,949,0,631,0,0,0,0,1080,622,1080
#   HD     - 1651,1080,1419,684,1466,427,1376,438,1328,318,1340,159,1360,0,1920,0,1920,1080
        - 1351,512,3840,347,3840,0,0,0,0,2160,1240,2160
        - 2832,1362,3262,2160,3840,2160,3840,176,2749,174
    detect:
      width: 3840
      height: 2160
      fps: 5

    objects:
      track:
        - person
        - car
        - bicycle

    snapshots:
      enabled: true
      timestamp: true
      bounding_box: true

  frontdrive_cam:
    rtmp:
      enabled: false
    ffmpeg:
      hwaccel_args: -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 
      # -hwaccel_output_format yuv420p
      output_args:
        record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v copy -c:a aac
      inputs:
        - path: rtsp://10.0.45.22:8554/driveway
          roles: 
            - detect
            - clip
            - rtmp

    zones:
      street_zone:
#  HD   coordinates: 1725,233,1218,105,1232,0,1920,0,1920,189
        coordinates: 2456,269,3840,586,3840,0,2486,0
        objects:
          - person
          - car
          - bicycle

          
      driveway_zone:
#  HD   coordinates: 1715,214,1062,31,443,385,518,670,207,1080,1920,1080,1920,179
        coordinates: 3840,2160,401,2160,951,0,2488,0,2445,276,3840,612
        objects:
          - person
          - car
          - bicycle
        filters:
          person:
            threshold: 0.8

          
      deckgrass_zone:
#  HD   coordinates: 521,650,203,1080,0,1080,0,0,560,0
        coordinates: 410,2160,0,2160,0,0,938,0
        objects:
          - person
          - car
          
    detect:
      width: 3840
      height: 2160
      fps: 5

    objects:
      track:
        - person
        - car
        
    snapshots:
      enabled: true
      timestamp: true
      bounding_box: true


  backbbq_cam:
    rtmp:
      enabled: false
    ffmpeg:
      output_args:
        record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v copy -c:a aac
      hwaccel_args: -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 
      #-hwaccel_output_format yuv420p
      inputs:
        - path: rtsp://10.0.45.22:8554/bbq
          roles: 
            - detect
            - clip
            - rtmp

    motion:
      mask:
# HD    - 1920,1080,1920,0,823,0,0,0,0,1080,460,1080,551,857,567,309,1104,308,1040,496,1202,844,1383,1080
        - 1010,2160,1187,1471,1170,1037,1164,507,2694,534,2681,650,3840,0,0,0,0,2160
        - 3840,2160,3840,1354,3840,710,3840,417,2698,450,2501,1297,2434,1807,2768,2160

    detect:
      width: 3840
      height: 2160
      fps: 5

    objects:
      track:
        - person
        - dog
      filters:
        person:
          threshold: 0.8
    snapshots:
      enabled: true
      timestamp: true
      bounding_box: true


  backbins_cam:
    rtmp:
      enabled: false
    ffmpeg:
      hwaccel_args: -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 
      #      -hwaccel_output_format yuv420p
      output_args:
        record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v copy -c:a aac
      inputs:
        - path: rtsp://10.0.45.22:8554/backgarage
          roles: 
            - detect
            - clip
            - rtmp


    detect:
      width: 3840
      height: 2160
      fps: 5

    objects:
      track:
        - person
        - dog

 #   motion:
 #     mask:
 # HD      - 1920,128,1374,127,1275,576,1466,1080,1920,1080
 # HD      - 914,1080,964,641,922,125,0,130,0,1080
    motion:
      mask:
        - 3840,0,2512,0,0,0,0,918,1393,330,2127,353,2551,412,2775,699,2535,1154,2959,2160,3840,2160
        
    snapshots:
      enabled: true
      timestamp: true
      bounding_box: true


  backgrass_cam:
    rtmp:
      enabled: false
    ffmpeg:
      hwaccel_args: -hwaccel vaapi -hwaccel_device /dev/dri/renderD128
      output_args:
        record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v copy -c:a aac
      #-hwaccel_output_format yuv420p
      inputs:
        - path: rtsp://10.0.45.22:8554/backgrass
          roles: 
            - detect
            - clip
            - rtmp
#    motion:
#      mask:
#        - 1920,750,1244,489,1101,405,777,338,714,0,1920,0
#HD        - 709,345,669,350,619,368,533,385,416,382,212,418,0,586,0,0,719,0,743,334
#HD        - 0,350,0,1080,351,1080

    motion:
      mask:
        - 3840,0,2127,0,0,0,0,585,903,275,1209,467,2500,777,3840,1115
        - 0,2160,0,887,94,1064,498,2160
    detect:
      width: 3840
      height: 2160
      fps: 5

    objects:
      track:
        - person
        - dog
      filters:
        person:
          threshold: 0.8
        dog:
          threshold: 0.75
        
        
    snapshots:
      enabled: true
      timestamp: true
      bounding_box: true




  frontgrass_cam:
    rtmp:
      enabled: false
    ffmpeg:
      output_args:
        record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v copy -c:a aac
      hwaccel_args: -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 
      #-hwaccel_output_format yuv420p
      inputs:
        - path: rtsp:/10.0.45.22:8554/frontgrass
          roles: 
            - detect
            - clip
            - rtmp

    detect:
      width: 3840
      height: 2160
      fps: 5
    motion:
      mask:
#  HD       - 1333,1080,1056,778,993,0,1920,0,1920,1080
        - 3840,2160,2182,2160,2154,0,3840,0

    zones:
      street_zone_grass:
        coordinates: 0,565,0,0,2328,0,2185,510
        objects:
          - person
          - car

      grass_zone:
        coordinates: 0,2160,2905,2160,2354,502,0,562
        objects:
          - person

    objects:
      track:
        - person

        
    snapshots:
      enabled: true
      timestamp: true
      bounding_box: true


detectors:
  coral:
    type: edgetpu
    device: usb

#detectors: 
#  cpu1:
#   type: cpu
#  cpu2:
#    type: cpu

While using Neolink for my Blue Iris the path is rtsp://127.0.0.1:8554/camera but if I input rtsp://user:[email protected]:8554/camera into VLC network stream I get an error “VLC is unable to open the MRL 'rtsp…” I’m assuming the rtsp address I have for Neolink is some sort of default since my config (toml) file is almost verbatim from the GitHub example. Obvioulsy if it’s wrong fro VLC it won’t work in Frigate either.
So my question is how did you get - path: rtsp:/10.0.45.22:8554/frontgrass ? Not sure getting my camera to that address would help anyway - just curious. The lone camera I have tried with Frigate is a Reolink but provides it’s own rtsp streams. Might be time for new cameras - these were cheap Lumus wifi ones (2) and I like the video quality and spotlight at night, but might just leave them on BI and add better POE ones to cover the same area. Thanks