CHAPTER 04Configuration Files
All paths are on the Pi 5 (192.168.191.121). Access via SSH to the core-ssh addon or the HA file editor.
4.1 AppDaemon โ apps.yaml
Path: /addon_configs/a0d7b954_appdaemon/apps/apps.yaml
Critical โ ElevenLabs Keys Lost on Rewrite Every time apps.yaml is rewritten during cleanup, the ElevenLabs credentials disappear. Before any edit, verify
elevenlabs_api_key and elevenlabs_voice_id are present under both prox_card and prox_ui.---
hello_world:
module: hello
class: HelloWorld
prox_card:
module: prox_card
class: ProxCard
elevenlabs_api_key: <KEY> # MUST be preserved
elevenlabs_voice_id: bAq8AI9QURijOtmeFFqT # Sigma Centauri
prox_ui:
module: prox_ui
class: ProxUI
elevenlabs_api_key: <KEY> # MUST be preserved
elevenlabs_voice_id: bAq8AI9QURijOtmeFFqT # Sigma Centauri
motion_monitor:
module: motion_monitor
class: MotionMonitor
4.2 AppDaemon App Files
| File | Path | Purpose |
|---|---|---|
| prox_card.py | /addon_configs/a0d7b954_appdaemon/apps/prox_card.py | Core access logic; fire_strike() implementation pending |
| prox_ui.py | /addon_configs/a0d7b954_appdaemon/apps/prox_ui.py | Web UI; serve_snapshot and serve_manual routes; arm/disarm |
| prox_ui.html | /addon_configs/a0d7b954_appdaemon/apps/prox_ui.html | Main access control UI page template |
| motion_monitor.py | /addon_configs/a0d7b954_appdaemon/apps/motion_monitor.py | Camera motion handler |
| appdaemon.yaml | /addon_configs/a0d7b954_appdaemon/appdaemon.yaml | AD global config โ log level, HA URL, lat/long |
4.3 SQLite Database
Path: /config/prox_cards.db
| Table | Key Columns | Purpose |
|---|---|---|
| tenants | id, name, phone, email, unit, active | Registered building tenants |
| cards | id, card_number, tenant_id, active | Proximity cards โ tenants may have multiple |
| doors | id, door_id, label, ha_entity (MISSING) | Door definitions โ ha_entity needed before fire_strike() works |
| door_permissions | tenant_id, door_id | Which tenants may access which doors |
| access_log | id, timestamp, card_number, door_id, display_result, photo_path, ai_description | Every swipe event โ result stored at event time |
| log_images | id, log_id, image_path, description | Photos captured at arm/disarm and entry events |
ha_entity Column Missing: The
doors table lacks ha_entity. This is the immediate next development task โ without it, card swipes are logged but strikes do not fire.4.4 Web Content Paths
| Path | Purpose |
|---|---|
| /homeassistant/www/snapshots/ | TTS audio and camera images โ served at /app/snapshot?f=filename |
| /homeassistant/www/snapshots/hal9000.jpg | HAL 9000 branding image |
| /homeassistant/www/snapshots/hal_speech.mp3 | ElevenLabs TTS audio โ regenerated per announcement |
| /homeassistant/www/manual/ | HTML documentation โ served at /app/manual?f=filename |
Wrong Path โ Silent Failure: The correct snapshot path is
/homeassistant/www/snapshots/ โ not /config/www/snapshots/. Files written to the wrong path are not served and no error is raised.4.5 ESPHome Device Configs
| File | Purpose |
|---|---|
| /config/esphome/wiegand-readers.yaml | Freenove #1 โ 8 Wiegand reader GPIO mappings |
| /config/esphome/wiegand-readers-2.yaml | Freenove #2 โ 3 Wiegand reader GPIO mappings |
| /config/esphome/access_control.yaml | Waveshare relay board โ 8 strike switch entities |
# All Wiegand reader entries must specify pulldown:
wiegand:
- id: reader_123b
d0: GPIO4
d1: GPIO5
on_tag:
- mqtt.publish:
topic: woodhaven/prox/scan
payload: !lambda 'return "{\"door\":\"123b\",\"card\":\"" + x + "\"}";'
4.6 Kiosk Configuration (Pi 4 โ 192.168.191.109)
| File / Setting | Value / Purpose |
|---|---|
| /home/oracle/kiosk-watchdog.sh | Watchdog โ restarts Chromium if it exits |
| sudo crontab | 0 3 * * * โ daily 3 AM reboot |
| NetworkManager connection | netplan-wlan0-EIS โ WiFi profile for EIS.local |
| ~/.config/openbox/rc.xml | Keyboard lockdown โ blocks F1โF12 and escape shortcuts |
| Chromium flags | --start-fullscreen (blocks external windows โ no on-screen keyboard possible) |
4.7 QNAP1 Shared Folders (192.168.191.10)
| Share | Purpose | Access |
|---|---|---|
| ha_backups_pi5 | Daily HA backups from Pi 5 | SMB from Pi 5 (user: homeassistant) |
| blueiris_recordings | Blue Iris recordings โ redirection pending | Blue Iris PC (requires desktop access) |
| access_control | Access log images and exports | Pi 5 via SMB |
| system_backups/pi5_image | Full Pi 5 disk images | Manual |