feat(S3): visitor event types, VisitorsConfig, face_recognition dependency
Add KNOWN_VISITOR, UNKNOWN_VISITOR, VISITOR_DEPARTED to EventType enum. Add VisitorsConfig model to config.py and wire into VigilarConfig. Add face_recognition>=1.3.0 under [face] optional-dependencies in pyproject.toml. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
a44187d0f1
commit
6b7adc1cb6
@ -31,6 +31,9 @@ gpio = [
|
||||
"gpiozero>=2.0.1",
|
||||
"RPi.GPIO>=0.7.1",
|
||||
]
|
||||
face = [
|
||||
"face_recognition>=1.3.0",
|
||||
]
|
||||
dev = [
|
||||
"pytest>=8.2.0",
|
||||
"pytest-cov>=5.0.0",
|
||||
|
||||
@ -285,6 +285,18 @@ class PetsConfig(BaseModel):
|
||||
rule_eval_interval_s: int = 60
|
||||
|
||||
|
||||
# --- Visitors Config ---
|
||||
|
||||
class VisitorsConfig(BaseModel):
|
||||
enabled: bool = False
|
||||
match_threshold: float = 0.6
|
||||
cameras: list[str] = Field(default_factory=list)
|
||||
unknown_alert_threshold: int = 3
|
||||
departure_timeout_s: int = 300
|
||||
max_embeddings_per_profile: int = 10
|
||||
face_crop_dir: str = "/var/vigilar/faces"
|
||||
|
||||
|
||||
# --- Location Config ---
|
||||
|
||||
class LocationConfig(BaseModel):
|
||||
@ -345,6 +357,7 @@ class VigilarConfig(BaseModel):
|
||||
vehicles: VehicleConfig = Field(default_factory=VehicleConfig)
|
||||
health: HealthConfig = Field(default_factory=HealthConfig)
|
||||
pets: PetsConfig = Field(default_factory=PetsConfig)
|
||||
visitors: VisitorsConfig = Field(default_factory=VisitorsConfig)
|
||||
security: SecurityConfig = Field(default_factory=SecurityConfig)
|
||||
location: LocationConfig = Field(default_factory=LocationConfig)
|
||||
cameras: list[CameraConfig] = Field(default_factory=list)
|
||||
|
||||
@ -49,6 +49,9 @@ class EventType(StrEnum):
|
||||
PACKAGE_REMINDER = "PACKAGE_REMINDER"
|
||||
PACKAGE_COLLECTED = "PACKAGE_COLLECTED"
|
||||
PET_RULE_TRIGGERED = "PET_RULE_TRIGGERED"
|
||||
KNOWN_VISITOR = "KNOWN_VISITOR"
|
||||
UNKNOWN_VISITOR = "UNKNOWN_VISITOR"
|
||||
VISITOR_DEPARTED = "VISITOR_DEPARTED"
|
||||
|
||||
|
||||
# --- Sensor Types ---
|
||||
|
||||
Loading…
Reference in New Issue
Block a user