Building Custom HomeKit Devices
Have you ever caught yourself thinking, “I wish there was a HomeKit device that could do this…”? Yeah, same here. For me, it was wishing my washer-dryer could send a notification when the laundry’s done. See, it’s out in the yard—so if you’re chilling in the living room with the TV on, you’d never hear the washing machine’s faint beep of completion.
Luckily, I had a few ESP32s and sensors collecting dust in a drawer, so I thought: Why not build one myself? With a little help from AI, of course. I’ve been bouncing between Gemini 2.5 Pro, Grok, and ChatGPT, and they’ve been surprisingly great sidekicks. Sure, I could’ve sat down and studied all the libraries and frameworks properly—it might’ve taken me a couple of days tops (I’ve been around the programming and electronics block a few times). But thanks to AI, I hacked together a working prototype in just a few hours.
Now, this isn’t a tutorial—that’s coming soon once I’ve fine-tuned everything and properly tested my DIY HomeKit setup. This is more of a quick peek behind the curtain. A little show and tell.
For the build, I used an ESP32-S3 WROOM-1 (N16R8) and an MPU6050 3-axis accelerometer. Total cost? Around 7 bucks. Hooking up the sensor via I2C was simple enough. When any of the AIs got confused or hit a wall, I just tag-teamed between them until I got what I needed.
And here’s the result after just a few hours of tinkering—Apple’s Home app picked up my custom HomeKit device without a hitch. The best part? Seeing “ChrisTan Workshop” proudly listed as the manufacturer. Cracked me up. Nothing like a bit of DIY flair baked right into the Home app!
Here’s a quick rundown of how the magic works: the MPU6050 accelerometer monitors for vibrations. If it detects continuous movement for more than 20 seconds, we assume the washing machine is doing its thing and mark it as “running.” Once it stays still for over 3 minutes, we take that as a sign that the laundry’s done. These timings—and a few other parameters—are all configurable. I’m still fine-tuning them to match the quirks of my Electrolux washer dryer.
One of the trickier parts (and where all the AIs struggled a bit) was figuring out how to send a proper HomeKit notification. After some back-and-forth, we found a clever workaround: register the device as a doorbell. That way, when the laundry finishes, my HomePod mini chimes and a notification pops up like someone’s at the door. Not exactly elegant, but hey—it works! I just wish HomeKit gave us more flexibility with custom notifications, but I get it… Apple’s probably trying to prevent spammy alerts from rogue accessories.
That’s it for now. Eventually, I want to make this whole thing easily user-configurable—no coding required. But for the moment, a few parts are still hard-coded under the hood.