Rev 2026-06-25 TCEC Access Control System Documentation

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

FilePathPurpose
prox_card.py/addon_configs/a0d7b954_appdaemon/apps/prox_card.pyCore access logic; fire_strike() implementation pending
prox_ui.py/addon_configs/a0d7b954_appdaemon/apps/prox_ui.pyWeb UI; serve_snapshot and serve_manual routes; arm/disarm
prox_ui.html/addon_configs/a0d7b954_appdaemon/apps/prox_ui.htmlMain access control UI page template
motion_monitor.py/addon_configs/a0d7b954_appdaemon/apps/motion_monitor.pyCamera motion handler
appdaemon.yaml/addon_configs/a0d7b954_appdaemon/appdaemon.yamlAD global config โ€” log level, HA URL, lat/long

4.3 SQLite Database

Path: /config/prox_cards.db

TableKey ColumnsPurpose
tenantsid, name, phone, email, unit, activeRegistered building tenants
cardsid, card_number, tenant_id, activeProximity cards โ€” tenants may have multiple
doorsid, door_id, label, ha_entity (MISSING)Door definitions โ€” ha_entity needed before fire_strike() works
door_permissionstenant_id, door_idWhich tenants may access which doors
access_logid, timestamp, card_number, door_id, display_result, photo_path, ai_descriptionEvery swipe event โ€” result stored at event time
log_imagesid, log_id, image_path, descriptionPhotos 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

PathPurpose
/homeassistant/www/snapshots/TTS audio and camera images โ€” served at /app/snapshot?f=filename
/homeassistant/www/snapshots/hal9000.jpgHAL 9000 branding image
/homeassistant/www/snapshots/hal_speech.mp3ElevenLabs 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

FilePurpose
/config/esphome/wiegand-readers.yamlFreenove #1 โ€” 8 Wiegand reader GPIO mappings
/config/esphome/wiegand-readers-2.yamlFreenove #2 โ€” 3 Wiegand reader GPIO mappings
/config/esphome/access_control.yamlWaveshare 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 / SettingValue / Purpose
/home/oracle/kiosk-watchdog.shWatchdog โ€” restarts Chromium if it exits
sudo crontab0 3 * * * โ€” daily 3 AM reboot
NetworkManager connectionnetplan-wlan0-EIS โ€” WiFi profile for EIS.local
~/.config/openbox/rc.xmlKeyboard 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)

SharePurposeAccess
ha_backups_pi5Daily HA backups from Pi 5SMB from Pi 5 (user: homeassistant)
blueiris_recordingsBlue Iris recordings โ€” redirection pendingBlue Iris PC (requires desktop access)
access_controlAccess log images and exportsPi 5 via SMB
system_backups/pi5_imageFull Pi 5 disk imagesManual
โ† Previous3 ยท SoftwareNext โ†’5 ยท User Manual