mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-04 18:25:22 +03:00
Fix startup issues
This commit is contained in:
parent
a7048bccb5
commit
6552c10fb8
@ -27,6 +27,7 @@ from frigate.models import Event, Recordings, Timeline
|
||||
from frigate.object_processing import TrackedObjectProcessor
|
||||
from frigate.output import output_frames
|
||||
from frigate.plus import PlusApi
|
||||
from frigate.ptz import OnvifController
|
||||
from frigate.record import RecordingCleanup, RecordingMaintainer
|
||||
from frigate.stats import StatsEmitter, stats_init
|
||||
from frigate.storage import StorageMaintainer
|
||||
@ -176,6 +177,9 @@ class FrigateApp:
|
||||
self.plus_api,
|
||||
)
|
||||
|
||||
def init_onvif(self) -> None:
|
||||
self.onvif_controller = OnvifController(self.config)
|
||||
|
||||
def init_dispatcher(self) -> None:
|
||||
comms: list[Communicator] = []
|
||||
|
||||
@ -183,7 +187,9 @@ class FrigateApp:
|
||||
comms.append(MqttClient(self.config))
|
||||
|
||||
comms.append(WebSocketClient(self.config))
|
||||
self.dispatcher = Dispatcher(self.config, self.camera_metrics, comms)
|
||||
self.dispatcher = Dispatcher(
|
||||
self.config, self.onvif_controller, self.camera_metrics, comms
|
||||
)
|
||||
|
||||
def start_detectors(self) -> None:
|
||||
for name in self.config.cameras.keys():
|
||||
@ -382,6 +388,7 @@ class FrigateApp:
|
||||
self.set_log_levels()
|
||||
self.init_queues()
|
||||
self.init_database()
|
||||
self.init_onvif()
|
||||
self.init_dispatcher()
|
||||
except Exception as e:
|
||||
print(e)
|
||||
|
||||
@ -169,7 +169,8 @@ class MqttClient(Communicator): # type: ignore[misc]
|
||||
|
||||
if self.config.cameras[name].onvif.host:
|
||||
self.client.message_callback_add(
|
||||
f"{self.mqtt_config.topic_prefix}/{name}/ptz/#"
|
||||
f"{self.mqtt_config.topic_prefix}/{name}/ptz/#",
|
||||
self.on_mqtt_command,
|
||||
)
|
||||
|
||||
self.client.message_callback_add(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user