From 27618d6f81adee781993a611fdbc8ab3b66eea26 Mon Sep 17 00:00:00 2001 From: Nick Mowen Date: Sat, 14 May 2022 07:34:28 -0600 Subject: [PATCH] Update motion topic --- docs/docs/integrations/mqtt.md | 2 +- frigate/object_processing.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/docs/integrations/mqtt.md b/docs/docs/integrations/mqtt.md index 3e3eb86d8..399113f5a 100644 --- a/docs/docs/integrations/mqtt.md +++ b/docs/docs/integrations/mqtt.md @@ -123,7 +123,7 @@ Topic with current state of snapshots for a camera. Published values are `ON` an Topic to turn motion detection for a camera on and off. Expected values are `ON` and `OFF`. NOTE: Turning off motion detection will fail if detection is not disabled. -### `frigate//motion/detected` +### `frigate//motion` Whether camera_name is currently detecting motion. Expected valeus are `ON` and `OFF`. NOTE: Will reset to `OFF` after configurable amount of time (30 seconds by default). diff --git a/frigate/object_processing.py b/frigate/object_processing.py index 590088238..3d49857c8 100644 --- a/frigate/object_processing.py +++ b/frigate/object_processing.py @@ -851,7 +851,7 @@ class TrackedObjectProcessor(threading.Thread): # only send True if motion hasn't been detected recently if self.last_motion_updates.get(camera, 0) == 0: self.client.publish( - f"{self.topic_prefix}/{camera}/motion/detected", + f"{self.topic_prefix}/{camera}/motion", "ON", retain=False, ) @@ -865,7 +865,7 @@ class TrackedObjectProcessor(threading.Thread): # If no motion, make sure the off_delay has passed if now - self.last_motion_updates.get(camera, 0) >= mqtt_delay: self.client.publish( - f"{self.topic_prefix}/{camera}/motion/detected", + f"{self.topic_prefix}/{camera}/motion", "OFF", retain=False, )