03Lab / Projects
Live
Kasa Home
Kasa Home started with a simple wish: say “bedroom” and have the lights come on, with no extra hub and no monthly subscription. It’s now a small home hub on a Raspberry Pi 5 that Jay talks to through Grok Bot.
What it does
The Pi sits on the home Wi-Fi and talks directly to six TP-Link Kasa Wi-Fi bulbs: two in the Bedroom, a Closet light, two in the Living Room, and a Main Light on the Workbench. Everything stays on the local network, with no cloud account in the loop. Each bulb can be switched on or off, dimmed, or checked.
Talking to it
The fun part is voice. Jay speaks into the Grok Bot app on a Mac or iPad, and Grok Bot turns that into a command for the Pi. “Turn on the bedroom,” “dim the living room to 30,” and “all lights off” just work.
The voice rules are deliberately cautious. “Bedroom” means the two bedroom lights and leaves the closet alone. “All lights” means the four main room lights. The Workbench can only be controlled by typing, so a misheard word never flips the lights in the workshop. If a phrase is ambiguous, like “light two,” Grok Bot asks which room instead of guessing.
Kept private by design
Nothing is open to the public internet. The Pi serves a small API that’s reachable only over a private Tailscale network, and every request needs a token. Only Grok Bot’s machine is allowed to reach it, and only on that one port. Bulb credentials and tokens stay on the devices that need them and never go into the code.
Keeping an eye on it
A daily health check confirms that every bulb answers and the voice rules still behave. Any test puts each light back the way it found it, and tests stay quiet at night.
The project computer reconnects to the home network on its own if its connection drops.
The TV
The Pi now controls the Living Room TV. Turning it on over the home network proved reliable in 10 of 10 tests. The hub can:
- turn the TV on and off
- set the volume, with a cap so it never goes too loud
- mute and unmute
- switch between the Apple TV and the Xbox, and nothing else
- open YouTube
Jay can control the TV by voice. Every TV command has to include the word “TV.” “All lights” never touches the TV.
How it’s built
The hub is Python on the Pi, using the open-source python-kasa library for the bulbs and aiowebostv for the TV. AI agents write most of the code, and Jay reviews and merges every change. A gitleaks secret-scanning hook runs before every commit and is never skipped, so passwords and keys stay out of the history.
It’s a small project, but it’s the first thing in the lab Jay uses every day.