diff --git a/frigate/ptz/onvif.py b/frigate/ptz/onvif.py index 63a195651..5c2780fcc 100644 --- a/frigate/ptz/onvif.py +++ b/frigate/ptz/onvif.py @@ -104,9 +104,15 @@ class OnvifController: move_request.Translation.PanTilt.space = ptz_config["Spaces"][ "RelativePanTiltTranslationSpace" ][fov_space_id]["URI"] + + try: move_request.Translation.Zoom.space = ptz_config["Spaces"][ "RelativeZoomTranslationSpace" ][0]["URI"] + except Exception: + # camera does not support relative zoom + pass + if move_request.Speed is None: move_request.Speed = ptz.GetStatus({"ProfileToken": profile.token}).Position self.cams[camera_name]["relative_move_request"] = move_request