blakeblackshear / frigate

NVR with realtime local object detection for IP cameras
https://frigate.video
MIT License
17.99k stars 1.64k forks source link

[Support]: Detect and Snapshots are regularly turned off automatically #6548

Closed billyjacoby closed 1 year ago

billyjacoby commented 1 year ago

Describe the problem you are having

It seems that at a semi-random rate detect and snapshots are turned off for some of my cameras. I have the host scheduled to restart once per day at 3:15am, and it seems like most of the time this is when the settings are turned off. However performing a restart manually at other times does not cause the same behavior.

I'm also connected to HomeAssistant using the custom card and integration. I've used MQTT explorer to clean up any dangling values to no avail.

Posting this here to try and figure this out.

Version

0.12.0-DA3E197

Frigate config file

mqtt:
  host: HASS HOST
  user: USER
  password: PASSWORD

detectors:
  coral:
    type: edgetpu
    device: usb

### Overall Config
objects:
    track:
       - person
       - car
       - dog
    filters:
      person:
        threshold: 0.72

record:
  enabled: true
  events: 
    pre_capture: 10
    post_capture: 10
    # objects: 
    #   - person
    #   - dog
    #   - car
    retain:
      mode: motion

rtmp: 
  enabled: true

### Garage Camera    
cameras:
  frigate_garage: # <------ Name the camera
    zones:
        street:
            coordinates: 0,0,0,54,640,52,640,0
            objects: []
    ffmpeg:
      inputs:
        - path: rtsp://USER:PASSWORD@IP/cam/realmonitor?channel=1&subtype=1 # <----- Update for your camera
          roles:
            - detect
        - path: rtsp://USER:PASSWORD@IP/cam/realmonitor?channel=1&subtype=0
          roles:
            - record
            - rtmp
    detect:
      width: 640 # <---- update for your camera's resolution
      height: 480 # <---- update for your camera's resolution
    objects:
        filters:
            car:
                mask:
                    - 640,0,640,62,0,52,0,0
        track:
            - person
            # Disabled while our cars are in the driveway
            # - car
            - dog

### Front Door Camera
  frigate_front_door: # <------ Name the camera
    ffmpeg:
      inputs:
        - path: rtsp://USER:PASSWORD@IP/cam/realmonitor?channel=2&subtype=1 # <----- Update for your camera
          roles:
            - detect
        - path: rtsp://USER:PASSWORD@IP/cam/realmonitor?channel=2&subtype=0
          roles:
            - record
            - rtmp
    detect:
      width: 640 # <---- update for your camera's resolution
      height: 480 # <---- update for your camera's resolution
    objects:
      mask: 640,204,640,250,79,220,90,162

Relevant log output

2023-05-20 03:17:51.057277132  [INFO] Starting Frigate...
2023-05-20 03:18:08.038332867  [2023-05-20 03:18:08] frigate.app                    INFO    : Starting Frigate (0.12.0-da3e197)
2023-05-20 03:18:08.202574350  [2023-05-20 03:18:08] frigate.config                 WARNING : RTMP restream is deprecated in favor of the restream role, recommend disabling RTMP.
2023-05-20 03:18:08.204774616  [2023-05-20 03:18:08] frigate.config                 WARNING : RTMP restream is deprecated in favor of the restream role, recommend disabling RTMP.
2023-05-20 03:18:08.249625478  [2023-05-20 03:18:08] peewee_migrate                 INFO    : Starting migrations
2023-05-20 03:18:08.399062346  [2023-05-20 03:18:08] peewee_migrate                 INFO    : There is nothing to migrate
2023-05-20 03:18:08.452153983  [2023-05-20 03:18:08] detector.coral                 INFO    : Starting detection process: 290
2023-05-20 03:18:08.823320234  [2023-05-20 03:18:08] frigate.comms.dispatcher       INFO    : Turning off detection for frigate_garage
2023-05-20 03:18:08.823469099  [2023-05-20 03:18:08] frigate.detectors.plugins.edgetpu_tfl INFO    : Attempting to load TPU as usb
2023-05-20 03:18:08.823570464  [2023-05-20 03:18:08] frigate.app                    INFO    : Output process started: 292
2023-05-20 03:18:08.823874541  [2023-05-20 03:18:08] frigate.app                    INFO    : Camera processor started for frigate_garage: 295
2023-05-20 03:18:08.824206789  [2023-05-20 03:18:08] frigate.app                    INFO    : Camera processor started for frigate_front_door: 297
2023-05-20 03:18:08.824553910  [2023-05-20 03:18:08] frigate.app                    INFO    : Capture process started for frigate_garage: 298
2023-05-20 03:18:08.824894028  [2023-05-20 03:18:08] frigate.app                    INFO    : Capture process started for frigate_front_door: 301
2023-05-20 03:18:11.582810372  [2023-05-20 03:18:11] frigate.detectors.plugins.edgetpu_tfl INFO    : TPU found
2023-05-20 06:34:02.386086853  [2023-05-20 06:34:02] frigate.comms.dispatcher       INFO    : Turning on detection for frigate_garage
2023-05-20 06:34:03.155634496  [2023-05-20 06:34:03] frigate.comms.dispatcher       INFO    : Turning on snapshots for frigate_garage
2023-05-20 06:34:08.536315972  [2023-05-20 06:34:08] frigate.comms.dispatcher       INFO    : Turning on snapshots for frigate_front_door

FFprobe output from your camera

Not sure if this is right, was run on the bare metal machine:

ffmpeg version 4.3.6-0+deb11u1 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 10 (Debian 10.2.1-6)
  configuration: --prefix=/usr --extra-version=0+deb11u1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100


### Frigate stats

_No response_

### Operating system

HassOS

### Install method

Docker Compose

### Coral version

USB

### Network connection

Wired

### Camera make and model

Amcrest 

### Any other information that may be helpful

_No response_
blakeblackshear commented 1 year ago

Do you expose frigate to the internet without auth or something? Do you have the nginx logs for that time period too? If there aren't any http requests, then there has to be an MQTT message coming from somewhere.

billyjacoby commented 1 year ago

No, it’s not exposed to the internet everything is accessed over VPN.

The strangest part is that snapshots get turned off, because that’s something I never toggle from Frigate or from HASS

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.