From 4f2624022a5ea05c3053efc23dab205193922dd5 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Mon, 3 Jul 2023 12:05:14 -0500 Subject: [PATCH] disable autotracking if onvif init fails --- frigate/ptz_autotrack.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frigate/ptz_autotrack.py b/frigate/ptz_autotrack.py index c9d4d332a..ce1ba8519 100644 --- a/frigate/ptz_autotrack.py +++ b/frigate/ptz_autotrack.py @@ -147,7 +147,12 @@ class PtzAutoTracker: if not self.onvif._init_onvif(camera_name): logger.warning(f"Unable to initialize onvif for {camera_name}") cam.onvif.autotracking.enabled = False + self.camera_metrics[camera_name][ + "ptz_autotracker_enabled" + ].value = False + return + if not self.onvif.cams[camera_name]["relative_fov_supported"]: cam.onvif.autotracking.enabled = False self.camera_metrics[camera_name][