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,6 +35,7 @@ class OnvifController:
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
if cam.onvif.host:
|
if cam.onvif.host:
|
||||||
|
try:
|
||||||
self.cams[cam_name] = {
|
self.cams[cam_name] = {
|
||||||
"onvif": ONVIFCamera(
|
"onvif": ONVIFCamera(
|
||||||
cam.onvif.host,
|
cam.onvif.host,
|
||||||
@ -50,6 +51,8 @@ class OnvifController:
|
|||||||
"active": False,
|
"active": False,
|
||||||
"presets": {},
|
"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