Inspiration
“Alexa, turn off the lights.”
Except someone is still standing in the hallway.
Imagine setting up a Goodnight routine that turns off the hallway light only when nobody is there. You add the condition, test it, and everything works. A few days later, you edit another routine. That night, the light switches off while someone is still walking through the hallway.
The frustrating part isn't just that the automation failed. It's that you had already corrected this exact behavior.
That led us to a question: What if a smart home could remember not just what we asked it to do, but what we explicitly told it never to do?
That question became SWITCH.
What it does
SWITCH is a verification layer for Alexa+ routines that turns household corrections into persistent, versioned regression tests.
A user can express a requirement such as, “Don't turn off the hallway light while someone is there.” SWITCH structures that instruction into a testable requirement for the user to review and confirm.
When a routine changes, SWITCH replays relevant scenarios against saved requirements. If an edited Goodnight routine turns off the hallway light while occupancy is true, SWITCH identifies the violation and exposes the event trace behind the failure.
It can then propose a repair for the user to inspect. After the change, SWITCH reruns the relevant tests so the result is based on verification, not merely an AI-generated explanation.
The goal is to catch regressions before they become real-world surprises.
How we built it
We designed SWITCH around a separation between AI-assisted interpretation and deterministic verification.
The interaction layer translates supported inputs into a normalized workflow. A versioned requirement layer preserves confirmed household rules. The simulation engine replays scenarios using explicit device states and ordered events, while an assertion evaluator determines whether each requirement passes, fails, or remains inconclusive.
When a failure occurs, the reporting layer connects the result to the relevant requirement, scenario, and execution trace. Proposed repairs remain reviewable, and the user retains control over whether to approve them.
This architecture is designed to make failures reproducible and explanations traceable to evidence rather than dependent on a language model's confidence.
Challenges we ran into
The central challenge was ensuring that a user's original intent remained consistent across interpretation, requirement storage, simulation, and verification.
A warning is only useful if the underlying failure can be reproduced. Likewise, a proposed repair is not trustworthy simply because it sounds reasonable. It must be tested against the requirement it is intended to restore.
We therefore focused on explicit confirmation, versioned requirements, deterministic scenario replay, and evidence-backed results. Another important consideration was distinguishing simulated behavior from live Alexa+ integration so that the product's capabilities are represented accurately.
Accomplishments that we're proud of
We are proud of the core idea behind SWITCH: turning a household correction into a reusable engineering test instead of leaving it as an instruction that can be forgotten.
The project brings together requirement versioning, scenario-based regression testing, failure localization, repair proposals, and verification in a single workflow.
Most importantly, SWITCH treats trust as something to demonstrate. A failure should have an identifiable cause, and a repair should have a test result that users can inspect before approving a change.
What we learned
We learned that understanding an instruction and reliably enforcing it are two different engineering problems.
AI can help interpret what a person means, but interpreting intent is not the same as proving that an automation respects it. Reliable verification requires explicit requirements, known scenario inputs, reproducible execution, and observable evidence.
We also learned that human approval and clear uncertainty handling are essential when software proposes changes that affect a person's home.
What's next for SWITCH
Our next steps are to expand scenario coverage, test more complex interactions between routines, strengthen regression reporting, and improve the workflow for reviewing and approving repairs.
We also want to explore deeper Alexa+ integration through supported interfaces, so SWITCH can move beyond modeled scenarios toward testing real routine configurations where platform access permits.
The long-term vision is a smart home that does more than execute commands. It should preserve the household's intent as routines evolve—and provide evidence that important rules are still being respected.
A routine working once is not enough. It should keep working without forgetting what matters.
Built With
- alexa+
- artificial-intelligence
- automated-testing
- deterministic-simulation
- developer
- digital-twin
- event-driven-architecture
- event-tracing
- explainable-ai
- fastapi
- fault-detection
- generative-ai
- home-automation
- human-in-the-loop
- natural-language-processing
- python
- react
- regression-testing
- rest-api
- routine-management
- smart-home
- software-verification
- typescript
- version-control
- web-application
Log in or sign up for Devpost to join the conversation.