From 9bcb928715ce40429da197e850a41449a4f4141f Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Mon, 16 Sep 2024 11:46:35 -0500 Subject: [PATCH] check for onvif movement support before attempting movement (#13771) --- frigate/ptz/onvif.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/frigate/ptz/onvif.py b/frigate/ptz/onvif.py index 9c20ebf62..d13b7bbc3 100644 --- a/frigate/ptz/onvif.py +++ b/frigate/ptz/onvif.py @@ -335,6 +335,10 @@ class OnvifController: ) self._stop(camera_name) + if "pt" not in self.cams[camera_name]["features"]: + logger.error(f"{camera_name} does not support ONVIF pan/tilt movement.") + return + self.cams[camera_name]["active"] = True onvif: ONVIFCamera = self.cams[camera_name]["onvif"] move_request = self.cams[camera_name]["move_request"] @@ -476,6 +480,10 @@ class OnvifController: ) self._stop(camera_name) + if "zoom" not in self.cams[camera_name]["features"]: + logger.error(f"{camera_name} does not support ONVIF zooming.") + return + self.cams[camera_name]["active"] = True onvif: ONVIFCamera = self.cams[camera_name]["onvif"] move_request = self.cams[camera_name]["move_request"]