Update motion topic

This commit is contained in:
Nick Mowen 2022-05-14 07:34:28 -06:00
parent b1854911cc
commit 27618d6f81
2 changed files with 3 additions and 3 deletions

View File

@ -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/<camera_name>/motion/detected`
### `frigate/<camera_name>/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).

View File

@ -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,
)