What it is
Home Assistant is the brain of the house. I run the full HAOS distribution as a Proxmox VM — not a container, not the Core install on a Raspberry Pi — because I want the supervisor stack, automatic backups, and add-on store as first-class features.
The flagship workload isn't lights and switches. It's a Sleep Lab: a multi-sensor rig in my bedroom that monitors temperature, humidity, and air quality during a sleep session, controls a humidifier via a smart plug, snapshots my Withings sleep score after wake, and generates an AI briefing twice a day. Lights and presence sensors are there too, but they're the supporting cast.
Why I run it
Two reasons.
First, the obvious one: I want a real home automation platform that I own. HA's integration list is enormous, it speaks Matter and Zigbee and Thread and Bluetooth and Z-Wave all in one pane, and the automation engine is more capable than anything any single vendor ships with their app.
Second, the less obvious one: I sleep badly when the room conditions drift, and I wanted to measure that, not guess. The Sleep Lab grew out of "I'll just plot temp over time" into a small system that actually tunes the room overnight and then tells me how the night went in the morning. It's been the single most useful automation I've ever built — partly because of what it does, partly because building it forced me to learn HA's deep features (template sensors, statistics platform, generic_hygrostat, multi-step conditional automations with fallbacks) properly.
How I use it
Day to day:
- A single
input_boolean.sleep_modemaster switch starts and ends a session. Flipping it on resets all the sticky min/max trackers and starts the humidifier control loop. Flipping it off freezes the session stats and schedules the morning briefing. - A
generic_hygrostatvirtual humidifier sits on top of the dumb smart plug, with a 40% RH target, a 10% dry-tolerance band, and a five-minute keep-alive. The humidifier brain is HA; the plug is just the actuator. - A "Pre-Sleep Strategy" automation fires at 2 AM. It pulls last night's score, the rolling 3-day and 7-day averages, the current room temp, the Montréal forecast, and feeds them to a local LLM. Out comes a three-sentence tactical briefing pushed to my phone.
- A "Morning Retrospective" automation fires when I flip sleep mode off. Same pattern, different prompt: session min/max/avg, sleep score, humidifier behaviour, outdoor low. Four-sentence verdict, peer-to-peer tone, pushed to my phone.
- Both AI automations try the local LLM first and fall back to Gemini if the local call returns nothing. The HA "Trace" tab shows which path ran.
Beyond the Sleep Lab there's a presence-triggered washroom light (dim red while sleep mode is on, low white otherwise — keeps night vision intact), the usual temp/humidity alerts, and Withings as a long-term data source for rolling averages.
Setup notes
- Host: full HAOS as a Proxmox VM on the Optiplex node. PBS handles backups; HA's own backup add-on writes daily snapshots that I rotate weekly.
- Reverse proxy: behind NPM with
use_x_forwarded_for: trueand atrusted_proxiesentry pointing at the NPM container. Without that, every request looks like it came from the proxy IP and the mobile app's external auth breaks. - LLM agent: Extended OpenAI Conversation (from HACS), pointed at LM Studio on the Zenbook. Google Gemini is configured as a fallback agent.
- Update cadence: manual, monthly. HA's release cycle is fast enough that auto-updating is a quick way to get surprised by a breaking integration change.
Runbook
- Healthy looks like: dashboard loads, sensor cards show fresh values, the conversation entity is
available, the Homepage widget shows the right people-home / lights-on counts. - Homepage widget shows "unauthorized": the long-lived access token expired or was rotated. Profile → Security → Long-Lived Access Tokens → create new → update the variable in the Homepage stack.
- Mobile app auth errors over the proxied hostname, works on the internal address: the NPM container's upstream changed. Update
http.trusted_proxiesinconfiguration.yamland restart HA. - Morning Retrospective fires but says "AI is currently offline": both the local LLM and Gemini failed. Check that LM Studio is loaded (and that auto-unload isn't biting — see the LM Studio runbook), that DNS for the Open WebUI hostname resolves, and that the Gemini API key is still valid.
- Sleep stats look stale after wake-up: the sticky min/max sensors hold their last value until the next sleep-mode on→off transition. If they look frozen, I forgot to toggle sleep mode the previous night.
- 3-day rolling average equals today's score: the statistics platform needs at least three samples. The morning prompt has a "recalibrating baseline" branch that handles the first week of data; past that, check Developer Tools → States to confirm the snapshot sensor is actually capturing values.
- Where logs live: Settings → System → Logs for HA itself, the per-automation Trace tab for any specific automation, the integration's own log section for LLM call failures.