mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-03-10 10:33:11 +03:00
make titles more concise
This commit is contained in:
parent
e128aaaa61
commit
13b9d1b6e3
@ -15,56 +15,56 @@ class AuthConfig(FrigateBaseModel):
|
||||
)
|
||||
reset_admin_password: bool = Field(
|
||||
default=False,
|
||||
title="Reset the admin password on startup",
|
||||
title="Reset admin password",
|
||||
description="If true, reset the admin user's password on startup and print the new password in logs.",
|
||||
)
|
||||
cookie_name: str = Field(
|
||||
default="frigate_token",
|
||||
title="Name for jwt token cookie",
|
||||
title="JWT cookie name",
|
||||
description="Name of the cookie used to store the JWT token for native authentication.",
|
||||
pattern=r"^[a-z_]+$",
|
||||
)
|
||||
cookie_secure: bool = Field(
|
||||
default=False,
|
||||
title="Set secure flag on cookie",
|
||||
title="Secure cookie flag",
|
||||
description="Set the secure flag on the auth cookie; should be true when using TLS.",
|
||||
)
|
||||
session_length: int = Field(
|
||||
default=86400,
|
||||
title="Session length for jwt session tokens",
|
||||
title="Session length",
|
||||
description="Session duration in seconds for JWT-based sessions.",
|
||||
ge=60,
|
||||
)
|
||||
refresh_time: int = Field(
|
||||
default=1800,
|
||||
title="Refresh the session if it is going to expire in this many seconds",
|
||||
title="Session refresh window",
|
||||
description="When a session is within this many seconds of expiring, refresh it back to full length.",
|
||||
ge=30,
|
||||
)
|
||||
failed_login_rate_limit: Optional[str] = Field(
|
||||
default=None,
|
||||
title="Rate limits for failed login attempts",
|
||||
title="Failed login limits",
|
||||
description="Rate limiting rules for failed login attempts to reduce brute-force attacks.",
|
||||
)
|
||||
trusted_proxies: list[str] = Field(
|
||||
default=[],
|
||||
title="Trusted proxies for determining IP address to rate limit",
|
||||
title="Trusted proxies",
|
||||
description="List of trusted proxy IPs used when determining client IP for rate limiting.",
|
||||
)
|
||||
# As of Feb 2023, OWASP recommends 600000 iterations for PBKDF2-SHA256
|
||||
hash_iterations: int = Field(
|
||||
default=600000,
|
||||
title="Password hash iterations",
|
||||
title="Hash iterations",
|
||||
description="Number of PBKDF2-SHA256 iterations to use when hashing user passwords.",
|
||||
)
|
||||
roles: Dict[str, List[str]] = Field(
|
||||
default_factory=dict,
|
||||
title="Role to camera mappings. Empty list grants access to all cameras",
|
||||
title="Role mappings",
|
||||
description="Map roles to camera lists. An empty list grants access to all cameras for the role.",
|
||||
)
|
||||
admin_first_time_login: Optional[bool] = Field(
|
||||
default=False,
|
||||
title="Internal field to expose first-time admin login flag to the UI",
|
||||
title="First-time admin flag",
|
||||
description=(
|
||||
"When true the UI may show a help link on the login page informing users how to sign in after an admin password reset. "
|
||||
),
|
||||
|
||||
@ -17,29 +17,30 @@ class AudioFilterConfig(FrigateBaseModel):
|
||||
default=0.8,
|
||||
ge=AUDIO_MIN_CONFIDENCE,
|
||||
lt=1.0,
|
||||
title="Minimum detection confidence threshold for audio to be counted.",
|
||||
title="Minimum audio confidence",
|
||||
description="Minimum confidence threshold for the audio event to be counted.",
|
||||
)
|
||||
|
||||
|
||||
class AudioConfig(FrigateBaseModel):
|
||||
enabled: bool = Field(
|
||||
default=False,
|
||||
title="Enable audio events",
|
||||
title="Enable audio",
|
||||
description="Enable or disable audio event detection; can be overridden per-camera.",
|
||||
)
|
||||
max_not_heard: int = Field(
|
||||
default=30,
|
||||
title="Seconds of not hearing the type of audio to end the event",
|
||||
title="End timeout",
|
||||
description="Amount of seconds without the configured audio type before the audio event is ended.",
|
||||
)
|
||||
min_volume: int = Field(
|
||||
default=500,
|
||||
title="Min volume required to run audio detection",
|
||||
title="Minimum volume",
|
||||
description="Minimum RMS volume threshold required to run audio detection; lower values increase sensitivity (e.g., 200 high, 500 medium, 1000 low).",
|
||||
)
|
||||
listen: list[str] = Field(
|
||||
default=DEFAULT_LISTEN_AUDIO,
|
||||
title="Audio to listen for",
|
||||
title="Listen types",
|
||||
description="List of audio event types to detect (for example: bark, fire_alarm, scream, speech, yell).",
|
||||
)
|
||||
filters: Optional[dict[str, AudioFilterConfig]] = Field(
|
||||
@ -49,12 +50,12 @@ class AudioConfig(FrigateBaseModel):
|
||||
)
|
||||
enabled_in_config: Optional[bool] = Field(
|
||||
None,
|
||||
title="Keep track of original state of audio detection",
|
||||
title="Original audio state",
|
||||
description="Indicates whether audio detection was originally enabled in the static config file.",
|
||||
)
|
||||
num_threads: int = Field(
|
||||
default=2,
|
||||
title="Number of detection threads",
|
||||
title="Detection threads",
|
||||
description="Number of threads to use for audio detection processing.",
|
||||
ge=1,
|
||||
)
|
||||
|
||||
@ -30,7 +30,7 @@ class BirdseyeModeEnum(str, Enum):
|
||||
class BirdseyeLayoutConfig(FrigateBaseModel):
|
||||
scaling_factor: float = Field(
|
||||
default=2.0,
|
||||
title="Birdseye scaling factor",
|
||||
title="Scaling factor",
|
||||
description="Scaling factor used by the layout calculator (range 1.0 to 5.0).",
|
||||
ge=1.0,
|
||||
le=5.0,
|
||||
@ -45,7 +45,7 @@ class BirdseyeLayoutConfig(FrigateBaseModel):
|
||||
class BirdseyeConfig(FrigateBaseModel):
|
||||
enabled: bool = Field(
|
||||
default=True,
|
||||
title="Enable birdseye view",
|
||||
title="Enable Birdseye",
|
||||
description="Enable or disable the Birdseye view feature.",
|
||||
)
|
||||
mode: BirdseyeModeEnum = Field(
|
||||
@ -56,17 +56,17 @@ class BirdseyeConfig(FrigateBaseModel):
|
||||
|
||||
restream: bool = Field(
|
||||
default=False,
|
||||
title="Restream birdseye via RTSP",
|
||||
title="Restream RTSP",
|
||||
description="Re-stream the Birdseye output as an RTSP feed; enabling this will keep Birdseye running continuously.",
|
||||
)
|
||||
width: int = Field(
|
||||
default=1280,
|
||||
title="Birdseye width",
|
||||
title="Width",
|
||||
description="Output width (pixels) of the composed Birdseye frame.",
|
||||
)
|
||||
height: int = Field(
|
||||
default=720,
|
||||
title="Birdseye height",
|
||||
title="Height",
|
||||
description="Output height (pixels) of the composed Birdseye frame.",
|
||||
)
|
||||
quality: int = Field(
|
||||
@ -78,20 +78,20 @@ class BirdseyeConfig(FrigateBaseModel):
|
||||
)
|
||||
inactivity_threshold: int = Field(
|
||||
default=30,
|
||||
title="Birdseye Inactivity Threshold",
|
||||
title="Inactivity threshold",
|
||||
description="Seconds of inactivity after which a camera will stop being shown in Birdseye.",
|
||||
gt=0,
|
||||
)
|
||||
layout: BirdseyeLayoutConfig = Field(
|
||||
default_factory=BirdseyeLayoutConfig,
|
||||
title="Birdseye Layout",
|
||||
title="Layout",
|
||||
description="Layout options for the Birdseye composition.",
|
||||
)
|
||||
idle_heartbeat_fps: float = Field(
|
||||
default=0.0,
|
||||
ge=0.0,
|
||||
le=10.0,
|
||||
title="Idle heartbeat FPS (0 disables, max 10)",
|
||||
title="Idle heartbeat FPS",
|
||||
description="Frames-per-second to resend the last composed Birdseye frame when idle; set to 0 to disable.",
|
||||
)
|
||||
|
||||
@ -100,7 +100,7 @@ class BirdseyeConfig(FrigateBaseModel):
|
||||
class BirdseyeCameraConfig(BaseModel):
|
||||
enabled: bool = Field(
|
||||
default=True,
|
||||
title="Enable birdseye view",
|
||||
title="Enable Birdseye",
|
||||
description="Enable or disable the Birdseye view feature.",
|
||||
)
|
||||
mode: BirdseyeModeEnum = Field(
|
||||
@ -111,6 +111,6 @@ class BirdseyeCameraConfig(BaseModel):
|
||||
|
||||
order: int = Field(
|
||||
default=0,
|
||||
title="Position of the camera in the birdseye view",
|
||||
title="Position",
|
||||
description="Numeric position controlling the camera's ordering in the Birdseye layout.",
|
||||
)
|
||||
|
||||
@ -52,14 +52,14 @@ class CameraTypeEnum(str, Enum):
|
||||
class CameraConfig(FrigateBaseModel):
|
||||
name: Optional[str] = Field(
|
||||
None,
|
||||
title="Camera Name",
|
||||
title="Camera name",
|
||||
description="Camera name is required",
|
||||
pattern=REGEX_CAMERA_NAME,
|
||||
)
|
||||
|
||||
friendly_name: Optional[str] = Field(
|
||||
None,
|
||||
title="Camera friendly name used in the Frigate UI",
|
||||
title="Friendly name",
|
||||
description="Camera friendly name used in the Frigate UI",
|
||||
)
|
||||
|
||||
@ -151,7 +151,7 @@ class CameraConfig(FrigateBaseModel):
|
||||
# Options without global fallback
|
||||
best_image_timeout: int = Field(
|
||||
default=60,
|
||||
title="How long to wait for the image with the highest confidence score.",
|
||||
title="Best image timeout",
|
||||
description="How long to wait for the image with the highest confidence score.",
|
||||
)
|
||||
mqtt: CameraMqttConfig = Field(
|
||||
@ -171,7 +171,7 @@ class CameraConfig(FrigateBaseModel):
|
||||
)
|
||||
type: CameraTypeEnum = Field(
|
||||
default=CameraTypeEnum.generic,
|
||||
title="Camera Type",
|
||||
title="Camera type",
|
||||
description="Camera Type",
|
||||
)
|
||||
ui: CameraUiConfig = Field(
|
||||
@ -181,7 +181,7 @@ class CameraConfig(FrigateBaseModel):
|
||||
)
|
||||
webui_url: Optional[str] = Field(
|
||||
None,
|
||||
title="URL to visit the camera directly from system page",
|
||||
title="Camera URL",
|
||||
description="URL to visit the camera directly from system page",
|
||||
)
|
||||
zones: dict[str, ZoneConfig] = Field(
|
||||
@ -191,7 +191,7 @@ class CameraConfig(FrigateBaseModel):
|
||||
)
|
||||
enabled_in_config: Optional[bool] = Field(
|
||||
default=None,
|
||||
title="Keep track of original state of camera.",
|
||||
title="Original camera state",
|
||||
description="Keep track of original state of camera.",
|
||||
)
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ class StationaryMaxFramesConfig(FrigateBaseModel):
|
||||
)
|
||||
objects: dict[str, int] = Field(
|
||||
default_factory=dict,
|
||||
title="Object specific max frames",
|
||||
title="Object max frames",
|
||||
description="Per-object overrides for maximum frames to track stationary objects.",
|
||||
)
|
||||
|
||||
@ -24,24 +24,24 @@ class StationaryMaxFramesConfig(FrigateBaseModel):
|
||||
class StationaryConfig(FrigateBaseModel):
|
||||
interval: Optional[int] = Field(
|
||||
default=None,
|
||||
title="Frame interval for checking stationary objects",
|
||||
title="Stationary interval",
|
||||
description="How often (in frames) to run a detection check to confirm a stationary object.",
|
||||
gt=0,
|
||||
)
|
||||
threshold: Optional[int] = Field(
|
||||
default=None,
|
||||
title="Number of frames without a position change for an object to be considered stationary",
|
||||
title="Stationary threshold",
|
||||
description="Number of frames with no position change required to mark an object as stationary.",
|
||||
ge=1,
|
||||
)
|
||||
max_frames: StationaryMaxFramesConfig = Field(
|
||||
default_factory=StationaryMaxFramesConfig,
|
||||
title="Max frames for stationary objects",
|
||||
title="Max frames",
|
||||
description="Limits how long stationary objects are tracked before being discarded.",
|
||||
)
|
||||
classifier: bool = Field(
|
||||
default=True,
|
||||
title="Enable visual classifier for determing if objects with jittery bounding boxes are stationary",
|
||||
title="Enable visual classifier",
|
||||
description="Use a visual classifier to detect truly stationary objects even when bounding boxes jitter.",
|
||||
)
|
||||
|
||||
@ -49,32 +49,32 @@ class StationaryConfig(FrigateBaseModel):
|
||||
class DetectConfig(FrigateBaseModel):
|
||||
enabled: bool = Field(
|
||||
default=False,
|
||||
title="Detection Enabled",
|
||||
title="Detection enabled",
|
||||
description="Enable or disable object detection for this camera. Detection must be enabled for object tracking to run.",
|
||||
)
|
||||
height: Optional[int] = Field(
|
||||
default=None,
|
||||
title="Height of the stream for the detect role",
|
||||
title="Detect height",
|
||||
description="Height (pixels) of frames used for the detect stream; leave empty to use the native stream resolution.",
|
||||
)
|
||||
width: Optional[int] = Field(
|
||||
default=None,
|
||||
title="Width of the stream for the detect role",
|
||||
title="Detect width",
|
||||
description="Width (pixels) of frames used for the detect stream; leave empty to use the native stream resolution.",
|
||||
)
|
||||
fps: int = Field(
|
||||
default=5,
|
||||
title="Number of frames per second to process through detection",
|
||||
title="Detect FPS",
|
||||
description="Desired frames per second to run detection on; lower values reduce CPU usage (recommended value is 5, only set higher - at most 10 - if tracking extremely fast moving objects).",
|
||||
)
|
||||
min_initialized: Optional[int] = Field(
|
||||
default=None,
|
||||
title="Minimum number of consecutive hits for an object to be initialized by the tracker",
|
||||
title="Min initialization hits",
|
||||
description="Number of consecutive detection hits required before creating a tracked object. Increase to reduce false initializations. Default value is fps divided by 2.",
|
||||
)
|
||||
max_disappeared: Optional[int] = Field(
|
||||
default=None,
|
||||
title="Maximum number of frames the object can disappear before detection ends",
|
||||
title="Max disappeared frames",
|
||||
description="Number of frames without a detection before a tracked object is considered gone.",
|
||||
)
|
||||
stationary: StationaryConfig = Field(
|
||||
@ -84,6 +84,6 @@ class DetectConfig(FrigateBaseModel):
|
||||
)
|
||||
annotation_offset: int = Field(
|
||||
default=0,
|
||||
title="Milliseconds to offset detect annotations by",
|
||||
title="Annotation offset",
|
||||
description="Milliseconds to shift detect annotations to better align timeline bounding boxes with recordings; can be positive or negative.",
|
||||
)
|
||||
|
||||
@ -35,12 +35,12 @@ DETECT_FFMPEG_OUTPUT_ARGS_DEFAULT = [
|
||||
class FfmpegOutputArgsConfig(FrigateBaseModel):
|
||||
detect: Union[str, list[str]] = Field(
|
||||
default=DETECT_FFMPEG_OUTPUT_ARGS_DEFAULT,
|
||||
title="Detect role FFmpeg output arguments",
|
||||
title="Detect output args",
|
||||
description="Default output args for detect role streams.",
|
||||
)
|
||||
record: Union[str, list[str]] = Field(
|
||||
default=RECORD_FFMPEG_OUTPUT_ARGS_DEFAULT,
|
||||
title="Record role FFmpeg output arguments",
|
||||
title="Record output args",
|
||||
description="Default output args for record role streams.",
|
||||
)
|
||||
|
||||
@ -53,38 +53,38 @@ class FfmpegConfig(FrigateBaseModel):
|
||||
)
|
||||
global_args: Union[str, list[str]] = Field(
|
||||
default=FFMPEG_GLOBAL_ARGS_DEFAULT,
|
||||
title="FFmpeg arguments",
|
||||
title="FFmpeg global args",
|
||||
description="Global args passed to FFmpeg processes by default.",
|
||||
)
|
||||
hwaccel_args: Union[str, list[str]] = Field(
|
||||
default="auto",
|
||||
title="FFmpeg hardware acceleration arguments",
|
||||
title="Hardware acceleration args",
|
||||
description="Hardware acceleration arguments for FFmpeg (auto or provider-specific).",
|
||||
)
|
||||
input_args: Union[str, list[str]] = Field(
|
||||
default=FFMPEG_INPUT_ARGS_DEFAULT,
|
||||
title="FFmpeg input arguments",
|
||||
title="Input args",
|
||||
description="Input arguments applied to FFmpeg input streams by default.",
|
||||
)
|
||||
output_args: FfmpegOutputArgsConfig = Field(
|
||||
default_factory=FfmpegOutputArgsConfig,
|
||||
title="FFmpeg output arguments per role",
|
||||
title="Output args",
|
||||
description="Default output args used for different FFmpeg roles such as detect and record.",
|
||||
)
|
||||
retry_interval: float = Field(
|
||||
default=10.0,
|
||||
title="Time in seconds to wait before FFmpeg retries connecting to the camera",
|
||||
title="FFmpeg retry time",
|
||||
description="Seconds to wait before attempting to reconnect a camera stream after failure. Default is 10.",
|
||||
gt=0.0,
|
||||
)
|
||||
apple_compatibility: bool = Field(
|
||||
default=False,
|
||||
title="Set tag on HEVC (H.265) recording stream to improve compatibility with Apple players",
|
||||
title="Apple compatibility",
|
||||
description="Enable HEVC tagging for better Apple player compatibility when recording H.265.",
|
||||
)
|
||||
gpu: int = Field(
|
||||
default=0,
|
||||
title="GPU index to use for hardware acceleration",
|
||||
title="GPU index",
|
||||
description="Default GPU index used for hardware acceleration if available.",
|
||||
)
|
||||
|
||||
@ -115,26 +115,26 @@ class CameraRoleEnum(str, Enum):
|
||||
|
||||
class CameraInput(FrigateBaseModel):
|
||||
path: EnvString = Field(
|
||||
title="Camera input path",
|
||||
title="Input path",
|
||||
description="Camera input stream URL or path.",
|
||||
)
|
||||
roles: list[CameraRoleEnum] = Field(
|
||||
title="Roles assigned to this input",
|
||||
title="Input roles",
|
||||
description="Roles for this input stream (for example: detect, record, audio).",
|
||||
)
|
||||
global_args: Union[str, list[str]] = Field(
|
||||
default_factory=list,
|
||||
title="FFmpeg arguments",
|
||||
title="FFmpeg args",
|
||||
description="FFmpeg arguments for this input stream.",
|
||||
)
|
||||
hwaccel_args: Union[str, list[str]] = Field(
|
||||
default_factory=list,
|
||||
title="FFmpeg hardware acceleration arguments",
|
||||
title="Hardware acceleration args",
|
||||
description="Hardware acceleration arguments for this input stream.",
|
||||
)
|
||||
input_args: Union[str, list[str]] = Field(
|
||||
default_factory=list,
|
||||
title="FFmpeg input arguments",
|
||||
title="Input args",
|
||||
description="Input arguments specific to this stream.",
|
||||
)
|
||||
|
||||
|
||||
@ -10,18 +10,18 @@ __all__ = ["CameraLiveConfig"]
|
||||
class CameraLiveConfig(FrigateBaseModel):
|
||||
streams: Dict[str, str] = Field(
|
||||
default_factory=list,
|
||||
title="Friendly names and restream names to use for live view",
|
||||
title="Live stream names",
|
||||
description="Mapping of configured stream names to restream/go2rtc names used for live playback.",
|
||||
)
|
||||
height: int = Field(
|
||||
default=720,
|
||||
title="Live camera view height",
|
||||
title="Live height",
|
||||
description="Height (pixels) to render the live stream in the Web UI; must be <= detect stream height.",
|
||||
)
|
||||
quality: int = Field(
|
||||
default=8,
|
||||
ge=1,
|
||||
le=31,
|
||||
title="Live camera view quality",
|
||||
title="Live quality",
|
||||
description="Encoding quality for the live jsmpeg stream (1 highest, 31 lowest).",
|
||||
)
|
||||
|
||||
@ -15,14 +15,14 @@ class MotionConfig(FrigateBaseModel):
|
||||
)
|
||||
threshold: int = Field(
|
||||
default=30,
|
||||
title="Motion detection threshold (1-255)",
|
||||
title="Motion threshold",
|
||||
description="Pixel difference threshold used by the motion detector; higher values reduce sensitivity (range 1-255).",
|
||||
ge=1,
|
||||
le=255,
|
||||
)
|
||||
lightning_threshold: float = Field(
|
||||
default=0.8,
|
||||
title="Lightning detection threshold (0.3-1.0)",
|
||||
title="Lightning threshold",
|
||||
description="Threshold to detect and ignore brief lighting spikes (lower is more sensitive, values between 0.3 and 1.0).",
|
||||
ge=0.3,
|
||||
le=1.0,
|
||||
@ -39,32 +39,32 @@ class MotionConfig(FrigateBaseModel):
|
||||
)
|
||||
delta_alpha: float = Field(
|
||||
default=0.2,
|
||||
title="Delta Alpha",
|
||||
title="Delta alpha",
|
||||
description="Alpha blending factor used in frame differencing for motion calculation.",
|
||||
)
|
||||
frame_alpha: float = Field(
|
||||
default=0.01,
|
||||
title="Frame Alpha",
|
||||
title="Frame alpha",
|
||||
description="Alpha value used when blending frames for motion preprocessing.",
|
||||
)
|
||||
frame_height: Optional[int] = Field(
|
||||
default=100,
|
||||
title="Frame Height",
|
||||
title="Frame height",
|
||||
description="Height in pixels to scale frames to when computing motion (useful for performance).",
|
||||
)
|
||||
mask: Union[str, list[str]] = Field(
|
||||
default="",
|
||||
title="Coordinates polygon for the motion mask.",
|
||||
title="Mask coordinates",
|
||||
description="Ordered x,y coordinates defining the motion mask polygon used to include/exclude areas.",
|
||||
)
|
||||
mqtt_off_delay: int = Field(
|
||||
default=30,
|
||||
title="Delay for updating MQTT with no motion detected",
|
||||
title="MQTT off delay",
|
||||
description="Seconds to wait after last motion before publishing an MQTT 'off' state.",
|
||||
)
|
||||
enabled_in_config: Optional[bool] = Field(
|
||||
default=None,
|
||||
title="Keep track of original state of motion detection",
|
||||
title="Original motion state",
|
||||
description="Indicates whether motion detection was enabled in the original static configuration.",
|
||||
)
|
||||
raw_mask: Union[str, list[str]] = ""
|
||||
|
||||
@ -8,37 +8,37 @@ __all__ = ["CameraMqttConfig"]
|
||||
class CameraMqttConfig(FrigateBaseModel):
|
||||
enabled: bool = Field(
|
||||
default=True,
|
||||
title="Send image over MQTT",
|
||||
title="Send image",
|
||||
description="Enable publishing image snapshots for objects to MQTT topics for this camera.",
|
||||
)
|
||||
timestamp: bool = Field(
|
||||
default=True,
|
||||
title="Add timestamp to MQTT image",
|
||||
title="Add timestamp",
|
||||
description="Overlay a timestamp on images published to MQTT.",
|
||||
)
|
||||
bounding_box: bool = Field(
|
||||
default=True,
|
||||
title="Add bounding box to MQTT image",
|
||||
title="Add bounding box",
|
||||
description="Draw bounding boxes on images published over MQTT.",
|
||||
)
|
||||
crop: bool = Field(
|
||||
default=True,
|
||||
title="Crop MQTT image to detected object",
|
||||
title="Crop image",
|
||||
description="Crop images published to MQTT to the detected object's bounding box.",
|
||||
)
|
||||
height: int = Field(
|
||||
default=270,
|
||||
title="MQTT image height",
|
||||
title="Image height",
|
||||
description="Height (pixels) to resize images published over MQTT.",
|
||||
)
|
||||
required_zones: list[str] = Field(
|
||||
default_factory=list,
|
||||
title="List of required zones to be entered in order to send the image",
|
||||
title="Required zones",
|
||||
description="Zones that an object must enter for an MQTT image to be published.",
|
||||
)
|
||||
quality: int = Field(
|
||||
default=70,
|
||||
title="Quality of the encoded jpeg (0-100)",
|
||||
title="JPEG quality",
|
||||
description="JPEG quality for images published to MQTT (0-100).",
|
||||
ge=0,
|
||||
le=100,
|
||||
|
||||
@ -15,17 +15,17 @@ class NotificationConfig(FrigateBaseModel):
|
||||
)
|
||||
email: Optional[str] = Field(
|
||||
default=None,
|
||||
title="Email required for push",
|
||||
title="Notification email",
|
||||
description="Email address used for push notifications or required by certain notification providers.",
|
||||
)
|
||||
cooldown: int = Field(
|
||||
default=0,
|
||||
ge=0,
|
||||
title="Cooldown period for notifications (time in seconds)",
|
||||
title="Cooldown period",
|
||||
description="Cooldown (seconds) between notifications to avoid spamming recipients.",
|
||||
)
|
||||
enabled_in_config: Optional[bool] = Field(
|
||||
default=None,
|
||||
title="Keep track of original state of notifications",
|
||||
title="Original notifications state",
|
||||
description="Indicates whether notifications were enabled in the original static configuration.",
|
||||
)
|
||||
|
||||
@ -13,37 +13,37 @@ DEFAULT_TRACKED_OBJECTS = ["person"]
|
||||
class FilterConfig(FrigateBaseModel):
|
||||
min_area: Union[int, float] = Field(
|
||||
default=0,
|
||||
title="Minimum area of bounding box for object to be counted. Can be pixels (int) or percentage (float between 0.000001 and 0.99)",
|
||||
title="Minimum object area",
|
||||
description="Minimum bounding box area (pixels or percentage) required for this object type. Can be pixels (int) or percentage (float between 0.000001 and 0.99).",
|
||||
)
|
||||
max_area: Union[int, float] = Field(
|
||||
default=24000000,
|
||||
title="Maximum area of bounding box for object to be counted. Can be pixels (int) or percentage (float between 0.000001 and 0.99)",
|
||||
title="Maximum object area",
|
||||
description="Maximum bounding box area (pixels or percentage) allowed for this object type. Can be pixels (int) or percentage (float between 0.000001 and 0.99).",
|
||||
)
|
||||
min_ratio: float = Field(
|
||||
default=0,
|
||||
title="Minimum ratio of bounding box's width/height for object to be counted",
|
||||
title="Minimum aspect ratio",
|
||||
description="Minimum width/height ratio required for the bounding box to qualify.",
|
||||
)
|
||||
max_ratio: float = Field(
|
||||
default=24000000,
|
||||
title="Maximum ratio of bounding box's width/height for object to be counted",
|
||||
title="Maximum aspect ratio",
|
||||
description="Maximum width/height ratio allowed for the bounding box to qualify.",
|
||||
)
|
||||
threshold: float = Field(
|
||||
default=0.7,
|
||||
title="Average detection confidence threshold for object to be counted",
|
||||
title="Avg confidence",
|
||||
description="Average detection confidence threshold required for the object to be considered a true positive.",
|
||||
)
|
||||
min_score: float = Field(
|
||||
default=0.5,
|
||||
title="Minimum detection confidence for object to be counted",
|
||||
title="Minimum confidence",
|
||||
description="Minimum single-frame detection confidence required for the object to be counted.",
|
||||
)
|
||||
mask: Optional[Union[str, list[str]]] = Field(
|
||||
default=None,
|
||||
title="Detection area polygon mask for this filter configuration",
|
||||
title="Filter mask",
|
||||
description="Polygon coordinates defining where this filter applies within the frame.",
|
||||
)
|
||||
raw_mask: Union[str, list[str]] = ""
|
||||
@ -60,12 +60,12 @@ class FilterConfig(FrigateBaseModel):
|
||||
class GenAIObjectTriggerConfig(FrigateBaseModel):
|
||||
tracked_object_end: bool = Field(
|
||||
default=True,
|
||||
title="Send once the object is no longer tracked",
|
||||
title="Send on end",
|
||||
description="Send a request to GenAI when the tracked object ends.",
|
||||
)
|
||||
after_significant_updates: Optional[int] = Field(
|
||||
default=None,
|
||||
title="Send an early request to generative AI when X frames accumulated",
|
||||
title="Early GenAI trigger",
|
||||
description="Send a request to GenAI after a specified number of significant updates for the tracked object.",
|
||||
ge=1,
|
||||
)
|
||||
@ -74,48 +74,48 @@ class GenAIObjectTriggerConfig(FrigateBaseModel):
|
||||
class GenAIObjectConfig(FrigateBaseModel):
|
||||
enabled: bool = Field(
|
||||
default=False,
|
||||
title="Enable GenAI for camera",
|
||||
title="Enable GenAI",
|
||||
description="Enable GenAI generation of descriptions for tracked objects by default.",
|
||||
)
|
||||
use_snapshot: bool = Field(
|
||||
default=False,
|
||||
title="Use snapshots for generating descriptions",
|
||||
title="Use snapshots",
|
||||
description="Use object snapshots instead of thumbnails for GenAI description generation.",
|
||||
)
|
||||
prompt: str = Field(
|
||||
default="Analyze the sequence of images containing the {label}. Focus on the likely intent or behavior of the {label} based on its actions and movement, rather than describing its appearance or the surroundings. Consider what the {label} is doing, why, and what it might do next.",
|
||||
title="Default caption prompt",
|
||||
title="Caption prompt",
|
||||
description="Default prompt template used when generating descriptions with GenAI.",
|
||||
)
|
||||
object_prompts: dict[str, str] = Field(
|
||||
default_factory=dict,
|
||||
title="Object specific prompts",
|
||||
title="Object prompts",
|
||||
description="Per-object prompts to customize GenAI outputs for specific labels.",
|
||||
)
|
||||
|
||||
objects: Union[str, list[str]] = Field(
|
||||
default_factory=list,
|
||||
title="List of objects to run generative AI for",
|
||||
title="GenAI objects",
|
||||
description="List of object labels to send to GenAI by default.",
|
||||
)
|
||||
required_zones: Union[str, list[str]] = Field(
|
||||
default_factory=list,
|
||||
title="List of required zones to be entered in order to run generative AI",
|
||||
title="Required zones",
|
||||
description="Zones that must be entered for objects to qualify for GenAI description generation.",
|
||||
)
|
||||
debug_save_thumbnails: bool = Field(
|
||||
default=False,
|
||||
title="Save thumbnails sent to generative AI for debugging purposes",
|
||||
title="Save thumbnails",
|
||||
description="Save thumbnails sent to GenAI for debugging and review.",
|
||||
)
|
||||
send_triggers: GenAIObjectTriggerConfig = Field(
|
||||
default_factory=GenAIObjectTriggerConfig,
|
||||
title="What triggers to use to send frames to generative AI for a tracked object",
|
||||
title="GenAI triggers",
|
||||
description="Defines when frames should be sent to GenAI (on end, after updates, etc.).",
|
||||
)
|
||||
enabled_in_config: Optional[bool] = Field(
|
||||
default=None,
|
||||
title="Keep track of original state of generative AI",
|
||||
title="Original GenAI state",
|
||||
description="Indicates whether GenAI was enabled in the original static config.",
|
||||
)
|
||||
|
||||
@ -146,7 +146,7 @@ class ObjectConfig(FrigateBaseModel):
|
||||
)
|
||||
genai: GenAIObjectConfig = Field(
|
||||
default_factory=GenAIObjectConfig,
|
||||
title="Config for using genai to analyze objects",
|
||||
title="GenAI object config",
|
||||
description="GenAI options for describing tracked objects and sending frames for generation.",
|
||||
)
|
||||
_all_objects: list[str] = PrivateAttr()
|
||||
|
||||
@ -19,54 +19,54 @@ class ZoomingModeEnum(str, Enum):
|
||||
class PtzAutotrackConfig(FrigateBaseModel):
|
||||
enabled: bool = Field(
|
||||
default=False,
|
||||
title="Enable PTZ object autotracking",
|
||||
title="Enable Autotracking",
|
||||
description="Enable or disable automatic PTZ camera tracking of detected objects.",
|
||||
)
|
||||
calibrate_on_startup: bool = Field(
|
||||
default=False,
|
||||
title="Perform a camera calibration when Frigate starts",
|
||||
title="Calibrate on start",
|
||||
description="Measure PTZ motor speeds on startup to improve tracking accuracy. Frigate will update config with movement_weights after calibration.",
|
||||
)
|
||||
zooming: ZoomingModeEnum = Field(
|
||||
default=ZoomingModeEnum.disabled,
|
||||
title="Autotracker zooming mode",
|
||||
title="Zoom mode",
|
||||
description="Control zoom behavior: disabled (pan/tilt only), absolute (most compatible), or relative (concurrent pan/tilt/zoom).",
|
||||
)
|
||||
zoom_factor: float = Field(
|
||||
default=0.3,
|
||||
title="Zooming factor (0.1-0.75)",
|
||||
title="Zoom factor",
|
||||
description="Control zoom level on tracked objects. Lower values keep more scene in view; higher values zoom in closer but may lose tracking. Values between 0.1 and 0.75.",
|
||||
ge=0.1,
|
||||
le=0.75,
|
||||
)
|
||||
track: list[str] = Field(
|
||||
default=DEFAULT_TRACKED_OBJECTS,
|
||||
title="Objects to track",
|
||||
description="List of object types from labelmap.txt that should trigger autotracking.",
|
||||
title="Tracked objects",
|
||||
description="List of object types that should trigger autotracking.",
|
||||
)
|
||||
required_zones: list[str] = Field(
|
||||
default_factory=list,
|
||||
title="List of required zones to be entered in order to begin autotracking",
|
||||
title="Required zones",
|
||||
description="Objects must enter one of these zones before autotracking begins.",
|
||||
)
|
||||
return_preset: str = Field(
|
||||
default="home",
|
||||
title="Name of camera preset to return to when object tracking is over",
|
||||
title="Return preset",
|
||||
description="ONVIF preset name configured in camera firmware to return to after tracking ends.",
|
||||
)
|
||||
timeout: int = Field(
|
||||
default=10,
|
||||
title="Seconds to delay before returning to preset",
|
||||
title="Return timeout",
|
||||
description="Wait this many seconds after losing tracking before returning camera to preset position.",
|
||||
)
|
||||
movement_weights: Optional[Union[str, list[str]]] = Field(
|
||||
default_factory=list,
|
||||
title="Internal value used for PTZ movements based on the speed of your camera's motor",
|
||||
title="Movement weights",
|
||||
description="Calibration values automatically generated by camera calibration. Do not modify manually.",
|
||||
)
|
||||
enabled_in_config: Optional[bool] = Field(
|
||||
default=None,
|
||||
title="Keep track of original state of autotracking",
|
||||
title="Original autotrack state",
|
||||
description="Internal field to track whether autotracking was enabled in configuration.",
|
||||
)
|
||||
|
||||
@ -94,36 +94,36 @@ class PtzAutotrackConfig(FrigateBaseModel):
|
||||
class OnvifConfig(FrigateBaseModel):
|
||||
host: str = Field(
|
||||
default="",
|
||||
title="Onvif Host",
|
||||
title="ONVIF host",
|
||||
description="Host (and optional scheme) for the ONVIF service for this camera.",
|
||||
)
|
||||
port: int = Field(
|
||||
default=8000,
|
||||
title="Onvif Port",
|
||||
title="ONVIF port",
|
||||
description="Port number for the ONVIF service.",
|
||||
)
|
||||
user: Optional[EnvString] = Field(
|
||||
default=None,
|
||||
title="Onvif Username",
|
||||
title="ONVIF username",
|
||||
description="Username for ONVIF authentication; some devices require admin user for ONVIF.",
|
||||
)
|
||||
password: Optional[EnvString] = Field(
|
||||
default=None,
|
||||
title="Onvif Password",
|
||||
title="ONVIF password",
|
||||
description="Password for ONVIF authentication.",
|
||||
)
|
||||
tls_insecure: bool = Field(
|
||||
default=False,
|
||||
title="Onvif Disable TLS verification",
|
||||
title="Disable TLS verify",
|
||||
description="Skip TLS verification and disable digest auth for ONVIF (unsafe; use in safe networks only).",
|
||||
)
|
||||
autotracking: PtzAutotrackConfig = Field(
|
||||
default_factory=PtzAutotrackConfig,
|
||||
title="PTZ auto tracking config",
|
||||
title="PTZ config",
|
||||
description="Automatically track moving objects and keep them centered in the frame using PTZ camera movements.",
|
||||
)
|
||||
ignore_time_mismatch: bool = Field(
|
||||
default=False,
|
||||
title="Onvif Ignore Time Synchronization Mismatch Between Camera and Server",
|
||||
title="Ignore time mismatch",
|
||||
description="Ignore time synchronization differences between camera and Frigate server for ONVIF communication.",
|
||||
)
|
||||
|
||||
@ -24,7 +24,7 @@ class RecordRetainConfig(FrigateBaseModel):
|
||||
days: float = Field(
|
||||
default=0,
|
||||
ge=0,
|
||||
title="Default retention period",
|
||||
title="Retention days",
|
||||
description="Days to retain recordings.",
|
||||
)
|
||||
|
||||
@ -39,12 +39,12 @@ class ReviewRetainConfig(FrigateBaseModel):
|
||||
days: float = Field(
|
||||
default=10,
|
||||
ge=0,
|
||||
title="Default retention period",
|
||||
title="Retention days",
|
||||
description="Number of days to retain recordings of detection events.",
|
||||
)
|
||||
mode: RetainModeEnum = Field(
|
||||
default=RetainModeEnum.motion,
|
||||
title="Retain mode",
|
||||
title="Retention mode",
|
||||
description="Mode for retention: all (save all segments), motion (save segments with motion), or active_objects (save segments with active objects).",
|
||||
)
|
||||
|
||||
@ -52,7 +52,7 @@ class ReviewRetainConfig(FrigateBaseModel):
|
||||
class EventsConfig(FrigateBaseModel):
|
||||
pre_capture: int = Field(
|
||||
default=5,
|
||||
title="Seconds to retain before event starts",
|
||||
title="Pre-capture seconds",
|
||||
description="Number of seconds before the detection event to include in the recording.",
|
||||
le=MAX_PRE_CAPTURE,
|
||||
ge=0,
|
||||
@ -60,12 +60,12 @@ class EventsConfig(FrigateBaseModel):
|
||||
post_capture: int = Field(
|
||||
default=5,
|
||||
ge=0,
|
||||
title="Seconds to retain after event ends",
|
||||
title="Post-capture seconds",
|
||||
description="Number of seconds after the detection event to include in the recording.",
|
||||
)
|
||||
retain: ReviewRetainConfig = Field(
|
||||
default_factory=ReviewRetainConfig,
|
||||
title="Event retention settings",
|
||||
title="Event retention",
|
||||
description="Retention settings for recordings of detection events.",
|
||||
)
|
||||
|
||||
@ -81,7 +81,7 @@ class RecordQualityEnum(str, Enum):
|
||||
class RecordPreviewConfig(FrigateBaseModel):
|
||||
quality: RecordQualityEnum = Field(
|
||||
default=RecordQualityEnum.medium,
|
||||
title="Quality of recording preview",
|
||||
title="Preview quality",
|
||||
description="Preview quality level (very_low, low, medium, high, very_high).",
|
||||
)
|
||||
|
||||
@ -89,7 +89,7 @@ class RecordPreviewConfig(FrigateBaseModel):
|
||||
class RecordExportConfig(FrigateBaseModel):
|
||||
hwaccel_args: Union[str, list[str]] = Field(
|
||||
default="auto",
|
||||
title="Export-specific FFmpeg hardware acceleration arguments",
|
||||
title="Export hwaccel args",
|
||||
description="Hardware acceleration args to use for export/transcode operations.",
|
||||
)
|
||||
|
||||
@ -97,47 +97,47 @@ class RecordExportConfig(FrigateBaseModel):
|
||||
class RecordConfig(FrigateBaseModel):
|
||||
enabled: bool = Field(
|
||||
default=False,
|
||||
title="Enable record on all cameras",
|
||||
title="Enable recording",
|
||||
description="Enable or disable recording globally; individual cameras can override this.",
|
||||
)
|
||||
expire_interval: int = Field(
|
||||
default=60,
|
||||
title="Number of minutes to wait between cleanup runs",
|
||||
title="Record cleanup interval",
|
||||
description="Minutes between cleanup passes that remove expired recording segments.",
|
||||
)
|
||||
continuous: RecordRetainConfig = Field(
|
||||
default_factory=RecordRetainConfig,
|
||||
title="Continuous recording retention settings",
|
||||
title="Continuous retention",
|
||||
description="Number of days to retain recordings regardless of tracked objects or motion. Set to 0 if you only want to retain recordings of alerts and detections.",
|
||||
)
|
||||
motion: RecordRetainConfig = Field(
|
||||
default_factory=RecordRetainConfig,
|
||||
title="Motion recording retention settings",
|
||||
title="Motion retention",
|
||||
description="Number of days to retain recordings triggered by motion regardless of tracked objects. Set to 0 if you only want to retain recordings of alerts and detections.",
|
||||
)
|
||||
detections: EventsConfig = Field(
|
||||
default_factory=EventsConfig,
|
||||
title="Detection specific retention settings",
|
||||
title="Detection retention",
|
||||
description="Recording retention settings for detection events including pre/post capture durations.",
|
||||
)
|
||||
alerts: EventsConfig = Field(
|
||||
default_factory=EventsConfig,
|
||||
title="Alert specific retention settings",
|
||||
title="Alert retention",
|
||||
description="Recording retention settings for alert events including pre/post capture durations.",
|
||||
)
|
||||
export: RecordExportConfig = Field(
|
||||
default_factory=RecordExportConfig,
|
||||
title="Recording Export Config",
|
||||
title="Export config",
|
||||
description="Settings used when exporting recordings such as timelapse and hardware acceleration.",
|
||||
)
|
||||
preview: RecordPreviewConfig = Field(
|
||||
default_factory=RecordPreviewConfig,
|
||||
title="Recording Preview Config",
|
||||
title="Preview config",
|
||||
description="Settings controlling the quality of recording previews shown in the UI.",
|
||||
)
|
||||
enabled_in_config: Optional[bool] = Field(
|
||||
default=None,
|
||||
title="Keep track of original state of recording",
|
||||
title="Original recording state",
|
||||
description="Indicates whether recording was enabled in the original static configuration.",
|
||||
)
|
||||
|
||||
|
||||
@ -29,23 +29,23 @@ class AlertsConfig(FrigateBaseModel):
|
||||
|
||||
labels: list[str] = Field(
|
||||
default=DEFAULT_ALERT_OBJECTS,
|
||||
title="Labels to create alerts for",
|
||||
title="Alert labels",
|
||||
description="List of object labels that qualify as alerts (for example: car, person).",
|
||||
)
|
||||
required_zones: Union[str, list[str]] = Field(
|
||||
default_factory=list,
|
||||
title="List of required zones to be entered in order to save the event as an alert",
|
||||
title="Required zones",
|
||||
description="Zones that an object must enter to be considered an alert; leave empty to allow any zone.",
|
||||
)
|
||||
|
||||
enabled_in_config: Optional[bool] = Field(
|
||||
default=None,
|
||||
title="Keep track of original state of alerts",
|
||||
title="Original alerts state",
|
||||
description="Tracks whether alerts were originally enabled in the static configuration.",
|
||||
)
|
||||
cutoff_time: int = Field(
|
||||
default=40,
|
||||
title="Time to cutoff alerts after no alert-causing activity has occurred",
|
||||
title="Alerts cutoff time",
|
||||
description="Seconds to wait after no alert-causing activity before cutting off an alert.",
|
||||
)
|
||||
|
||||
@ -69,23 +69,23 @@ class DetectionsConfig(FrigateBaseModel):
|
||||
|
||||
labels: Optional[list[str]] = Field(
|
||||
default=None,
|
||||
title="Labels to create detections for",
|
||||
title="Detection labels",
|
||||
description="List of object labels that qualify as detection events.",
|
||||
)
|
||||
required_zones: Union[str, list[str]] = Field(
|
||||
default_factory=list,
|
||||
title="List of required zones to be entered in order to save the event as a detection",
|
||||
title="Required zones",
|
||||
description="Zones that an object must enter to be considered a detection; leave empty to allow any zone.",
|
||||
)
|
||||
cutoff_time: int = Field(
|
||||
default=30,
|
||||
title="Time to cutoff detection after no detection-causing activity has occurred",
|
||||
title="Detections cutoff time",
|
||||
description="Seconds to wait after no detection-causing activity before cutting off a detection.",
|
||||
)
|
||||
|
||||
enabled_in_config: Optional[bool] = Field(
|
||||
default=None,
|
||||
title="Keep track of original state of detections",
|
||||
title="Original detections state",
|
||||
description="Tracks whether detections were originally enabled in the static configuration.",
|
||||
)
|
||||
|
||||
@ -101,7 +101,7 @@ class DetectionsConfig(FrigateBaseModel):
|
||||
class GenAIReviewConfig(FrigateBaseModel):
|
||||
enabled: bool = Field(
|
||||
default=False,
|
||||
title="Enable GenAI descriptions for review items",
|
||||
title="Enable GenAI descriptions",
|
||||
description="Enable or disable GenAI-generated descriptions and summaries for review items.",
|
||||
)
|
||||
alerts: bool = Field(
|
||||
@ -116,26 +116,26 @@ class GenAIReviewConfig(FrigateBaseModel):
|
||||
)
|
||||
image_source: ImageSourceEnum = Field(
|
||||
default=ImageSourceEnum.preview,
|
||||
title="Image source for review descriptions",
|
||||
title="Review image source",
|
||||
description="Source of images sent to GenAI ('preview' or 'recordings'); 'recordings' uses higher quality frames but more tokens.",
|
||||
)
|
||||
additional_concerns: list[str] = Field(
|
||||
default=[],
|
||||
title="Additional concerns that GenAI should make note of on this camera",
|
||||
title="Additional concerns",
|
||||
description="A list of additional concerns or notes the GenAI should consider when evaluating activity on this camera.",
|
||||
)
|
||||
debug_save_thumbnails: bool = Field(
|
||||
default=False,
|
||||
title="Save thumbnails sent to generative AI for debugging purposes",
|
||||
title="Save thumbnails",
|
||||
description="Save thumbnails that are sent to the GenAI provider for debugging and review.",
|
||||
)
|
||||
enabled_in_config: Optional[bool] = Field(
|
||||
default=None,
|
||||
title="Keep track of original state of generative AI",
|
||||
title="Original GenAI state",
|
||||
description="Tracks whether GenAI review was originally enabled in the static configuration.",
|
||||
)
|
||||
preferred_language: str | None = Field(
|
||||
title="Preferred language for GenAI Response",
|
||||
title="Preferred language",
|
||||
description="Preferred language to request from the GenAI provider for generated responses.",
|
||||
default=None,
|
||||
)
|
||||
@ -174,7 +174,7 @@ Evaluate in this order:
|
||||
3. **Escalate to Level 2 if:** Weapons, break-in tools, forced entry in progress, violence, or active property damage visible (escalates from Level 0 or 1)
|
||||
|
||||
The mere presence of an unidentified person in private areas during late night hours is inherently suspicious and warrants human review, regardless of what activity they appear to be doing or how brief the sequence is.""",
|
||||
title="Custom activity context prompt defining normal and suspicious activity patterns for this property",
|
||||
title="Activity context prompt",
|
||||
description="Custom prompt describing what is and is not suspicious activity to provide context for GenAI summaries.",
|
||||
)
|
||||
|
||||
@ -182,16 +182,16 @@ The mere presence of an unidentified person in private areas during late night h
|
||||
class ReviewConfig(FrigateBaseModel):
|
||||
alerts: AlertsConfig = Field(
|
||||
default_factory=AlertsConfig,
|
||||
title="Review alerts config",
|
||||
title="Alerts config",
|
||||
description="Settings for which tracked objects generate alerts and how alerts are retained.",
|
||||
)
|
||||
detections: DetectionsConfig = Field(
|
||||
default_factory=DetectionsConfig,
|
||||
title="Review detections config",
|
||||
title="Detections config",
|
||||
description="Settings for creating detection events (non-alert) and how long to keep them.",
|
||||
)
|
||||
genai: GenAIReviewConfig = Field(
|
||||
default_factory=GenAIReviewConfig,
|
||||
title="Review description genai config",
|
||||
title="GenAI config",
|
||||
description="Controls use of generative AI for producing descriptions and summaries of review items.",
|
||||
)
|
||||
|
||||
@ -11,17 +11,17 @@ __all__ = ["SnapshotsConfig", "RetainConfig"]
|
||||
class RetainConfig(FrigateBaseModel):
|
||||
default: float = Field(
|
||||
default=10,
|
||||
title="Default retention period",
|
||||
title="Default retention",
|
||||
description="Default number of days to retain snapshots.",
|
||||
)
|
||||
mode: RetainModeEnum = Field(
|
||||
default=RetainModeEnum.motion,
|
||||
title="Retain mode",
|
||||
title="Retention mode",
|
||||
description="Mode for retention: all (save all segments), motion (save segments with motion), or active_objects (save segments with active objects).",
|
||||
)
|
||||
objects: dict[str, float] = Field(
|
||||
default_factory=dict,
|
||||
title="Object retention period",
|
||||
title="Object retention",
|
||||
description="Per-object overrides for snapshot retention days.",
|
||||
)
|
||||
|
||||
@ -34,32 +34,32 @@ class SnapshotsConfig(FrigateBaseModel):
|
||||
)
|
||||
clean_copy: bool = Field(
|
||||
default=True,
|
||||
title="Create a clean copy of the snapshot image",
|
||||
title="Save clean copy",
|
||||
description="Save an unannotated clean copy of snapshots in addition to annotated ones.",
|
||||
)
|
||||
timestamp: bool = Field(
|
||||
default=False,
|
||||
title="Add a timestamp overlay on the snapshot",
|
||||
title="Timestamp overlay",
|
||||
description="Overlay a timestamp on saved snapshots.",
|
||||
)
|
||||
bounding_box: bool = Field(
|
||||
default=True,
|
||||
title="Add a bounding box overlay on the snapshot",
|
||||
title="Bounding box overlay",
|
||||
description="Draw bounding boxes for tracked objects on saved snapshots.",
|
||||
)
|
||||
crop: bool = Field(
|
||||
default=False,
|
||||
title="Crop the snapshot to the detected object",
|
||||
title="Crop snapshot",
|
||||
description="Crop saved snapshots to the detected object's bounding box.",
|
||||
)
|
||||
required_zones: list[str] = Field(
|
||||
default_factory=list,
|
||||
title="List of required zones to be entered in order to save a snapshot",
|
||||
title="Required zones",
|
||||
description="Zones an object must enter for a snapshot to be saved.",
|
||||
)
|
||||
height: Optional[int] = Field(
|
||||
default=None,
|
||||
title="Snapshot image height",
|
||||
title="Snapshot height",
|
||||
description="Height (pixels) to resize saved snapshots to; leave empty to preserve original size.",
|
||||
)
|
||||
retain: RetainConfig = Field(
|
||||
@ -69,7 +69,7 @@ class SnapshotsConfig(FrigateBaseModel):
|
||||
)
|
||||
quality: int = Field(
|
||||
default=70,
|
||||
title="Quality of the encoded jpeg (0-100)",
|
||||
title="JPEG quality",
|
||||
description="JPEG encode quality for saved snapshots (0-100).",
|
||||
ge=0,
|
||||
le=100,
|
||||
|
||||
@ -13,11 +13,11 @@ class CameraUiConfig(FrigateBaseModel):
|
||||
|
||||
order: int = Field(
|
||||
default=0,
|
||||
title="Order of camera in UI",
|
||||
title="UI order",
|
||||
description="Numeric order used to sort the camera in the UI; larger numbers appear later.",
|
||||
)
|
||||
dashboard: bool = Field(
|
||||
default=True,
|
||||
title="Show this camera in Frigate dashboard UI",
|
||||
title="Show in dashboard",
|
||||
description="Toggle whether this camera is visible in the main dashboard.",
|
||||
)
|
||||
|
||||
@ -15,44 +15,44 @@ logger = logging.getLogger(__name__)
|
||||
class ZoneConfig(BaseModel):
|
||||
friendly_name: Optional[str] = Field(
|
||||
None,
|
||||
title="Zone friendly name used in the Frigate UI.",
|
||||
title="Zone name",
|
||||
description="A user-friendly name for the zone, displayed in the Frigate UI. If not set, a formatted version of the zone name will be used.",
|
||||
)
|
||||
filters: dict[str, FilterConfig] = Field(
|
||||
default_factory=dict,
|
||||
title="Zone filters.",
|
||||
title="Zone filters",
|
||||
description="Filters to apply to objects within this zone. Used to reduce false positives or restrict which objects are considered present in the zone.",
|
||||
)
|
||||
coordinates: Union[str, list[str]] = Field(
|
||||
title="Coordinates polygon for the defined zone.",
|
||||
title="Coordinates",
|
||||
description="Polygon coordinates that define the zone area. Can be a comma-separated string or a list of coordinate strings. Coordinates should be relative (0-1) or absolute (legacy).",
|
||||
)
|
||||
distances: Optional[Union[str, list[str]]] = Field(
|
||||
default_factory=list,
|
||||
title="Real-world distances for the sides of quadrilateral for the defined zone.",
|
||||
title="Real-world distances",
|
||||
description="Optional real-world distances for each side of the zone quadrilateral, used for speed or distance calculations. Must have exactly 4 values if set.",
|
||||
)
|
||||
inertia: int = Field(
|
||||
default=3,
|
||||
title="Number of consecutive frames required for object to be considered present in the zone.",
|
||||
title="Inertia frames",
|
||||
gt=0,
|
||||
description="Number of consecutive frames an object must be detected in the zone before it is considered present. Helps filter out transient detections.",
|
||||
)
|
||||
loitering_time: int = Field(
|
||||
default=0,
|
||||
ge=0,
|
||||
title="Number of seconds that an object must loiter to be considered in the zone.",
|
||||
title="Loitering seconds",
|
||||
description="Number of seconds an object must remain in the zone to be considered as loitering. Set to 0 to disable loitering detection.",
|
||||
)
|
||||
speed_threshold: Optional[float] = Field(
|
||||
default=None,
|
||||
ge=0.1,
|
||||
title="Minimum speed value for an object to be considered in the zone.",
|
||||
title="Minimum speed",
|
||||
description="Minimum speed (in real-world units if distances are set) required for an object to be considered present in the zone. Used for speed-based zone triggers.",
|
||||
)
|
||||
objects: Union[str, list[str]] = Field(
|
||||
default_factory=list,
|
||||
title="List of objects that can trigger the zone.",
|
||||
title="Trigger objects",
|
||||
description="List of object types (from labelmap) that can trigger this zone. Can be a string or a list of strings. If empty, all objects are considered.",
|
||||
)
|
||||
_color: Optional[tuple[int, int, int]] = PrivateAttr()
|
||||
|
||||
@ -10,17 +10,17 @@ __all__ = ["CameraGroupConfig"]
|
||||
class CameraGroupConfig(FrigateBaseModel):
|
||||
cameras: Union[str, list[str]] = Field(
|
||||
default_factory=list,
|
||||
title="List of cameras in this group",
|
||||
title="Camera list",
|
||||
description="Array of camera names included in this group.",
|
||||
)
|
||||
icon: str = Field(
|
||||
default="generic",
|
||||
title="Icon that represents camera group",
|
||||
title="Group icon",
|
||||
description="Icon used to represent the camera group in the UI.",
|
||||
)
|
||||
order: int = Field(
|
||||
default=0,
|
||||
title="Sort order for group",
|
||||
title="Sort order",
|
||||
description="Numeric order used to sort camera groups in the UI; larger numbers appear later.",
|
||||
)
|
||||
|
||||
|
||||
@ -50,22 +50,22 @@ class AudioTranscriptionConfig(FrigateBaseModel):
|
||||
)
|
||||
language: str = Field(
|
||||
default="en",
|
||||
title="Language abbreviation to use for audio event transcription/translation",
|
||||
title="Transcription language",
|
||||
description="Language code used for transcription/translation (for example 'en' for English).",
|
||||
)
|
||||
device: Optional[EnrichmentsDeviceEnum] = Field(
|
||||
default=EnrichmentsDeviceEnum.CPU,
|
||||
title="The device used for audio transcription",
|
||||
title="Transcription device",
|
||||
description="Device key (CPU/GPU) to run the transcription model on.",
|
||||
)
|
||||
model_size: str = Field(
|
||||
default="small",
|
||||
title="The size of the embeddings model used",
|
||||
title="Model size",
|
||||
description="Model size to use for transcription; the small model runs on CPU, large model requires a GPU.",
|
||||
)
|
||||
live_enabled: Optional[bool] = Field(
|
||||
default=False,
|
||||
title="Enable live transcriptions",
|
||||
title="Live transcription",
|
||||
description="Enable streaming live transcription for audio as it is received.",
|
||||
)
|
||||
|
||||
@ -73,12 +73,12 @@ class AudioTranscriptionConfig(FrigateBaseModel):
|
||||
class BirdClassificationConfig(FrigateBaseModel):
|
||||
enabled: bool = Field(
|
||||
default=False,
|
||||
title="Enable bird classification",
|
||||
title="Bird classification",
|
||||
description="Enable or disable bird classification.",
|
||||
)
|
||||
threshold: float = Field(
|
||||
default=0.9,
|
||||
title="Minimum classification score required to be considered a match",
|
||||
title="Minimum score",
|
||||
description="Minimum classification score required to accept a bird classification.",
|
||||
gt=0.0,
|
||||
le=1.0,
|
||||
@ -87,24 +87,24 @@ class BirdClassificationConfig(FrigateBaseModel):
|
||||
|
||||
class CustomClassificationStateCameraConfig(FrigateBaseModel):
|
||||
crop: list[float, float, float, float] = Field(
|
||||
title="Crop of image frame on this camera to run classification on",
|
||||
title="Classification crop",
|
||||
description="Crop coordinates to use for running classification on this camera.",
|
||||
)
|
||||
|
||||
|
||||
class CustomClassificationStateConfig(FrigateBaseModel):
|
||||
cameras: Dict[str, CustomClassificationStateCameraConfig] = Field(
|
||||
title="Cameras to run classification on",
|
||||
title="Classification cameras",
|
||||
description="Per-camera crop and settings for running state classification.",
|
||||
)
|
||||
motion: bool = Field(
|
||||
default=False,
|
||||
title="If classification should be run when motion is detected in the crop",
|
||||
title="Run on motion",
|
||||
description="If true, run classification when motion is detected within the specified crop.",
|
||||
)
|
||||
interval: int | None = Field(
|
||||
default=None,
|
||||
title="Interval to run classification on in seconds",
|
||||
title="Classification interval",
|
||||
description="Interval (seconds) between periodic classification runs for state classification.",
|
||||
gt=0,
|
||||
)
|
||||
@ -112,12 +112,13 @@ class CustomClassificationStateConfig(FrigateBaseModel):
|
||||
|
||||
class CustomClassificationObjectConfig(FrigateBaseModel):
|
||||
objects: list[str] = Field(
|
||||
title="Object types to classify",
|
||||
default_factory=list,
|
||||
title="Classify objects",
|
||||
description="List of object types to run object classification on.",
|
||||
)
|
||||
classification_type: ObjectClassificationType = Field(
|
||||
default=ObjectClassificationType.sub_label,
|
||||
title="Type of classification that is applied",
|
||||
title="Classification type",
|
||||
description="Classification type applied: 'sub_label' (adds sub_label) or other supported types.",
|
||||
)
|
||||
|
||||
@ -125,22 +126,22 @@ class CustomClassificationObjectConfig(FrigateBaseModel):
|
||||
class CustomClassificationConfig(FrigateBaseModel):
|
||||
enabled: bool = Field(
|
||||
default=True,
|
||||
title="Enable running the model",
|
||||
title="Enable model",
|
||||
description="Enable or disable the custom classification model.",
|
||||
)
|
||||
name: str | None = Field(
|
||||
default=None,
|
||||
title="Name of classification model",
|
||||
title="Model name",
|
||||
description="Identifier for the custom classification model to use.",
|
||||
)
|
||||
threshold: float = Field(
|
||||
default=0.8,
|
||||
title="Classification score threshold to change the state",
|
||||
title="Score threshold",
|
||||
description="Score threshold used to change the classification state.",
|
||||
)
|
||||
save_attempts: int | None = Field(
|
||||
default=None,
|
||||
title="Number of classification attempts to save in the recent classifications tab. If not specified, defaults to 200 for object classification and 100 for state classification",
|
||||
title="Saved attempts",
|
||||
description="How many classification attempts to save for recent classifications UI.",
|
||||
ge=0,
|
||||
)
|
||||
@ -169,22 +170,22 @@ class SemanticSearchConfig(FrigateBaseModel):
|
||||
)
|
||||
reindex: Optional[bool] = Field(
|
||||
default=False,
|
||||
title="Reindex all tracked objects on startup",
|
||||
title="Reindex on startup",
|
||||
description="Trigger a full reindex of historical tracked objects into the embeddings database.",
|
||||
)
|
||||
model: Optional[SemanticSearchModelEnum] = Field(
|
||||
default=SemanticSearchModelEnum.jinav1,
|
||||
title="The CLIP model to use for semantic search",
|
||||
title="Semantic search model",
|
||||
description="The embeddings model to use for semantic search (for example 'jinav1').",
|
||||
)
|
||||
model_size: str = Field(
|
||||
default="small",
|
||||
title="The size of the embeddings model used",
|
||||
title="Model size",
|
||||
description="Select model size; 'small' runs on CPU and 'large' typically requires GPU.",
|
||||
)
|
||||
device: Optional[str] = Field(
|
||||
default=None,
|
||||
title="The device key to use for semantic search",
|
||||
title="Device",
|
||||
description="This is an override, to target a specific device. See https://onnxruntime.ai/docs/execution-providers/ for more information",
|
||||
)
|
||||
|
||||
@ -192,7 +193,7 @@ class SemanticSearchConfig(FrigateBaseModel):
|
||||
class TriggerConfig(FrigateBaseModel):
|
||||
friendly_name: Optional[str] = Field(
|
||||
None,
|
||||
title="Trigger friendly name used in the Frigate UI",
|
||||
title="Friendly name",
|
||||
description="Optional friendly name displayed in the UI for this trigger.",
|
||||
)
|
||||
enabled: bool = Field(
|
||||
@ -202,15 +203,15 @@ class TriggerConfig(FrigateBaseModel):
|
||||
)
|
||||
type: TriggerType = Field(
|
||||
default=TriggerType.DESCRIPTION,
|
||||
title="Type of trigger",
|
||||
title="Trigger type",
|
||||
description="Type of trigger: 'thumbnail' (match against image) or 'description' (match against text).",
|
||||
)
|
||||
data: str = Field(
|
||||
title="Trigger content (text phrase or image ID)",
|
||||
title="Trigger content",
|
||||
description="Text phrase or thumbnail ID to match against tracked objects.",
|
||||
)
|
||||
threshold: float = Field(
|
||||
title="Confidence score required to run the trigger",
|
||||
title="Trigger threshold",
|
||||
description="Minimum similarity score (0-1) required to activate this trigger.",
|
||||
default=0.8,
|
||||
gt=0.0,
|
||||
@ -218,7 +219,7 @@ class TriggerConfig(FrigateBaseModel):
|
||||
)
|
||||
actions: List[TriggerAction] = Field(
|
||||
default=[],
|
||||
title="Actions to perform when trigger is matched",
|
||||
title="Trigger actions",
|
||||
description="List of actions to execute when trigger matches (notification, sub_label, attribute).",
|
||||
)
|
||||
|
||||
@ -228,7 +229,7 @@ class TriggerConfig(FrigateBaseModel):
|
||||
class CameraSemanticSearchConfig(FrigateBaseModel):
|
||||
triggers: Dict[str, TriggerConfig] = Field(
|
||||
default={},
|
||||
title="Trigger actions on tracked objects that match existing thumbnails or descriptions",
|
||||
title="Triggers",
|
||||
description="Actions and matching criteria for camera-specific semantic search triggers.",
|
||||
)
|
||||
|
||||
@ -243,56 +244,56 @@ class FaceRecognitionConfig(FrigateBaseModel):
|
||||
)
|
||||
model_size: str = Field(
|
||||
default="small",
|
||||
title="The size of the embeddings model used",
|
||||
title="Model size",
|
||||
description="Model size to use for face embeddings (small/large); larger may require GPU.",
|
||||
)
|
||||
unknown_score: float = Field(
|
||||
title="Minimum face distance score required to be marked as a potential match",
|
||||
description="Distance threshold below which a face is considered a potential match (lower = stricter).",
|
||||
title="Unknown score threshold",
|
||||
description="Distance threshold below which a face is considered a potential match (higher = stricter).",
|
||||
default=0.8,
|
||||
gt=0.0,
|
||||
le=1.0,
|
||||
)
|
||||
detection_threshold: float = Field(
|
||||
default=0.7,
|
||||
title="Minimum face detection score required to be considered a face",
|
||||
title="Detection threshold",
|
||||
description="Minimum detection confidence required to consider a face detection valid.",
|
||||
gt=0.0,
|
||||
le=1.0,
|
||||
)
|
||||
recognition_threshold: float = Field(
|
||||
default=0.9,
|
||||
title="Minimum face distance score required to be considered a match",
|
||||
title="Recognition threshold",
|
||||
description="Face embedding distance threshold to consider two faces a match.",
|
||||
gt=0.0,
|
||||
le=1.0,
|
||||
)
|
||||
min_area: int = Field(
|
||||
default=750,
|
||||
title="Min area of face box to consider running face recognition",
|
||||
title="Minimum face area",
|
||||
description="Minimum area (pixels) of a detected face box required to attempt recognition.",
|
||||
)
|
||||
min_faces: int = Field(
|
||||
default=1,
|
||||
gt=0,
|
||||
le=6,
|
||||
title="Min face recognitions for the sub label to be applied to the person object",
|
||||
title="Minimum faces",
|
||||
description="Minimum number of face recognitions required before applying a recognized sub-label to a person.",
|
||||
)
|
||||
save_attempts: int = Field(
|
||||
default=200,
|
||||
ge=0,
|
||||
title="Number of face attempts to save in the recent recognitions tab",
|
||||
title="Saved attempts",
|
||||
description="Number of face recognition attempts to retain for recent recognition UI.",
|
||||
)
|
||||
blur_confidence_filter: bool = Field(
|
||||
default=True,
|
||||
title="Apply blur quality filter to face confidence",
|
||||
title="Blur confidence filter",
|
||||
description="Adjust confidence scores based on image blur to reduce false positives for poor quality faces.",
|
||||
)
|
||||
device: Optional[str] = Field(
|
||||
default=None,
|
||||
title="The device key to use for face recognition",
|
||||
title="Device",
|
||||
description="This is an override, to target a specific device. See https://onnxruntime.ai/docs/execution-providers/ for more information",
|
||||
)
|
||||
|
||||
@ -305,7 +306,7 @@ class CameraFaceRecognitionConfig(FrigateBaseModel):
|
||||
)
|
||||
min_area: int = Field(
|
||||
default=750,
|
||||
title="Min area of face box to consider running face recognition",
|
||||
title="Minimum face area",
|
||||
description="Minimum area (pixels) of a detected face box required to attempt recognition.",
|
||||
)
|
||||
|
||||
@ -313,83 +314,81 @@ class CameraFaceRecognitionConfig(FrigateBaseModel):
|
||||
|
||||
|
||||
class ReplaceRule(FrigateBaseModel):
|
||||
pattern: str = Field(..., title="Regex pattern to match.")
|
||||
replacement: str = Field(
|
||||
..., title="Replacement string (supports backrefs like '\\1')."
|
||||
)
|
||||
pattern: str = Field(..., title="Regex pattern")
|
||||
replacement: str = Field(..., title="Replacement string")
|
||||
|
||||
|
||||
class LicensePlateRecognitionConfig(FrigateBaseModel):
|
||||
enabled: bool = Field(
|
||||
default=False,
|
||||
title="Enable license plate recognition",
|
||||
title="Enable LPR",
|
||||
description="Enable or disable LPR globally; camera-level settings can override.",
|
||||
)
|
||||
model_size: str = Field(
|
||||
default="small",
|
||||
title="The size of the embeddings model used",
|
||||
title="Model size",
|
||||
description="Model size used for text detection/recognition; small runs on CPU, large on GPU.",
|
||||
)
|
||||
detection_threshold: float = Field(
|
||||
default=0.7,
|
||||
title="License plate object confidence score required to begin running recognition",
|
||||
title="Detection threshold",
|
||||
description="Detection confidence threshold to begin running OCR on a suspected plate.",
|
||||
gt=0.0,
|
||||
le=1.0,
|
||||
)
|
||||
min_area: int = Field(
|
||||
default=1000,
|
||||
title="Minimum area of license plate to begin running recognition",
|
||||
title="Minimum plate area",
|
||||
description="Minimum plate area (pixels) required to attempt recognition.",
|
||||
)
|
||||
recognition_threshold: float = Field(
|
||||
default=0.9,
|
||||
title="Recognition confidence score required to add the plate to the object as a sub label",
|
||||
title="Recognition threshold",
|
||||
description="Confidence threshold required for recognized plate text to be attached as a sub-label.",
|
||||
gt=0.0,
|
||||
le=1.0,
|
||||
)
|
||||
min_plate_length: int = Field(
|
||||
default=4,
|
||||
title="Minimum number of characters a license plate must have to be added to the object as a sub label",
|
||||
title="Min plate length",
|
||||
description="Minimum number of characters a recognized plate must contain to be considered valid.",
|
||||
)
|
||||
format: Optional[str] = Field(
|
||||
default=None,
|
||||
title="Regular expression for the expected format of license plate",
|
||||
title="Plate format regex",
|
||||
description="Optional regex to validate recognized plate strings against an expected format.",
|
||||
)
|
||||
match_distance: int = Field(
|
||||
default=1,
|
||||
title="Allow this number of missing/incorrect characters to still cause a detected plate to match a known plate",
|
||||
title="Match distance",
|
||||
description="Number of character mismatches allowed when comparing detected plates to known plates.",
|
||||
ge=0,
|
||||
)
|
||||
known_plates: Optional[Dict[str, List[str]]] = Field(
|
||||
default={},
|
||||
title="Known plates to track (strings or regular expressions)",
|
||||
title="Known plates",
|
||||
description="List of plates or regexes to specially track or alert on.",
|
||||
)
|
||||
enhancement: int = Field(
|
||||
default=0,
|
||||
title="Amount of contrast adjustment and denoising to apply to license plate images before recognition",
|
||||
description="Enhancement level (0-10) to apply to plate crops prior to OCR; higher values may not always improve results.",
|
||||
title="Enhancement level",
|
||||
description="Enhancement level (0-10) to apply to plate crops prior to OCR; higher values may not always improve results, levels above 5 may only work with night time plates and should be used with caution.",
|
||||
ge=0,
|
||||
le=10,
|
||||
)
|
||||
debug_save_plates: bool = Field(
|
||||
default=False,
|
||||
title="Save plates captured for LPR for debugging purposes",
|
||||
title="Save debug plates",
|
||||
description="Save plate crop images for debugging LPR performance.",
|
||||
)
|
||||
device: Optional[str] = Field(
|
||||
default=None,
|
||||
title="The device key to use for LPR",
|
||||
title="Device",
|
||||
description="This is an override, to target a specific device. See https://onnxruntime.ai/docs/execution-providers/ for more information",
|
||||
)
|
||||
replace_rules: List[ReplaceRule] = Field(
|
||||
default_factory=list,
|
||||
title="List of regex replacement rules for normalizing detected plates. Each rule has 'pattern' and 'replacement'",
|
||||
title="Replacement rules",
|
||||
description="Regex replacement rules used to normalize detected plate strings before matching.",
|
||||
)
|
||||
|
||||
@ -397,24 +396,24 @@ class LicensePlateRecognitionConfig(FrigateBaseModel):
|
||||
class CameraLicensePlateRecognitionConfig(FrigateBaseModel):
|
||||
enabled: bool = Field(
|
||||
default=False,
|
||||
title="Enable license plate recognition",
|
||||
title="Enable LPR",
|
||||
description="Enable or disable LPR globally; camera-level settings can override.",
|
||||
)
|
||||
expire_time: int = Field(
|
||||
default=3,
|
||||
title="Expire plates not seen after number of seconds (for dedicated LPR cameras only)",
|
||||
title="Expire seconds",
|
||||
description="Time in seconds after which an unseen plate is expired from the tracker (for dedicated LPR cameras only).",
|
||||
gt=0,
|
||||
)
|
||||
min_area: int = Field(
|
||||
default=1000,
|
||||
title="Minimum area of license plate to begin running recognition",
|
||||
title="Minimum plate area",
|
||||
description="Minimum plate area (pixels) required to attempt recognition.",
|
||||
)
|
||||
enhancement: int = Field(
|
||||
default=0,
|
||||
title="Amount of contrast adjustment and denoising to apply to license plate images before recognition",
|
||||
description="Enhancement level (0-10) to apply to plate crops prior to OCR; higher values may not always improve results.",
|
||||
title="Enhancement level",
|
||||
description="Enhancement level (0-10) to apply to plate crops prior to OCR; higher values may not always improve results, levels above 5 may only work with night time plates and should be used with caution.",
|
||||
ge=0,
|
||||
le=10,
|
||||
)
|
||||
@ -425,15 +424,15 @@ class CameraLicensePlateRecognitionConfig(FrigateBaseModel):
|
||||
class CameraAudioTranscriptionConfig(FrigateBaseModel):
|
||||
enabled: bool = Field(
|
||||
default=False,
|
||||
title="Enable audio transcription",
|
||||
title="Enable transcription",
|
||||
description="Enable or disable automatic audio transcription.",
|
||||
)
|
||||
enabled_in_config: Optional[bool] = Field(
|
||||
default=None, title="Keep track of original state of audio transcription."
|
||||
default=None, title="Original transcription state"
|
||||
)
|
||||
live_enabled: Optional[bool] = Field(
|
||||
default=False,
|
||||
title="Enable live transcriptions",
|
||||
title="Live transcription",
|
||||
description="Enable streaming live transcription for audio as it is received.",
|
||||
)
|
||||
|
||||
|
||||
@ -306,14 +306,14 @@ class FrigateConfig(FrigateBaseModel):
|
||||
)
|
||||
safe_mode: bool = Field(
|
||||
default=False,
|
||||
title="If Frigate should be started in safe mode",
|
||||
title="Safe mode",
|
||||
description="When enabled, start Frigate in safe mode with reduced features for troubleshooting.",
|
||||
)
|
||||
|
||||
# Fields that install global state should be defined first, so that their validators run first.
|
||||
environment_vars: EnvVars = Field(
|
||||
default_factory=dict,
|
||||
title="Frigate environment variables",
|
||||
title="Environment variables",
|
||||
description="Key/value pairs of environment variables to set for the Frigate process.",
|
||||
)
|
||||
logger: LoggerConfig = Field(
|
||||
|
||||
@ -11,12 +11,12 @@ __all__ = ["LoggerConfig"]
|
||||
class LoggerConfig(FrigateBaseModel):
|
||||
default: LogLevel = Field(
|
||||
default=LogLevel.info,
|
||||
title="Default logging level",
|
||||
title="Logging level",
|
||||
description="Default global log verbosity (debug, info, warning, error).",
|
||||
)
|
||||
logs: dict[str, LogLevel] = Field(
|
||||
default_factory=dict,
|
||||
title="Log level for specified processes",
|
||||
title="Per-process log level",
|
||||
description="Per-component log level overrides to increase or decrease verbosity for specific modules.",
|
||||
)
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ __all__ = ["MqttConfig"]
|
||||
class MqttConfig(FrigateBaseModel):
|
||||
enabled: bool = Field(
|
||||
default=True,
|
||||
title="Enable MQTT communication",
|
||||
title="Enable MQTT",
|
||||
description="Enable or disable MQTT integration for state, events, and snapshots.",
|
||||
)
|
||||
host: str = Field(
|
||||
@ -29,18 +29,18 @@ class MqttConfig(FrigateBaseModel):
|
||||
)
|
||||
topic_prefix: str = Field(
|
||||
default="frigate",
|
||||
title="MQTT topic prefix",
|
||||
title="Topic prefix",
|
||||
description="MQTT topic prefix for all Frigate topics; must be unique if running multiple instances.",
|
||||
)
|
||||
client_id: str = Field(
|
||||
default="frigate",
|
||||
title="MQTT client ID",
|
||||
title="Client ID",
|
||||
description="Client identifier used when connecting to the MQTT broker; should be unique per instance.",
|
||||
)
|
||||
stats_interval: int = Field(
|
||||
default=60,
|
||||
ge=FREQUENCY_STATS_POINTS,
|
||||
title="MQTT camera stats interval",
|
||||
title="Stats interval",
|
||||
description="Interval in seconds for publishing system and camera stats to MQTT.",
|
||||
)
|
||||
user: Optional[EnvString] = Field(
|
||||
@ -56,22 +56,22 @@ class MqttConfig(FrigateBaseModel):
|
||||
)
|
||||
tls_ca_certs: Optional[str] = Field(
|
||||
default=None,
|
||||
title="MQTT TLS CA certificates",
|
||||
title="TLS CA certs",
|
||||
description="Path to CA certificate for TLS connections to the broker (for self-signed certs).",
|
||||
)
|
||||
tls_client_cert: Optional[str] = Field(
|
||||
default=None,
|
||||
title="MQTT TLS client certificate",
|
||||
title="Client cert",
|
||||
description="Client certificate path for TLS mutual authentication; do not set user/password when using client certs.",
|
||||
)
|
||||
tls_client_key: Optional[str] = Field(
|
||||
default=None,
|
||||
title="MQTT TLS client key",
|
||||
title="Client key",
|
||||
description="Private key path for the client certificate.",
|
||||
)
|
||||
tls_insecure: Optional[bool] = Field(
|
||||
default=None,
|
||||
title="MQTT TLS insecure",
|
||||
title="TLS insecure",
|
||||
description="Allow insecure TLS connections by skipping hostname verification (not recommended).",
|
||||
)
|
||||
qos: int = Field(
|
||||
|
||||
@ -10,7 +10,7 @@ __all__ = ["IPv6Config", "ListenConfig", "NetworkingConfig"]
|
||||
class IPv6Config(FrigateBaseModel):
|
||||
enabled: bool = Field(
|
||||
default=False,
|
||||
title="Enable IPv6 for port 5000 and/or 8971",
|
||||
title="Enable IPv6",
|
||||
description="Enable IPv6 support for Frigate services (API and UI) where applicable.",
|
||||
)
|
||||
|
||||
@ -29,7 +29,11 @@ class ListenConfig(FrigateBaseModel):
|
||||
|
||||
|
||||
class NetworkingConfig(FrigateBaseModel):
|
||||
ipv6: IPv6Config = Field(default_factory=IPv6Config, title="IPv6 configuration")
|
||||
ipv6: IPv6Config = Field(
|
||||
default_factory=IPv6Config,
|
||||
title="IPv6 configuration",
|
||||
description="IPv6-specific settings for Frigate network services.",
|
||||
)
|
||||
listen: ListenConfig = Field(
|
||||
default_factory=ListenConfig, title="Listening ports configuration"
|
||||
)
|
||||
|
||||
@ -11,17 +11,17 @@ __all__ = ["ProxyConfig", "HeaderMappingConfig"]
|
||||
class HeaderMappingConfig(FrigateBaseModel):
|
||||
user: str = Field(
|
||||
default=None,
|
||||
title="Header name from upstream proxy to identify user",
|
||||
title="User header",
|
||||
description="Header containing the authenticated username provided by the upstream proxy.",
|
||||
)
|
||||
role: str = Field(
|
||||
default=None,
|
||||
title="Header name from upstream proxy to identify user role",
|
||||
title="Role header",
|
||||
description="Header containing the authenticated user's role or groups from the upstream proxy.",
|
||||
)
|
||||
role_map: Optional[dict[str, list[str]]] = Field(
|
||||
default_factory=dict,
|
||||
title=("Mapping of Frigate roles to upstream group values. "),
|
||||
title=("Role mapping"),
|
||||
description="Map upstream group values to Frigate roles (for example map admin groups to the admin role).",
|
||||
)
|
||||
|
||||
@ -29,27 +29,27 @@ class HeaderMappingConfig(FrigateBaseModel):
|
||||
class ProxyConfig(FrigateBaseModel):
|
||||
header_map: HeaderMappingConfig = Field(
|
||||
default_factory=HeaderMappingConfig,
|
||||
title="Header mapping definitions for proxy user passing",
|
||||
title="Header mapping",
|
||||
description="Map incoming proxy headers to Frigate user and role fields for proxy-based auth.",
|
||||
)
|
||||
logout_url: Optional[str] = Field(
|
||||
default=None,
|
||||
title="Redirect url for logging out with proxy",
|
||||
title="Logout URL",
|
||||
description="URL to redirect users to when logging out via the proxy.",
|
||||
)
|
||||
auth_secret: Optional[EnvString] = Field(
|
||||
default=None,
|
||||
title="Secret value for proxy authentication",
|
||||
title="Proxy secret",
|
||||
description="Optional secret checked against the X-Proxy-Secret header to verify trusted proxies.",
|
||||
)
|
||||
default_role: Optional[str] = Field(
|
||||
default="viewer",
|
||||
title="Default role for proxy users",
|
||||
title="Default role",
|
||||
description="Default role assigned to proxy-authenticated users when no role mapping applies (admin or viewer).",
|
||||
)
|
||||
separator: Optional[str] = Field(
|
||||
default=",",
|
||||
title="The character used to separate values in a mapped header",
|
||||
title="Separator character",
|
||||
description="Character used to split multiple values provided in proxy headers.",
|
||||
)
|
||||
|
||||
|
||||
@ -10,22 +10,22 @@ __all__ = ["TelemetryConfig", "StatsConfig"]
|
||||
class StatsConfig(FrigateBaseModel):
|
||||
amd_gpu_stats: bool = Field(
|
||||
default=True,
|
||||
title="Enable AMD GPU stats",
|
||||
title="AMD GPU stats",
|
||||
description="Enable collection of AMD GPU statistics if an AMD GPU is present.",
|
||||
)
|
||||
intel_gpu_stats: bool = Field(
|
||||
default=True,
|
||||
title="Enable Intel GPU stats",
|
||||
title="Intel GPU stats",
|
||||
description="Enable collection of Intel GPU statistics if an Intel GPU is present.",
|
||||
)
|
||||
network_bandwidth: bool = Field(
|
||||
default=False,
|
||||
title="Enable network bandwidth for ffmpeg processes",
|
||||
title="Network bandwidth",
|
||||
description="Enable per-process network bandwidth monitoring for camera ffmpeg processes and detectors (requires capabilities).",
|
||||
)
|
||||
intel_gpu_device: Optional[str] = Field(
|
||||
default=None,
|
||||
title="Define the device to use when gathering SR-IOV stats",
|
||||
title="SR-IOV device",
|
||||
description="Device identifier used when treating Intel GPUs as SR-IOV to fix GPU stats.",
|
||||
)
|
||||
|
||||
@ -33,16 +33,16 @@ class StatsConfig(FrigateBaseModel):
|
||||
class TelemetryConfig(FrigateBaseModel):
|
||||
network_interfaces: list[str] = Field(
|
||||
default=[],
|
||||
title="Enabled network interfaces for bandwidth calculation",
|
||||
title="Network interfaces",
|
||||
description="List of network interface name prefixes to monitor for bandwidth statistics.",
|
||||
)
|
||||
stats: StatsConfig = Field(
|
||||
default_factory=StatsConfig,
|
||||
title="System Stats",
|
||||
title="System stats",
|
||||
description="Options to enable/disable collection of various system and GPU statistics.",
|
||||
)
|
||||
version_check: bool = Field(
|
||||
default=True,
|
||||
title="Enable latest version check",
|
||||
title="Version check",
|
||||
description="Enable an outbound check to detect if a newer Frigate version is available.",
|
||||
)
|
||||
|
||||
@ -8,6 +8,6 @@ __all__ = ["TlsConfig"]
|
||||
class TlsConfig(FrigateBaseModel):
|
||||
enabled: bool = Field(
|
||||
default=True,
|
||||
title="Enable TLS for port 8971",
|
||||
title="Enable TLS",
|
||||
description="Enable TLS for Frigate's web UI and API on the configured TLS port.",
|
||||
)
|
||||
|
||||
@ -29,26 +29,26 @@ class UnitSystemEnum(str, Enum):
|
||||
class UIConfig(FrigateBaseModel):
|
||||
timezone: Optional[str] = Field(
|
||||
default=None,
|
||||
title="Override UI timezone",
|
||||
title="Timezone",
|
||||
description="Optional timezone to display across the UI (defaults to browser local time if unset).",
|
||||
)
|
||||
time_format: TimeFormatEnum = Field(
|
||||
default=TimeFormatEnum.browser,
|
||||
title="Override UI time format",
|
||||
title="Time format",
|
||||
description="Time format to use in the UI (browser, 12hour, or 24hour).",
|
||||
)
|
||||
date_style: DateTimeStyleEnum = Field(
|
||||
default=DateTimeStyleEnum.short,
|
||||
title="Override UI dateStyle",
|
||||
title="Date style",
|
||||
description="Date style to use in the UI (full, long, medium, short).",
|
||||
)
|
||||
time_style: DateTimeStyleEnum = Field(
|
||||
default=DateTimeStyleEnum.medium,
|
||||
title="Override UI timeStyle",
|
||||
title="Time style",
|
||||
description="Time style to use in the UI (full, long, medium, short).",
|
||||
)
|
||||
unit_system: UnitSystemEnum = Field(
|
||||
default=UnitSystemEnum.metric,
|
||||
title="The unit system to use for measurements",
|
||||
title="Unit system",
|
||||
description="Unit system for display (metric or imperial) used in the UI and MQTT.",
|
||||
)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user