diff --git a/docs/docs/integrations/mqtt.md b/docs/docs/integrations/mqtt.md index df54752cb..a0166e4b0 100644 --- a/docs/docs/integrations/mqtt.md +++ b/docs/docs/integrations/mqtt.md @@ -147,6 +147,10 @@ Message published for each changed review item. The first message is published w Same data available at `/api/stats` published at a configurable interval. +### `frigate/camera_activity` + +Returns data about each camera, its current features, and if it is detecting motion, objects, etc. Can be triggered by publising to `frigate/onConnect` + ### `frigate/notifications/set` Topic to turn notifications on and off. Expected values are `ON` and `OFF`. diff --git a/frigate/comms/mqtt.py b/frigate/comms/mqtt.py index ff1223d48..eaaadfe9f 100644 --- a/frigate/comms/mqtt.py +++ b/frigate/comms/mqtt.py @@ -222,6 +222,10 @@ class MqttClient(Communicator): # type: ignore[misc] self.on_mqtt_command, ) + self.client.message_callback_add( + f"{self.mqtt_config.topic_prefix}/onConnect", self.on_mqtt_command + ) + self.client.message_callback_add( f"{self.mqtt_config.topic_prefix}/restart", self.on_mqtt_command )