mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-05 02:35:22 +03:00
Catch onvif error
This commit is contained in:
parent
9bed778b1a
commit
b408676bf2
@ -35,21 +35,24 @@ class OnvifController:
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
if cam.onvif.host:
|
if cam.onvif.host:
|
||||||
self.cams[cam_name] = {
|
try:
|
||||||
"onvif": ONVIFCamera(
|
self.cams[cam_name] = {
|
||||||
cam.onvif.host,
|
"onvif": ONVIFCamera(
|
||||||
cam.onvif.port,
|
cam.onvif.host,
|
||||||
cam.onvif.user,
|
cam.onvif.port,
|
||||||
cam.onvif.password,
|
cam.onvif.user,
|
||||||
wsdl_dir=site.getsitepackages()[0].replace(
|
cam.onvif.password,
|
||||||
"dist-packages", "site-packages"
|
wsdl_dir=site.getsitepackages()[0].replace(
|
||||||
)
|
"dist-packages", "site-packages"
|
||||||
+ "/wsdl",
|
)
|
||||||
),
|
+ "/wsdl",
|
||||||
"init": False,
|
),
|
||||||
"active": False,
|
"init": False,
|
||||||
"presets": {},
|
"active": False,
|
||||||
}
|
"presets": {},
|
||||||
|
}
|
||||||
|
except ONVIFError as e:
|
||||||
|
logger.error(f"Onvif connection to {cam.name} failed: {e}")
|
||||||
|
|
||||||
def _init_onvif(self, camera_name: str) -> bool:
|
def _init_onvif(self, camera_name: str) -> bool:
|
||||||
onvif: ONVIFCamera = self.cams[camera_name]["onvif"]
|
onvif: ONVIFCamera = self.cams[camera_name]["onvif"]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user