HomeKit for all automations?

So I ran a little experiment. I spent the weekend playing around with re-creating my automations in HomeKit to see if it’s even possible and how they perform. To my surprise, after a bit of research, I was able to reproduce all my HE automations, including mode changes, advanced motion lighting rules, alarm settings, etc. I actually have custom groovy code in HE for most of the functionality as opposed to using RM and built-in apps. They all work in HomeKit as scenes/automations/shortcuts. Even if/then/else logic is supported, which was news to me.

It all works reliably and very fast in HK. As far as I’m aware, all HomeKit automations run locally If you have ATVs. I would still have to use HE as a hub for all my Zigbee/Lutron devices, integrations with Google Home, wired alarm via AD2Pi, virtual switches, modes, etc. But it looks like for automations, I could actually completely switch to HomeKit.

Anyone else doing this? What would be the upsides, downsides? I honestly don’t see any major benefits to either approach. This was just an experiment.

There are a lot of people doing the equivalent using Node-RED.

1 Like

How are you doing your if else logic? Which app?

Up until last month, I was doing this very thing leaning heavily on Homebridge plug-ins and Wink for the Z-wave stuff. Wink's pending implosion gave me an opportunity to step backwards, and clean up the HA mess that evolved over the past 5 years.

First task was to move all of my Homebridge plug-in integrations to my new HE. I then dumped the old/ancient Homebridge server, replacing it with a Docker running HOOBS (a Homebridge appliance) linked to the HE via Maker API. This made all of my HE devices/switches/contact sensors available to HomeKit.

I am using Siri and the iOS Home app as the primary user interface, for WAF and myself. Apple's setup is workable for a UI. Their presence sensing is also good, so I use that. No Alexa in our house, but we both have Apple Watches so Siri is on our wrists and just a push of the Watch crown away.

There are six automations still running on HomeKit:

One momentarily toggles a HE virtual switch when anyone arrives home, which triggers a change to "Home" mode on HE and does things like turn on the outside lights and unlocks the door.

One momentarily toggles another HE virtual switch when the last person leaves, which triggers a change to "Away" mode and does things like set the alarm system and turn off the outside lights.

The remaining four HomeKit automations are for handling a HomeKit front door lock on HE. There's a virtual switch on HE for the lock. Two automations lock/unlock the door if HE turns the virtual switch on/off. The second two automations turns that virtual HE switch on/off if someone locks/unlocks the door by code or manually, so HE knows the lock status by looking at the virtual switch.

HomeKit's automation rules can most certainly do most simple tasks, and I was happy with it for a few years before Wink's extortion email forced me to buy an HE. I also picked up three Inovelli Red switches, and they have spawned a whole slew of Button Controller and Simple Automation rules that I would have never imagined in HomeKit a month ago. For me, letting HE do the driving and using HomeKit for a voice/user interface and presence sensor makes the most sense.....

2 Likes

I was mixing automations for a while myself, more than a year ago. One particular issue I ran into was backup and recovery. You can certainly backup HomeKit with Controller Pro, but recovery isn’t as clean as HE

I also found the number of virtual switches and automations I personally needed was more than I wanted to manage. I use HomeKit to tie sensors back to HE, but adding all my automations on top of it would be daunting. I also cannot compare variable data between devices in HomeKit, and they have no concept of toggle, which forced me to handle that in RM anyway.

If HomeKit ever offers more, I may revisit the idea as I prefer the interface for building automations, but the capabilities just aren’t enough for me. But maybe I’m just approaching it in the wrong way. :man_shrugging:t3:

For anyone interested in a more robust IF-Then automation UI with conditions for HomeKit, check out the Eve app. It’s free and gives you a little more flexibility in building HomeKit automations, but the cracks in HomeKit capabilities show pretty quickly.

Actually backup would be the least of my worries. The way I understand it, all your settings are in iCloud. So even though your automations and device control runs locally, you can lose your hub (Apple TV or HomePod) and just replace it and you’re good to go. And if you have multiple ATVs like I do, you can lose one and the other one will take over.

But in the end, the HomeKit automations are just not strong enough. I played around with it a lot more, and there are many limitations. Other apps like Eve can help in some situations, but they have other limitations. For instance HomeKit doesn’t allow you to use multiple triggers (e.g. trigger on one of two sensors). Eve can do that but Eve has much more primitive conditions. HomeKit native shortcuts are better at if-then-else logic, So you end up with no single tool that can accommodate all scenarios.

Anyway, I think if Apple improves automations, it would be very enticing to switch over. But that may not happen for a while.

Thanks for the feedback everyone.

This isn't correct for Homebridge users. If your Homebridge hardware goes belly up, all your automations are gone.

1 Like

That’s true, but I was replying to the concern of backing up HomeKit. Homebridge backup/restore is nearly identical to HE.

Edit: Actually I’m confused a bit by your comment. You wouldn’t lose any automations you added via HomeKit. You would just lose access to the Homebridge devices/plugins. Unless I’m missing something.

You should try it. There's a config and persist directory on Homebridge that store devices and automations. They need to be backed up manually (maybe Hoobs has a better way to do this, don't know), but if you lose your entire Homebridge, that's not enough to restore everything. You can use Controller Pro app to backup and restore, but there's limitations to 3rd party integrations, so that doesn't work perfectly either.

Hmm honestly I never tried it since my Homebridge has never failed. But I was talking about the Config UI X backup functionality, which says it backs up and restores basically everything.

1 Like

FWIW, I've tried that, and it's not inaccurate...but my Home app still doesn't recognize it as the same "bridge" (even when the exact hardware, MAC addrees, and configuration--I backed up and restored it with this--is exactly the same and the same devices appear in HomeBridge as before, like nothing happened). Not sure if anyone else's experience is different here. I have to set everything up in Home again.

I'm afraid to do too much on HomeKit for this reason. Luckily, besides the occasional Siri/voice control, all I use it for is another presence feed, and it is easy enough to set that back up if/when needed.

2 Likes

Can HE trigger HomeKit to lock doors?
Schlage and/or August WiFi locks are installed.
My apologies if this has been asked and answered elsewhere.

Yes.

You create a Virtual Switch in Hubitat. Add that to the HomeKit Integration.

On the Apple side, tap Automations. Tap + Add Automation.
Choose "An Accessory is Controlled" - select your newly created virtual switch. Next. Turns On, next. Select your WiFi GDO, next. And so on to finish the Automation.

And repeat for Turns Off.

Two Automations. The GDO follows the virtual switch.

Use the Virtual Switch in any Hubitat Automations and the real GDO will follow.

Then create two more Automations to follow the state of the GDO into the virtual switch. When you tell Siri to open the GDO, then you want the Hubitat switch to reflect it.

So... the first two Automations are for Hubitat to HomeKit. The second two are HomeKit to Hubitat.

There are other ways, of course. One could create a Virtual Button and then you can implement a toggle: open the gdo if it's closed, close it if it's open, on each button press, mimicking that button on the wall in the garage. :slight_smile:

2 Likes

Thank you. And, thank you for this explanation.

Download the Hubitat app