diff --git a/docs/docs/integrations/mqtt.md b/docs/docs/integrations/mqtt.md index 71e806250..552eeb303 100644 --- a/docs/docs/integrations/mqtt.md +++ b/docs/docs/integrations/mqtt.md @@ -230,7 +230,7 @@ must be enabled in the configuration. Topic with current state of Birdseye for a camera. Published values are `ON` and `OFF`. -### `frigate//birdseye_mode` +### `frigate//birdseye_mode/set` Topic to set Birdseye mode for a camera. Birdseye offers different modes to customize under which circumstances the camera is shown. diff --git a/frigate/comms/dispatcher.py b/frigate/comms/dispatcher.py index cda5ac837..f15b4e5e8 100644 --- a/frigate/comms/dispatcher.py +++ b/frigate/comms/dispatcher.py @@ -64,6 +64,7 @@ class Dispatcher: "recordings": self._on_recordings_command, "snapshots": self._on_snapshots_command, "birdseye": self._on_birdseye_command, + "birdseye_mode": self._on_birdseye_mode_command, } for comm in self.comms: @@ -97,14 +98,6 @@ class Dispatcher: self.camera_metrics[camera]["region_grid_queue"].put( get_camera_regions_grid(camera, self.config.cameras[camera].detect) ) - elif topic.endswith("birdseye_mode"): - try: - # example /cam_name/birdseye payload=CONTINUOUS|MOTION|OBJECTS - camera_name = topic.split("/")[-2] - self._on_birdseye_mode_command(camera_name, payload) - except IndexError: - logger.error(f"Received invalid birdseye_mode command: {topic}") - return else: self.publish(topic, payload, retain=False) diff --git a/frigate/comms/mqtt.py b/frigate/comms/mqtt.py index dd0bf8458..b1b52ad90 100644 --- a/frigate/comms/mqtt.py +++ b/frigate/comms/mqtt.py @@ -173,6 +173,7 @@ class MqttClient(Communicator): # type: ignore[misc] "motion_threshold", "motion_contour_area", "birdseye", + "birdseye_mode", ] for name in self.config.cameras.keys(): @@ -196,12 +197,6 @@ class MqttClient(Communicator): # type: ignore[misc] self.on_mqtt_command, ) - if self.config.cameras[name].birdseye.enabled: - self.client.message_callback_add( - f"{self.mqtt_config.topic_prefix}/{name}/birdseye_mode", - self.on_mqtt_command, - ) - self.client.message_callback_add( f"{self.mqtt_config.topic_prefix}/restart", self.on_mqtt_command )