Build a Private Home Assistant Brain¶
| Category | Creative & Real-World AI Builds |
| Status | π‘ Partially completed |
| Repo | nextwork-build-a-private-home-assistant-brain |
| Original NextWork guide | nextwork.ai |
Learning project
Practice work following a NextWork guide, separate from my production projects.
π NextWork learning project. This is a practice project I built while working through NextWork's Build a Private Home Assistant Brain guide. It is part of my Learning portfolio and is fully separate from my production projects.
Category: Learning βΊ Creative & Real-World AI Builds
Status: π‘ Partial
Overview¶
Voice assistants usually send every request to the cloud. This build keeps the whole loop at home: Home Assistant interprets the command, Speech-to-Phrase turns speech into text, and Piper speaks the reply. Nothing leaves the machine. A written safety brief decides where an old Echo Dot conversion must stop before any hardware is touched.
Summary¶
The local smart-home brain runs: Home Assistant (container) plus the Speech-to-Phrase and Piper Wyoming services in Docker. Onboarding is done with a local owner account. A Workshop Light Toggle helper is exposed to Assist and shown on the dashboard, and typed Assist "turn on Workshop Light" switched it on. The missing-engine check is recorded: no STT, and only a cloud TTS. The Private Echo pipeline (HA conversation + Speech-to-Phrase + Piper) turned the light off in a Debug text run, and also from real streamed audio. Secret mission: "make the workshop private" toggles the light and replies "Workshop mode changed". A safety brief for the D9N29T conversion was written from the canonical device page. It's partial because there's no Home Assistant OS VM or app store, no Echo hardware, and Claude Chat is replaced by a local model.
The checks behind this are in docs/verification.txt.
Skills & tools¶
Home Assistant, Assist / voice pipelines, Wyoming protocol, Docker, Home automation, Hardware safety
What I built¶
up.sh/down.sh: Home Assistant Container +rhasspy/wyoming-speech-to-phrase+rhasspy/wyoming-piperon a private Docker network. They stand in for the guide's HAOS 18.4 VirtualBox VM and its two apps. All state, including the owner password and token, stays in~/.nw-ha, outside the repo.tools/setup.pyβdocs/01-device-and-missing-engines.json: the same APIs the UI calls handle onboarding, create the Toggle helper and Assist exposure, add the dashboard cards, and run typed Assist (off β on, "Turned on the switch"). It also records the voice engines before the fix: STT none, TTS only Google Translate (cloud).tools/voice.pyβdocs/02-private-echo-pipeline.json: adds both Wyoming services and creates Private Echo (conversation.home_assistant, stt.speech_to_phrase, tts.piper en_US-lessac-medium). The Debug text run of "turn off Workshop Light" gets "Turned off the switch", the state goes off, and the reply audio is saved (docs/private-echo-reply.mp3). Spoken run: Piper's audio of the command, streamed into STT, was heard as "turn off Workshop Light" and acted on (docs/voice-pipeline-notes.md).tools/secret_mission.pyβdocs/03-secret-mission.json: a "Private Workshop Command" automation with a conversation trigger. Typing "make the workshop private" twice flipped offβonβoff, and both replies were "Workshop mode changed".tools/screenshot.mjsβdocs/dashboard-workshop-light.png: logs in through the normal HA login page and captures the dashboard with Workshop Light.- Safety brief:
docs/source-excerpts.md(the canonical D9N29T page's Requirements + USB access, verbatim),docs/claude-chat-draft.md(a local model given the guide's exact prompt), anddocs/echo-conversion-safety-brief.md(the corrected brief: D9N29T, Fire OS 6574.1, Linux-PC host with direct USB, so neither Mac qualifies as-is; read-only vs write actions; 7 stop points). No command was run on any device.
How to run¶
./up.sh # HA + Speech-to-Phrase + Piper (state in ~/.nw-ha)
python3 tools/setup.py # onboarding, Workshop Light, typed Assist
./up.sh # again, so Speech-to-Phrase starts with the HA token
python3 tools/voice.py # Wyoming + Private Echo, text and spoken runs
python3 tools/secret_mission.py
./down.sh # or ./down.sh --purge to delete everything
Verification¶
I ran the verification command on 2026-12-02. The full output is in docs/verification.txt.
python3 -m py_compile tools/ha.py tools/setup.py tools/voice.py tools/secret_mission.py tools/safety_brief.py && bash -n up.sh && bash -n down.sh && python3 -c "import json;v=json.load(open('docs/02-private-echo-pipeline.json'));assert v['spoken_run']['heard'].lower()=='turn off workshop light' and v['debug_text_run']['state_after']=='off';s=json.load(open('docs/03-secret-mission.json'));assert all(x['assist_reply']=='Workshop mode changed' and x['state_before']!=x['state_after'] for x in s);d=json.load(open('docs/01-device-and-missing-engines.json'));assert d['typed_assist']['state_after']=='on' and d['voice_engines_before']['stt_providers']==[]" && grep -q 'Fire OS 6574.1' docs/echo-conversion-safety-brief.md && echo HA OK
What isn't done, and why¶
The guide runs Home Assistant OS 18.4 in a bridged VirtualBox VM on a Mac and installs Speech-to-Phrase and Piper from the HAOS app store. HA Container has no app store, so the same services run as separate Wyoming containers. The UI steps (onboarding, helper, exposure, dashboard, Voice assistants, Debug) were done through the APIs the UI uses, and the dashboard was screenshotted. Claude Chat, which drafts the safety brief, is replaced by a local model, and the final brief is corrected against the source. There's no physical Echo Dot (D9N29T); it was never touched, and that's the guide's own stopping point too. The spoken test used Piper's synthetic voice, not a microphone.
Original project: https://nextwork.ai/projects/dea8cc08-8c80-440b-a343-8891b215ec77 Β· Part of my NextWork Learning portfolio (hub).
Verification output¶
From docs/verification.txt:
$ python3 -m py_compile tools/ha.py tools/setup.py tools/voice.py tools/secret_mission.py tools/safety_brief.py && bash -n up.sh && bash -n down.sh && python3 -c "import json;v=json.load(open('docs/02-private-echo-pipeline.json'));assert v['spoken_run']['heard'].lower()=='turn off workshop light' and v['debug_text_run']['state_after']=='off';s=json.load(open('docs/03-secret-mission.json'));assert all(x['assist_reply']=='Workshop mode changed' and x['state_before']!=x['state_after'] for x in s);d=json.load(open('docs/01-device-and-missing-engines.json'));assert d['typed_assist']['state_after']=='on' and d['voice_engines_before']['stt_providers']==[]" && grep -q 'Fire OS 6574.1' docs/echo-conversion-safety-brief.md && echo HA OK
HA OK
[exit code 0]