Three smart-home apps, each individually reasonable. Played forward together, they freeze your pipes.
Built for the AI Builders Hackathon — "The Internet Needs Better AI."
People stack automations across Apple Home, IFTTT, Ecobee, SmartThings, etc. Each rule gets reviewed and switched on in isolation, and looks completely fine on its own. None of these platforms can see what the others are doing — so nobody catches the interaction between them.
HomeSync plays out one very plausible version of that: a 72-hour winter trip where an energy-saving rule, an air-quality rule, and an away-mode rule combine to leave the house cold enough, for long enough, to put a water line at real risk — without a single rule doing anything "wrong" by itself.
- Shows three automation ecosystems (Apple Home, IFTTT, Ecobee) with their real rules, each marked "reviewed ✓" — the way a homeowner actually experiences them.
- Runs a deterministic simulation engine that plays every rule's trigger/action forward, hour by hour, across a 72-hour scenario. This part never touches an LLM — it's a real state machine, so the demo can't flake.
- Detects the cross-cutting physical consequence none of the three rules individually encodes (indoor temp near freezing + vent open + furnace capped, near a water line).
- Hands that detected conflict to a local LLM that explains, in one paragraph of plain homeowner language, what's about to happen physically and why none of the three rules caught it on their own.
- A scrubbable timeline + a live house cross-section let you watch the state evolve hour by hour, with the conflict moment highlighted.
- Optionally fires a real IFTTT webhook to your own account the moment the conflict-causing rule actually runs — one leg of this demo isn't simulated at all.
The deterministic engine can tell you what state the house is in. It can't tell you that a pipe is about to burst in a way a stressed homeowner will actually understand and act on, and it can't generalize to consequences nobody explicitly coded for. That's a reasoning/explanation job, not a lookup — which is where the local model comes in, deliberately kept to a bounded role (explain a fact pattern already computed with certainty) rather than controlling the simulation itself. Given three incompatible rule descriptions and a physical scenario, producing a correct, plain-language causal explanation needs real reasoning over world knowledge (freezing, thermal loss, vent behavior) — not string matching.
| Layer | Choice |
|---|---|
| Frontend | React + TypeScript + Vite + Tailwind CSS |
| Backend | Node.js + Express |
| Simulation | Custom deterministic state-machine engine (pure JS, no dependencies) |
| AI / reasoning | Local Ollama running deepseek-r1:1.5b — no cloud API, no key |
| Live integration | IFTTT Maker Webhooks (real HTTPS calls, optional) |
Zero paid APIs. Zero cloud inference. Nothing to leak, meter, or rate-limit.
Real today:
- IFTTT Maker Webhooks. When you connect a real Webhooks key, the moment "Fresh Air Vent
Rule" fires during a simulation, HomeSync sends a genuine HTTPS request to
https://maker.ifttt.com/trigger/{event}/with/key/{key}— a real Applet in your real IFTTT account can react to it. Not mocked; a live network call, and the app surfaces IFTTT's real response (success, or a real error) in the UI.- Known constraint, not hidden: IFTTT gates the realtime "Receive a web request" trigger — the direction HomeSync needs, since we're the one notifying IFTTT — behind an IFTTT Pro plan. A free-tier account will get a real 401/403 back from IFTTT here, which the app displays as-is rather than pretending it worked.
- The local Ollama narrative layer — a real local model call, not a canned string.
Simulated, and why:
- Apple HomeKit — structurally out of scope, not just "not built yet." There is no server-side HomeKit API at all. Automations only exist inside Apple's on-device framework, so reading a user's real Apple Home automations would require a native Swift/iOS companion app running locally with Home permission — a different project, not a backend integration.
- Ecobee — a real OAuth API exists for thermostat state and programs, and is the most realistic next real integration. Deliberately deferred past the hackathon window rather than rushed; wiring it up needs a registered developer app and a PIN-based OAuth flow.
- Google Home — Google now ships real Device/Structure/Automation APIs (public developer beta), but they're a native Android/iOS SDK rather than a REST call, and are better suited to creating automations in-app than reading back a user's existing Routines. Worth revisiting for a v2, not attempted here.
server/ Express API (never calls a paid/cloud LLM)
data/scenarios.js Rule sets for 3 ecosystems + the demo scenario
engine/deterministicSimulator.js Real state-machine simulation (source of truth)
engine/ollamaClient.js Local-only narrative layer, with a safe offline fallback
engine/iftttClient.js Real Maker Webhooks client
server.js /api/scenario, /api/simulate, /api/ifttt/*
web/ React + TypeScript + Tailwind
src/components/ EcosystemRail, HouseSchematic, Timeline, NarrativeLog, IftttConnect
src/App.tsx
No paid APIs, no cloud inference, no API keys. The narrative layer runs entirely against a local Ollama model.
# 1. Local model (skip if you already have Ollama + the model)
ollama pull deepseek-r1:1.5b
ollama serve # if not already running
# 2. Backend
cd server
npm install
npm start # http://localhost:8787
# 3. Frontend (new terminal)
cd web
npm install
npm run dev # http://localhost:5173Open http://localhost:5173 and press simulate 72 hours.
To go live with IFTTT: create a Webhooks-based Applet at https://ifttt.com/maker_webhooks, copy your key from the service's settings page, paste it into the "Connect a real IFTTT account" box in the app, and press connect. Requires IFTTT Pro to actually receive the trigger in realtime — see "What's real vs. simulated" above.
If Ollama isn't running or the model isn't pulled, server/engine/ollamaClient.js automatically
falls back to a deterministic template explanation — the app degrades gracefully rather than
breaking, which matters as much for a live demo as it does for a real user at 2am.
To point at a different local model: OLLAMA_MODEL=<name> npm start in server/.
- Real Ecobee integration (OAuth PIN flow) as the second live ecosystem
- A native iOS companion for genuine Apple HomeKit automation import
- More scenarios beyond the winter pipe-freeze case (security gaps, spoiled food, locked-out arrivals) using the same deterministic-engine + bounded-LLM-explanation pattern
- A real conflict library, generalized beyond one hardcoded scenario, so any imported rule set can be checked
MIT — see LICENSE.