Webhooks and workflows in Controller for HomeKit

Hi everyone, good morning and welcome back to Domótica Compatible. The other day, while telling you about how I found out whether someone had gone into my room when I wasn’t home, I told you about an automation I’d set up in Home Assistant to warn me if the motion sensor was running low on batteries… and I mentioned we could also do this from Controller for HomeKit, but not directly from the Home app, not even with a Shortcut. So let’s take a look at Controller for HomeKit’s ability to read the internal parameters of devices, and explain what workflows are in Controller for HomeKit, what used to just be called a flow. Let’s see what they’re all about. I’m Carlos Sahuquillo, and let’s get started.
Kicking off a new season
On top of that, today we’re kicking off a new season, since following the trend—or whatever you want to call it—of switching seasons along with the school year, today’s the day we should start too. Damn, honestly, I have no idea which season this is… season 3? Season 4? Actually there’ve been more, I started recording podcasts back in 2020… but since I’ve never been very good at numbering chapters, or episodes, or whatever they’re called, I really don’t have a clue. Anyway, a new season starts today, I’m going to call it Season 4. Let’s see if, with everything I’ve set up to host the podcast, it’ll let me add the season number, I’ll let you know. Episode 1 of Season 4, there we go.
Controller for HomeKit is underrated
I was telling you earlier that today we’re going to talk about Controller for HomeKit. Honestly, I think this software is underrated: some people say it’s expensive, some say that even if you buy the lifetime subscription they later change things and make you pay up again, others say it’s ugly… Sure, whatever you want, I’ll probably agree with all of you, but I think it’s worth every euro it costs.
To start with, keep in mind that Controller for HomeKit can work much more independently than we think. Sure, your devices are linked to Apple’s Home app, but you can keep everything else in Controller without going through Apple’s cloud. Plus, you can use Controller’s servers to do certain things, like sending yourself advanced notifications exactly the same way we do from Home Assistant. Yes, using Controller’s cloud, which might not be available and blah, blah, blah, while Home Assistant is local… That’s great and all, but there are people who want the power of Home Assistant’s notifications without having to set up a Home Assistant at home, because they don’t feel like it, because it’s yet another gadget to maintain, or because they don’t want to learn how to use it. Although it’s true that now you can hook up Claude, or OpenAI’s Codex, to your Home Assistant and ask it for things directly through chat… but well, that’s another story, we’ll talk about that another day if you fancy it, because honestly I’m really into AI right now, I’m doing a ton of stuff. If you’d like me to tell you what I’m up to, drop by the Telegram group, mention it there and we’ll open up an AI section or whatever.
When you decide to spend a couple of hours digging into Controller for HomeKit, it’s honestly surprising everything it can do. What bugs me is that it always gets me wondering why Apple doesn’t do this with the Home app. We can do incredible things, like triggering a Home Assistant automation from an event detected by Controller; for example, for a device we don’t have in Home Assistant but do have in HomeKit, so everything stays local.
Advanced notifications and webhooks to Home Assistant
Of course you can set up all the advanced notifications you want, we already talked about that a while back. Controller for HomeKit has its own notification server that you can ask for pretty much anything by combining it with Shortcuts. For example, we can ask for a notification for a door that’s been open too long, so we’d get that alert if the door has been open for more than X minutes, which was the example I gave you back when we talked about this.
If you have Home Assistant at home, you can make that call URL hit a webhook in Home Assistant. And you’ll say: why would I want to do this if I can do it in the Home app or with Controller? Go on, say it… come on, say it… haha, I love this joke, I always pull it on my kids. The thing is, you might have some device in the Home app that you can’t move over to Home Assistant, but above all it’s because Home Assistant knows things HomeKit doesn’t. Since I’ve got holiday calendars and the school calendar set up in Home Assistant, it knows perfectly well whether the kids are home that day or not; so HomeKit triggers the event and Home Assistant thinks it over and decides whether to act or not. For example, with the vacuum, which I’ve got super dialed in, it only goes out at 9:15 in the morning if it’s a school day, since there’s nobody home at that time. If there’s no school, then it checks when we are home, where we are, and so on… and it does that from Home Assistant.
But if you don’t have Home Assistant, no worries: we could, for instance, fire off the notification to a Discord channel, because honestly my kids pay way more attention to certain Discord channels than to their phone’s general notifications. And if we have the devices in Home Assistant but want to trigger the automation from Controller, we could also do that through call URL and webhooks. Or, for example, we could make it so that if one of our servers goes down, the office light turns red, I don’t know, whatever comes to mind.
What workflows are
And workflows are a kind of advanced automation that you draw directly as a sequence of steps. Instead of the typical «if X happens, do Y,» a workflow can chain together actions and delays… yes, kind of like a Shortcut, but there are things Shortcuts can’t do because they depend on the information the Home app provides them. For example, with a workflow we can read a device’s raw values using Get Accessory State or Monitor Value, so we can know, say, the lux level in the room at any given moment and decide whether to act on it. Or set a cancellable delay for the typical motion sensor and tell it to turn on a light, wait 2 minutes, and turn it off… unless there’s motion again, something we can’t do with Shortcuts no matter what. We can also set up counters that tell us things like «window’s been open for 16 minutes.»
My favorite workflow: the walk-to-school song
Honestly, it’s a really interesting feature that opens up a thousand possibilities the Home app just doesn’t offer, not even with Shortcuts. I’ve set one up with the leaving-the-house music I’ve mentioned before. When the kids have to head off to school—well, my daughter, since the others have grown up and now go to high school—when Carla has to leave the house for school, the dwarfs’ song plays: «Heigh-ho, heigh-ho, it’s off to work we go,» nanananana, you know the one… and the bedroom lights turn off. So I’ve got a workflow that dims the bedroom lights, turns off everything else except the entryway, waits for the HomePod to stop playing—which is the really cool part—and then turns off the lights. When the door closes, it also arms the alarm, as long as there’s no motion in the house; if there is, it doesn’t arm it. Pretty cool, right?
You need a Controller Hub (and why it’s worth having one)
The only catch is that you need what Controller calls a Controller Hub, which is an iPhone, an iPad, a Mac, or an Apple TV. These fancy flows can’t live on a HomePod: they have to be on a device where you can actually install Controller for HomeKit. Not a big deal, since the license is the same across all devices, but you do need to leave a device at home or have an Apple TV.
The nice thing is that having this Controller Hub is great because it also acts as a sensor history, so you can keep logging data and then view it in trend graphs. For example, you can see a graph of the living room temperature, or humidity, or watch how batteries drain, or the home’s power consumption… all in some really nice-looking graphs. The device you’ve left at home to act as the Controller Hub works like a kind of hard drive for plotting all this data. It also keeps a log, so beyond seeing the temperature, you can find out what time the bathroom light turned on and how long your teenager spent in there. That, for instance, you can’t do from the Home app. With a Shortcut you could: we could start a counter when the bathroom light turns on, or grab the system time and, when it turns off, send ourselves a notification… but from Controller it’s done in a much simpler way. It’s honestly ideal if you’ve got an old iPad lying around the house or a fairly modern Apple TV. I’d recommend at least giving it a try, because the possibilities are endless.
Anyway, folks. Remember you can find the full articles on the blog, sahuquillo.org—with an H between the A and the U. Also, come join the Telegram group, where you’ll see how to cover some need you didn’t actually have, like now maybe spending 2 hours tinkering with Controller for HomeKit to see what tune you can get out of that trombone to complicate your automations, which were working perfectly fine.
You can follow me on X as csahuqui, on Mastodon as csahuquillo@mas.to, message me on Telegram, or get in touch through the blog. A big hug to all of you, and see you in the next episode. See you later!



0 comentarios