#Frigate - Reliable way to detect camera feed down

9 messages · Page 1 of 1 (latest)

rich dust
#

Is there a reliable way to detect if a camera feed goes down in Frigate?

Ever since I upgraded to .14 I have some of my feeds occasionally drop. If I restart frigate they all come back up. I know it's a Band-Aid but right now I'm trying to make an automation that restarts frigate if the one high priority camera goes down. I'm using detect FPS, but it doesn't seem to be reliable.

Any suggestions on what to use as a trigger?

Automation:

alias: Restart frigate if gate cam unavailable
description: ""
triggers:
  - trigger: state
    entity_id:
      - sensor.frigate_lorex_01_gate_detection_fps
    for:
      hours: 0
      minutes: 5
      seconds: 0
    to: "0"
conditions: []
actions:
  - action: script.restart_frigate_via_mqtt
    metadata: {}
    data: {}
  - delay:
      hours: 0
      minutes: 5
      seconds: 0
      milliseconds: 0
mode: single

Script:

alias: Restart Frigate Via MQTT
sequence:
  - action: mqtt.publish
    metadata: {}
    data:
      evaluate_payload: false
      qos: 0
      retain: false
      topic: frigate/restart
description: ""
icon: mdi:restart
surreal drift
#

check that camera_fps == 0

#

or that the camera is unavailable

#

you can't use detect fps and that will likely shut frigate down when it shouldn't

rich dust
#

I tried that initially, but it's steady at 5 fps through it all. I did notice the detect drops to 0 sometimes which makes sense...

Just looked this morning and cameras are down, but both detect and camera FPS at at 6, and 5 respectively, so I'm not sure this will work.

Any other suggestions?

#

Also, camera entity in the integration says "recording" through the whole time.

surreal drift
#

in what way is it "down"?

#

if the capture process fails then the camera fps will be set to 0

rich dust
#

... Something is off. It gives the dark screen that says no frames received. Just went to check logs and they won't load. It's actually freezing up the companion app. Can't click out of the proxy. A few minutes before I could load anything in the app so I could grab this screenshot. It actually gave a "can't connect to HA" error for a moment.

So, there's maybe something happening beyond just a camera feed that it's freezing up the interface.

Until the past week or so it wasn't all the cameras going down, it was just a few of them, and the others would stay up.