Home Assistant
Home Assistant runs on the production Pi 5 as the hub for physical environment control: lights, climate, audio, presence tracking, and smart appliances. Beyond automating the home, it serves as a data pipeline — capturing physical-world events and forwarding them to n8n, where they flow into PostgreSQL for long-term analysis.
Deployment
Section titled “Deployment”Home Assistant runs in a Docker container on the Pi with network_mode: host. Host networking is required for mDNS/SSDP device discovery (Ecobee, Sonos, Hue Bridge), HomeKit Bridge multicast, Bluetooth via D-Bus, and direct TCP access to the Wyoming voice containers on localhost ports.
| Property | Value |
|---|---|
| Image | ghcr.io/home-assistant/home-assistant |
| Host | Pi 5 (Caroline), production |
| Networking | host network mode |
| Resources | 1536m memory, 2.0 CPUs |
| Config | ha-config/ directory, bind-mounted to /config |
| Recorder backend | PostgreSQL (10-day retention) |
The ESPHome firmware management tool runs alongside HA with host networking as well, but with restart: "no" — it’s started on-demand for satellite firmware updates, not kept running.
Integrations
Section titled “Integrations”Smart Home Devices
Section titled “Smart Home Devices”| Integration | Devices |
|---|---|
| Sonos | 3 speakers (portable, living room, Sonos Beam) |
| Philips Hue | Lights in 6 rooms (garage, living room, bedroom, office, bathroom, stairway, patio) via Hue Bridge |
| Ecobee | Thermostat / HVAC control |
| Dyson PH04 | Air purifier (local API via dyson_local HACS component) |
| BlissLights | Decorative lights (LocalTuya / tuya_local — no cloud dependency) |
| Wemo | Smart plug |
| Kasa TP-Link | 3 smart power strips with per-plug power monitoring |
| LG ThinQ | Washer and dryer |
| Litter-Robot | Status monitoring |
| Spotify | Playback control |
| Hue Sync Box | Hue Sync Box control via huesyncbox HACS component |
| Midea AC | Local AC control via midea_ac_lan HACS component |
Presence and Tracking
Section titled “Presence and Tracking”iCloud3 v3 (icloud3 HACS component) tracks three Apple devices: iPhone, Apple Watch, and MacBook Pro. Location updates feed into the ha.events PostgreSQL table as JSONB for timeline analysis.
Infrastructure / Network
Section titled “Infrastructure / Network”Wake-on-LAN and SSH shutdown switches for the Synology NAS and nightwatch machine. Binary sensor ping probes for both. These integrate with power management automations that bring machines online on a schedule and shut them down when idle.
Voice and AI
Section titled “Voice and AI”Wyoming protocol integrations for the local STT, TTS, and wake word detection services. The m_agent custom conversation agent routes all voice commands to n8n via a local webhook, enabling Ollama-powered responses on Atlas.
MCP Server
Section titled “MCP Server”The HA MCP Server (ha-mcp v7.0.0, 89 tools) runs via uvx stdio and exposes the full Home Assistant API — entities, services, automations, history — to Claude as an AI tool. This makes HA controllable directly from AI sessions.
Custom Components (HACS + Manual)
Section titled “Custom Components (HACS + Manual)”18 custom components extend the base HA installation.
| Component | Purpose |
|---|---|
adaptive_lighting | Circadian lighting automation (garage) |
alarmo | Alarm system |
battery_notes | Battery level tracking across devices |
chime_tts | Advanced TTS with chime support |
dyson_local | Dyson PH04 air purifier via local API |
hacs | Community component store |
huesyncbox | Hue Sync Box control |
icloud3 | Apple device presence tracking (v3) |
llmvision | LLM-based camera image analysis |
m_agent | Custom conversation agent (n8n webhook routing) |
midea_ac_lan | Midea AC local LAN control |
powercalc | Power consumption calculation and tracking |
spook / spook_inverse | Extended services and virtual entities |
thermal_comfort | Thermal comfort index calculations |
tuya_local | BlissLights local control (no cloud) |
watchman | Entity and service reference auditing |
Automations
Section titled “Automations”30+ YAML automations across four functional areas.
Data Bridge
Section titled “Data Bridge”The data bridge pattern is the backbone of the home-to-database pipeline. 8 automations push HA state changes as events to n8n webhooks, which write them to the ha.events PostgreSQL table for analysis and dashboarding.
| Automation | Events Captured |
|---|---|
bridge_automation_log | All automation trigger events |
bridge_light_changes | Light on/off state changes (6 rooms) |
bridge_plug_changes | Smart plug state changes (3 TP-Link strips) |
bridge_litter_robot | Cleaning cycles and waste drawer state |
bridge_climate_changes | HVAC mode and temperature changes |
bridge_media_changes | Sonos play/pause/idle across 3 speakers |
bridge_presence_changes | Zone transitions for person and device trackers |
bridge_weather_changes | Weather condition state changes |
Garage Suite
Section titled “Garage Suite”7 automations handle the garage environment as a complete system: PIR motion turns lights on (using adaptive lighting or the last saved scene), occupancy clearing turns them off, a 4-hour overnight reset catches manual overrides, and scene tracking saves the active Hue scene to an input helper so it can be restored later. A voice-triggered “chill vibes” automation applies mood lighting on demand.
Spotify Transfer
Section titled “Spotify Transfer”Two automations automate Spotify handoff: entering the garage transfers playback to the MacBook Pro; leaving the garage pauses it.
Power Management
Section titled “Power Management”NAS power management includes a daily evening pre-wake, idle shutdown checks, and event bridges for online/offline transitions. nightwatch power management handles the 5-minute idle suspend, the wake-on-satellite pre-wake trigger, and the keep-alive override for extended voice sessions.
Voice Archive
Section titled “Voice Archive”The push_voice_interaction automation sends satellite state-change data to the n8n voice interaction webhook, storing the full dialogue in voice_interactions and dialogue PostgreSQL tables for history.
Morning Routine
Section titled “Morning Routine”The wake_time_from_shortcut automation receives the wake time from an iOS Shortcut and computes the sunrise ramp start time. The good_morning automation fires at that time: stairway and bathroom lights on, Dyson night mode off.
The Data Bridge Pattern
Section titled “The Data Bridge Pattern”HA events flow to n8n via two REST command endpoints:
push_ha_event— all 8 bridge event typespush_voice_interaction— satellite voice dialogue
All requests are authenticated with a shared webhook key. n8n workflows receive the events and write them to the appropriate PostgreSQL tables. This architecture keeps HA responsible for capturing physical-world state and n8n responsible for processing and persisting it.
Lovelace Dashboard
Section titled “Lovelace Dashboard”A custom Lovelace dashboard at /lovelace-home provides a rich at-a-glance home interface. It uses 65+ cards across 7 sections styled with the Catppuccin theme. HACS frontend components used include adaptive_lighting, huesyncbox, spook, and powercalc.
Voice Intent Scripts
Section titled “Voice Intent Scripts”Two built-in intents extend HA’s voice assistant:
AnnounceOnSpeaker— “say [message] on the [room] speaker” routes audio to the correct Sonos via amedia_player.play_mediaworkaround for a known TTS bugRestoreScene— “restore scene in [room]” reads the savedinput_texthelper and re-applies the last active Hue scene
Custom sentence files in ha-config/custom_sentences/en/ define the intent patterns.
Helper Entities
Section titled “Helper Entities”YAML-defined helpers coordinate automation state without requiring UI configuration.
| Type | Helpers |
|---|---|
input_boolean | garage_manual_override, nas_trip_mode, nightwatch_keep_alive, nightwatch_wake_requested |
input_datetime | garage_override_cleared_at, nightwatch_last_active, nas_last_active, wake_time, sunrise_ramp_start |
input_text | garage_last_scene, bedroom_last_scene, office_last_scene, living_room_last_scene |
input_number | garage_last_brightness, garage_last_color_temp |