mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-12-23 19:11:14 +01:00
Bug fix for ONVIF cameras, adjust_time parameter added (#12352)
* adds adjust_time which allows users to fix an issue with onvif authentication where time is not syncrhonized * updated adjust_time to ignore_time_mismatch to make it clearer what this option does * adds ignore_time_mismatch to the reference.md and adds a line about the security risk this can introduce as well as the recommendation to setup NTP for both ends. * fix format error * happy now linter? * white space * Update docs/docs/configuration/reference.md Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> --------- Co-authored-by: Stephen Butler <stephen.butler@ni.com> Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
This commit is contained in:
parent
f44df9fe61
commit
aacb8c84e0
@ -613,6 +613,9 @@ cameras:
|
|||||||
user: admin
|
user: admin
|
||||||
# Optional: password for login.
|
# Optional: password for login.
|
||||||
password: admin
|
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
|
# Optional: PTZ camera object autotracking. Keeps a moving object in
|
||||||
# the center of the frame by automatically moving the PTZ camera.
|
# the center of the frame by automatically moving the PTZ camera.
|
||||||
autotracking:
|
autotracking:
|
||||||
|
@ -279,6 +279,10 @@ class OnvifConfig(FrigateBaseModel):
|
|||||||
default_factory=PtzAutotrackConfig,
|
default_factory=PtzAutotrackConfig,
|
||||||
title="PTZ auto tracking config.",
|
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):
|
class RetainModeEnum(str, Enum):
|
||||||
|
@ -54,6 +54,7 @@ class OnvifController:
|
|||||||
wsdl_dir=str(
|
wsdl_dir=str(
|
||||||
Path(find_spec("onvif").origin).parent / "wsdl"
|
Path(find_spec("onvif").origin).parent / "wsdl"
|
||||||
).replace("dist-packages/onvif", "site-packages"),
|
).replace("dist-packages/onvif", "site-packages"),
|
||||||
|
adjust_time=cam.onvif.ignore_time_mismatch,
|
||||||
),
|
),
|
||||||
"init": False,
|
"init": False,
|
||||||
"active": False,
|
"active": False,
|
||||||
|
Loading…
Reference in New Issue
Block a user