90 lines
4.8 KiB
Plaintext
90 lines
4.8 KiB
Plaintext
# identity configuration template.
|
|
#
|
|
# Copy this to the container host as (for example)
|
|
# /opt/smart-home/identity/identity.env, fill in real values, and chmod 600 it.
|
|
# Same never-commit handling as admin-canvas.env / pantry-vision.env.
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Auth — required. identity fails closed (rejects every request) while this is
|
|
# empty. Also has to be baked into every kiosk that calls this service directly
|
|
# (hosts/kitchen-display/, hosts/door-panel/), same reasoning as
|
|
# PANTRY_VISION_TOKEN. Generate one with:
|
|
# openssl rand -hex 32
|
|
# ---------------------------------------------------------------------------
|
|
IDENTITY_TOKEN=
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Home Assistant — required for registration and presence lookups.
|
|
#
|
|
# NOT http://homeassistant:8123 — the homeassistant container runs with
|
|
# `network_mode: host` (setup-container-host.sh), so it's off the compose bridge
|
|
# network entirely and unreachable by container name from here, the same reason
|
|
# Node-RED's own setup notes point at the host's real LAN IP instead. Use that IP.
|
|
#
|
|
# HA_TOKEN is a Long-Lived Access Token: HA's own UI, click your profile (bottom
|
|
# left) -> Security tab -> Long-Lived Access Tokens -> Create Token. There is no
|
|
# way for this repo to generate or push this for you.
|
|
# ---------------------------------------------------------------------------
|
|
HA_URL=http://192.168.1.10:8123
|
|
HA_TOKEN=
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Registration candidate allowlist — THE anti-spoofing boundary. Comma-separated
|
|
# entity_id PREFIXES. MUST be edited to match your real HA entity IDs (Developer
|
|
# Tools -> States, after setting up Bermuda's Private BLE Device integration and/or
|
|
# fixed-MAC BLE tags per docs/project-plan.md §1.5) before registration will ever
|
|
# find a candidate. Only put IRK-resolved Private BLE Device entities or fixed-tag
|
|
# entities here — NEVER a raw bluetooth_le_tracker/device_tracker entity backed by
|
|
# an unresolved randomized MAC. See server.py's module docstring for why.
|
|
# ---------------------------------------------------------------------------
|
|
TRUSTED_ENTITY_PREFIXES=device_tracker.pble_,device_tracker.bletag_
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# MQTT — the /weather proxy (smarthome/weather/current, the same household-wide
|
|
# topic hosts/thin-client's idle-gallery overlay already reads), and Frigate face
|
|
# recognition as a SECOND, corroborating presence signal (Phase 20, Tapo pan/tilt
|
|
# cameras) — never a registration signal, only ever OR-ed into /presence's "home"
|
|
# result. FRIGATE_EVENTS_TOPIC's payload shape (sub_label = ["name", confidence])
|
|
# is unverified against a real Frigate 0.16+ face-recognition deployment — see
|
|
# README.md.
|
|
# ---------------------------------------------------------------------------
|
|
MQTT_BROKER_HOST=mosquitto
|
|
MQTT_BROKER_PORT=1883
|
|
MQTT_USERNAME=
|
|
MQTT_PASSWORD=
|
|
FRIGATE_EVENTS_TOPIC=frigate/events
|
|
FACE_PRESENCE_WINDOW_SECONDS=600
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Visit history — "who was home when, and with whom". identity samples its own
|
|
# /presence on a timer and writes arrival/departure rows; nothing pushes events at
|
|
# it. See server.py's "VISITS ARE SAMPLED, NOT REPORTED".
|
|
#
|
|
# PRESENCE_POLL_SECONDS how often to sample. Each sample is a full HA /api/states
|
|
# fetch, so this is deliberately coarse — it's a household
|
|
# log, not a security audit trail.
|
|
# DEPARTURE_GRACE_SECONDS how long someone must read as "not home" before their
|
|
# visit is closed. BLE presence flaps (a phone in a pocket
|
|
# in the far room drops out and comes back); without this,
|
|
# one evening at home becomes forty "visits". The recorded
|
|
# departure time is the last moment they were actually seen,
|
|
# not when this window expired.
|
|
# VISIT_MAX_OPEN_HOURS safety net for a visit that never gets a definite "not
|
|
# home" to close it (someone device-less marked home by hand
|
|
# and never marked away). Closed as 'timed_out', never as
|
|
# 'departed' — the log never claims to have observed a
|
|
# departure it didn't.
|
|
# ---------------------------------------------------------------------------
|
|
PRESENCE_POLL_SECONDS=60
|
|
DEPARTURE_GRACE_SECONDS=900
|
|
VISIT_MAX_OPEN_HOURS=72
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Run behaviour
|
|
# ---------------------------------------------------------------------------
|
|
IDENTITY_PORT=8097
|
|
IDENTITY_DB_PATH=/data/identity.db
|
|
IDENTITY_PHOTO_DIR=/data/photos
|
|
IDENTITY_MAX_IMAGE_MB=15
|
|
LOG_LEVEL=INFO
|