Integrate homekit only device into hubitat

I am already using hubitat and homekit to control most of my devices from the Apple Home interface.

I have ceiling fan that is homekit only. I would like to be able to add these homekit only devices to my hubitat groups/ scenes. Is this possible?

Not natively, but you could integrate a (virtual) Hubitat device into HomeKit and use a HomeKit automation to "sync" the two. To do this, you'd need to set up a HomeBridge server, then install one of the HomeBridge apps for Hubitat on your hub (the only two I'm aware of that are currently supported are the MakerAPI version that I'd use if you don't already have HubConnect, in which case I'd use that flavor instead). This helps you get Hubitat devices into HomeKit, not the other way around, which is why you'd need the extra step of creating a virtual device in Hubitat, then creating some HomeKit automation that will manipulate that "real" device when the HomeKit device is manipulated.

As a simple example, say you have a HomeKit-only switch. Create a virtual switch in Hubitat, expose it via HomeBridge, then create a HomeKit automation that turns on the "real" HomeKit switch when the Hubitat HomeBridge switch is turned on, another that turns it off when off, and probably another pair to "sync" things in the other direction too. If you have anything more complicated than a switch--something with more capabilities you want to control--the amount of work increases, and with many types of devices, the feasibility of doing it this way does, too. And again, you need HomeBridge set up (not too difficult if you can follow instructions, but you'll need some always-on server/computer to run it on--many people do it on a Pi, which I used to but now do on a VM on my FreeNAS server).

So...possible? Somewhat. Easy? Not necessarily. :slight_smile:

I already have homebridge running on a pi

I set up the automations and the virtual switch syncs up when I control from the real homekit device, but it is not working correctly when I control from the virtual device (the real device doesn't get the message).

You didn't create a virtual switch, you created a virtual device with a non-virtual, real August lock driver. Virtual devices get virtual drivers. With the way you have it set up, it looks like the "Virtual Lock" driver might work (if you want HomeKit to lock and unlock the virtual lock or respond to the virtual lock doing the same and doing it to the real lock). "Virtual Switch" could as well if you wanted to use the "on" and "off" states as a proxy for lock states, but I'd probably keep it as a lock because HomeKit treats those a bit more securely (e.g., need to unlock phone before unlocking).

1 Like

Switched to virtual lock and it appears to be working perfect. Wow - thank you - virtual devices make so much more sense now. I really appreciate you taking the time to help!!!

2 Likes