mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-02 17:25:22 +03:00
Starting working on adding motion toggle
This commit is contained in:
parent
cafe0917c7
commit
105b132e47
@ -91,6 +91,7 @@ class FrigateApp:
|
||||
"detection_enabled": mp.Value(
|
||||
"i", self.config.cameras[camera_name].detect.enabled
|
||||
),
|
||||
"motion_enabled": mp.Value("i", True),
|
||||
"improve_contrast_enabled": mp.Value(
|
||||
"i", self.config.cameras[camera_name].motion.improve_contrast
|
||||
),
|
||||
|
||||
@ -89,6 +89,14 @@ def create_mqtt_client(config: FrigateConfig, camera_metrics):
|
||||
state_topic = f"{message.topic[:-4]}/state"
|
||||
client.publish(state_topic, payload, retain=True)
|
||||
|
||||
def on_motion_command(client, userdata, message):
|
||||
payload = message.payload.decode()
|
||||
logger.debug(f"on_improve_contrast_toggle: {message.topic} {payload}")
|
||||
|
||||
camera_name = message.topic.split("/")[3]
|
||||
|
||||
|
||||
|
||||
def on_improve_contrast_command(client, userdata, message):
|
||||
payload = message.payload.decode()
|
||||
logger.debug(f"on_improve_contrast_toggle: {message.topic} {payload}")
|
||||
|
||||
@ -361,6 +361,7 @@ def track_camera(
|
||||
|
||||
frame_queue = process_info["frame_queue"]
|
||||
detection_enabled = process_info["detection_enabled"]
|
||||
motion_enabled = process_info["motion_enabled"]
|
||||
improve_contrast_enabled = process_info["improve_contrast_enabled"]
|
||||
|
||||
frame_shape = config.frame_shape
|
||||
@ -393,6 +394,7 @@ def track_camera(
|
||||
objects_to_track,
|
||||
object_filters,
|
||||
detection_enabled,
|
||||
motion_enabled,
|
||||
stop_event,
|
||||
)
|
||||
|
||||
@ -479,6 +481,7 @@ def process_frames(
|
||||
objects_to_track: list[str],
|
||||
object_filters,
|
||||
detection_enabled: mp.Value,
|
||||
motion_enabled: mp.Value,
|
||||
stop_event,
|
||||
exit_on_empty: bool = False,
|
||||
):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user