mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-02 17:25:22 +03:00
Update motion topic
This commit is contained in:
parent
b1854911cc
commit
27618d6f81
@ -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).
|
||||
|
||||
@ -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,
|
||||
)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user