Skip to content

NVR with realtime local object detection for IP cameras

check for onvif movement support before attempting movement (#13771)

Josh Hawkins9bcb928715ce
diff --git a/frigate/ptz/onvif.py b/frigate/ptz/onvif.py
index 9c20ebf628..d13b7bbc3f 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"]