APIs change overnight
Tesla deprecated their Vehicle API without warning. Every integration needs circuit breakers and fallback paths.
Twenty-six integrations. 724 actions. Circadian lighting. Predictive HVAC. Computer control. One async function. Parallel execution.
Every vendor builds a walled garden. Nothing talks to anything else.
Control4 speaks REST with proprietary tokens that expire every 24 hours. UniFi uses binary WebSocket frames. Denon accepts raw telnet on port 23. Tesla migrated to Fleet SSE. Mitsubishi hides behind Kumo Cloud.
I wanted direct API access. No cloud dependency. Sub-100ms response. Full control over every byte on my network.
Each vendor assumes they're the center of your universe.
A singleton controller. Room-centric design. Failure assumed.
Every integration will fail. The question isn't if—it's when. If Control4 goes down, lighting falls back to direct Lutron LEAP. If UniFi fails, presence routes through Tesla geofencing. There's always another path.
Thirteen systems, each with its own protocol and quirks.
| Integration | Protocol | Challenge |
|---|---|---|
| Control4 | REST + WebSocket | 24h token dance, undocumented device IDs |
| UniFi | Binary WebSocket | Reverse-engineered frame format |
| Denon | Telnet + HEOS | Input names don't match UI labels |
| Tesla | Fleet SSE | Partner registration required |
| Mitsubishi | Kumo Cloud V3 | Per-zone coordination |
| August | yalexs REST | Rate limiting |
| Eight Sleep | OAuth2 REST | 8+ second API latency |
| LG TV | WebSocket | Session management |
| Formlabs | Local REST | Job monitoring |
| Spotify | librespot | Playlist playback |
Control4 requires a three-step authentication through their cloud: account token → controller token → director token. The director token expires in 24 hours. I automated the entire flow.
UniFi's WebSocket uses undocumented binary frames. I captured network traffic and reverse-engineered the 8-byte header: packet type, payload format, compression flag, and payload size. Motion events arrive in under 50ms.
Ten cloud services via Composio: Gmail, Slack, Calendar, and more.
Urgent emails announce through speakers. Calendar events trigger room preparation. PR merges get celebration announcements. Digital events drive physical responses.
Three tiers of automation: host, sandboxed, and multi-OS.
| Tier | Technology | Use Case |
|---|---|---|
| 1: Host | Peekaboo MCP | Direct macOS automation, sub-100ms |
| 2: Sandboxed | CUA/Lume | Isolated macOS VMs, 97% native speed |
| 3: Multi-OS | Parallels | Windows/Linux, cross-platform testing |
Tier 1 is the Mac itself—Peekaboo captures screenshots, reads the accessibility tree, clicks, types. Fast and direct. But it's the real machine. Mistakes are permanent.
Tier 2 isolates risk. CUA/Lume spins up macOS VMs using Apple's Virtualization.Framework. 97% native speed on Apple Silicon. Snapshot before experimenting. Restore in seconds.
Tier 3 crosses platforms. The Parallels "Gaming" VM runs Windows 11 with 16 cores and 128GB RAM. Execute PowerShell scripts. Test Windows-specific workflows. Same API, different OS.
One interface routes commands everywhere. cli.execute("ls") runs locally.
Add target="parallels" and it runs on Windows. Add target="lume"
for the sandboxed VM. Same API, different target.
The system doesn't just see. It understands.
The PresenceEngine divides each day into 30-minute slots, tracking weekdays and weekends separately. Every observation updates probabilities via exponential moving average. Recent behavior matters more than old habits.
Light color temperature follows your body's rhythm: 3000K warm at dawn, 5000K cool during the day, 2700K warm at night. Brightness scales from 30% to 100% and back down.
Tesla location triggers arrival prediction. The system calculates ETA and pre-conditions the home 15 minutes before you arrive. Comfort waiting, not catching up.
WiFi presence categorizes every device: Owner, Family, Friend, Service, Airbnb, Infrastructure, Unknown. Known visitors trigger welcome sequences. Unknown devices generate alerts. Guest mode activates automatically.
Digital events trigger physical responses.
Always.
Some actions have consequences. Every physical action passes through a Control Barrier Function enforcer. If h(x) drops below zero, the action is blocked.
What I learned building this system.
Tesla deprecated their Vehicle API without warning. Every integration needs circuit breakers and fallback paths.
Denon's input names don't match their UI. I tried every combination. Now my code is the documentation.
Nine integrations connecting simultaneously overwhelmed Denon's telnet port. The fix: exponential backoff with jitter.
Eight Sleep's rate limiting taught me: read the Retry-After header, back off gracefully. Patient clients stay connected.
Code exists. Wiring awaits.
The house thinks now.
Twenty-six integrations. 724 actions. Circadian lighting. Predictive HVAC. Visitor detection. Three-tier computer control. Pattern learning that improves over time.
Every integration has a circuit breaker. Every failure has a fallback. State reconciliation catches drift. Persistence survives restarts.
Not magic. Just engineering.