Native Homekit integration & HSM?

So with the latest release there's HomeKit integration. I want to be able to ditch homebridge and free up say a raspberry pi or a docker container. Seems like I should be able to do this now correct? Will HSM show up in HomeKit? I guess is my question. I use it with homebridge integration and Apples location/geofence it's pretty bullet proof. Not really wanting to experiment myself with the holidays going on. Not worth breaking things or having to redo them just to find out.

I’ve wondered the same thing. Apple’s presence is rock solid. Anyone know if HE’s new HomeKit integration will allow synching of Presence?

1 Like

Add me to that list. A few months ago, I tried using my wife's iPhone with Apple Shortcuts to send an HTTP Request to HE's Maker API to change a virtual presence sensor on HE that represented my wife. It worked but, unfortunately, the shortcut would ask for confirmation to proceed with the action EVERY TIME. Based on Googling, that is not something that can be changed. I wonder if adding Apple Home to wife's phone and changing the virtual device would work without user input.

If you create the shortcut in the Home app rather than the Shortcuts app, you don’t get the confirmation dialog. Been using this for over a year and it’s rock solid. I believe there is a “convert to shortcut” or something along those lines in the Home app when you create the automation.

This is super easy, just create a virtual presence Sensor for each person, expose it to HomeKit as a switch and use Home app automations to turn it on/off:

1 Like

That's what I was hoping! Great news!

I am not sure how the community integration worked but I don't seem to get the option to share a Presence sensor using the new built-in integration. Presence is not one of the categories and I don't see the Virtual Presence device that I had for my wife in any other category. I could setup a virtual switch to change the virtual presence and then share the virtual presence to Homekit.

@stephen_nutt, I do the same as @dJOS. It’s the only rock solid reliable presence method I’ve ever found. Works great.

I still wonder, though, if Apple’s presence can be integrated with HE directly via this new HomeKit Integration, then I could move the automation logic to RM and have it all in one place.

2 Likes

I seem to remember somebody created a device driver that was a switch AND presence sensor. Using that would probably allow it to be exposed to Homekit in new integration. I think the person used it for Alexa but I can't find it.

EDIT: This one isn't the one I remember; it's a lot more in-depth. I tried it and device still isn't available to use in Homekit integration.

You set your presence in homekit and have a rule in home kit that turns on or off a virtual switch exposed from hubitat. When hubitat sees that virtual switch on/off it HE does it's thing that you set

@ogiewon created a virtual presence with switch driver

I was hoping to skip a step and use a virtual device that was both a switch and a presence sensor so that I didn't have to have both a virtual switch; a virtual presence; and create a Rule, but that doesn't seem to work.

I use the Virtual Presence Plus driver by @Cobra. Works great.

1 Like

Is there such a thing as a vitual lock and switch driver? How would that even work bi-directionally which is different than presence?

This might help

metadata {
definition (name: "Virtual contact with Switch and lock", namespace: "cwilson08", author: "cwwilson08 and modified by rlithgow1") {
capability "Sensor"
capability "Contact Sensor"
capability "Switch"
capability "lock"
}
}

def on() {
sendEvent(name: "contact", value: "closed")
sendEvent(name: "switch", value: "on")
sendEvent(name: "lock", value: "lock")
}

def off() {
sendEvent(name: "contact", value: "open")
sendEvent(name: "switch", value: "off")
sendEvent(name: "lock", value: "unlock")
}

def installed() {
}

I might suggest a small change to your driver to closer match the Lock capability:

lock - ENUM ["locked", "unlocked with timeout", "unlocked", "unknown"]

If you change your sendEvent’s to send “locked” or “unlocked” it will be more inline with what the dashboard, RM, and other apps will be expecting.

2 Likes

Thanks but i was reading that the integration is not bi-directional so when you manually unlock the state in hubitat would not update? Or is there a way around this? Want to make sure it works before i dump a couple of hundred bucks on it. Also how would i add the device to homekit without an iphone or ipad? Just a mini?

HSM does NOT show up. Wondering myself if it ever will. Sticking with Homebridge just for that!

1 Like

The state will update the virtual switch that both hubitat and home kit reads. To trip on HomeKit you have it watch the virtual switch on hubitat for the change. When home kit sees that change it runs its own rule (such as if switch off, lock lock). This status is updated in the virtual switch. It's much the same in reverse. If device attached to HomeKit does X turn on virtual switch on hubitat. Hubitat sees that virtual came on and does a rule on itself.

And that's why you're a programmer and I'm not lol

2 Likes