The Most Important Code I've Ever Shipped Is a Phone Alarm Button
I was standing in the kitchen yelling "DYLAN" up the stairs for the third time when it hit me. Somewhere in my house there is a Raspberry Pi, a touchscreen, and a Home Assistant instance with more sensors than most small businesses run in production. And I am still using my voice as the primary notification system.
That is not engineering. That is a man shouting into the void and hoping for the best.
So I fixed it. I built four buttons on the kitchen wall dashboard, one for each person in the house. Tap a name, the phone alarm screams until someone finds it. No more stair-yelling. No more "has anyone seen my phone" turning into a twenty-minute search of the couch cushions.
Here's the part that actually matters, though. I didn't write the YAML myself. I described what I wanted, AI wrote the config, and the whole thing went from idea to working button faster than it would have taken me to remember the correct Home Assistant action syntax from memory. Mushroom card. Tap action. Confirmation dialog so nobody blasts their spouse's phone by accident. Done.
This is the part of AI nobody puts in the keynote. Everyone wants to talk about agents replacing engineering teams or rewriting your entire codebase overnight. Meanwhile the actual day to day value is showing up in the backlog nobody ever prioritizes. The "find my kid's phone" backlog. The "fix the thermostat card layout" backlog. The pile of small, real annoyances that never get fixed because no sane person spends a Saturday debugging YAML indentation for a problem that yelling solved well enough for years.
That backlog is where AI earns its keep right now. Not the moonshot. The walnut.
A few examples from my own house this year: an ESP32 sensor node reading temperature and air quality over I2C, a water heater monitor built from two cheap DS18B20 probes, a camera display running on a Pi Zero that switches feeds over MQTT. None of these projects would have shipped if I had to hand-write every line of firmware and dashboard config myself. Not because I can't. Because life is short and the walnut isn't worth a weekend.
AI does not make me a better engineer. It makes the unglamorous stuff cheap enough to actually finish. That is a bigger deal than it sounds like.
The button works exactly as advertised now. Tap Thomas, confirm you really want to blast Thomas's phone, watch the kitchen counter light up like a slot machine. Tap Dylan, and somewhere upstairs an iPad starts screaming bloody murder until a small human appears holding it like evidence.
Here's how to build the same thing in your own house.
1. Add the iCloud integration. In Home Assistant, go to Settings, then Devices and Services, then Add Integration, and search for iCloud. Enter your Apple ID and password.
2. Get past the verification code that refuses to show up. This is the step that eats people's Saturday afternoons. Apple is supposed to push a 2FA code to a trusted device, and half the time it just doesn't. The fix that worked for me: flip your iPhone into Airplane Mode for about ten seconds, then turn it back off. That forces a fresh network handshake, and the code prompt finally shows up where it was supposed to the first time. No reinstall, no deleting the integration, no swearing at the .storage folder. Just airplane mode, off, on, code appears.
3. Add the script. This is the action that actually plays the alarm sound on the target device. Mine takes an iCloud account and a device name as inputs, so the same script handles every phone and iPad in the house instead of needing four copies of itself.
4. Wire up the dashboard buttons. A Mushroom template card per family member, tap action set to call the script with that person's device name, plus a confirmation dialog so a stray tap doesn't blast anyone's phone by accident.
The full dashboard YAML and script are in my Home Assistant config repo: github.com/kix1979/homeassistant.
Is this the most important code running in my house? No. The thermostat automations probably save more money. The camera system probably does more actual security work. But it is, without question, the most beloved.
Nobody claps for a well-tuned HVAC schedule. Everybody claps when you can find your kid's iPad in four seconds flat.
This blog is written by AI and concepted by a human.

Comments
Post a Comment