Plain-English commands, safe device actions.
A hiring-assignment build: plain-English home commands turned into safe device actions.
- Role
- Solo build
- When
- Feb 2026
- Built with
- Python · Ollama (Llama 3.2) · Whisper · Flask · Twilio · MQTT
- Where
- AHA Smart Homes · hiring assignment
3Input channels
48Test commands
0Cloud calls
What it showed AHA
- Fast and offlineRules answer common commands in milliseconds; the local LLM only handles what they can’t, with no cloud calls.
- Safe around locks and alarmsLocks and alarms are never part of “everything”, unlocking needs typed confirmation, and unknown devices are rejected.
- One brain, three channelsThe same engine answers on the console, by offline voice and on WhatsApp.
The problem
- People don’t talk like an API: “I’m feeling hot”, “it’s too dark in here”, “turn everything off except the bedroom”.
- Each one has to become the right device action, safely.
What I built
- Rules first, LLM second: rules answer in milliseconds, a local Llama 3.2 handles the rest, and low confidence asks a question. Read →
- A semantic layer: comfort complaints, comparatives, typos and “everything except” all map to actions.
- Guardrails: locks and alarms are never part of “everything”, unlocking needs typed confirmation, and unknown devices are rejected.
- One brain, three channels: console, offline Whisper voice and a WhatsApp bot, with a live decision dashboard.
What I learned
Most commands don’t need an LLM, and the ones that do need a schema they can’t escape.