Skip to content

NVR with realtime local object detection for IP cameras

Bug fix for ONVIF cameras, adjust_time parameter added (#12352)

stephendbaacb8c84e00e
diff --git a/docs/docs/configuration/reference.md b/docs/docs/configuration/reference.md
index 8b51de1489..93313d6c00 100644
--- a/docs/docs/configuration/reference.md
+++ b/docs/docs/configuration/reference.md
@@ -613,6 +613,9 @@ cameras:
user: admin
# Optional: password for login.
password: admin
+ # Optional: Ignores time synchronization mismatches between the camera and the server during authentication.
+ # Using NTP on both ends is recommended and this should only be set to True in a "safe" environment due to the security risk it represents.
+ ignore_time_mismatch: False
# Optional: PTZ camera object autotracking. Keeps a moving object in
# the center of the frame by automatically moving the PTZ camera.
autotracking:
diff --git a/frigate/config.py b/frigate/config.py
index 0e2d2b6cd0..bfa00f6014 100644
--- a/frigate/config.py
+++ b/frigate/config.py
@@ -279,6 +279,10 @@ class OnvifConfig(FrigateBaseModel):
default_factory=PtzAutotrackConfig,
title="PTZ auto tracking config.",
)
+ ignore_time_mismatch: bool = Field(
+ default=False,
+ title="Onvif Ignore Time Synchronization Mismatch Between Camera and Server",
+ )
class RetainModeEnum(str, Enum):
diff --git a/frigate/ptz/onvif.py b/frigate/ptz/onvif.py
index 2b9f00b747..39bdd69789 100644
--- a/frigate/ptz/onvif.py
+++ b/frigate/ptz/onvif.py
@@ -54,6 +54,7 @@ class OnvifController:
wsdl_dir=str(
Path(find_spec("onvif").origin).parent / "wsdl"
).replace("dist-packages/onvif", "site-packages"),
+ adjust_time=cam.onvif.ignore_time_mismatch,
),
"init": False,
"active": False,