[RELEASE] Homebridge Hubitat v2.0

Here's the solution: I deleted the recently added mode virtual switches and it started working. Yeah, weird.

Anyone know where to get Homebridge support? There doesn't appear to be a forum.

I have Homebridge with the 'Homebridge Hubitat Tonesto7' plugin setup and Automations created in the iOS Home app that function when tested but the Automations aren't triggered as expected when I depart or arrive.

Elaborate on exactly what the issue is you are having. Are you setting up the automation in Apple Homekit, or HE? Are your arrivals/departures registering?

Specifically, one Automation for arrival (turn on virtual Hubitat device) and one for departure (turn off virtual Hubitat device).

Other than local LAN communications, how Homebridge detect presence?

Is there a plug-in/integration with iCloud that I need to implement for presence to be properly detected and Automations triggered?

Are you using something other than Apple Home ("When I arrive...:") for presence? Homebridge by itself will not do anything with presence as far as I know.

If not, then I am assuming you have rules set in Apple Home to make something happen to the virtual Hubitat device. Then you should have a rule in HE that is triggered by a change in the virtual device.

You may want to test each piece separately - does the HE rule trigger if you change the virtual device manually in Homebridge? If yes, does it still work if you change it in Apple Home? This way you will be able to narrow down exactly where your problem is - whether it is in Homebridge <=> Apple Home, Homebridge <=> Hubitat, or in Apple Home itself or in your Hubitat rule.

Hope this helps

No.

Per @jwetzel1492 in this post, "if you have HomeBridge set up to integrate with Apple HomeKit, the steps for integrating HomeKit presence into Hubitat are essentially identical."

So I setup Homebridge and the iOS Home app (which is HomeKit?).

Everything is working as expected except presence/absence detection by the Home app.

I asked "how Homebridge detect presence?" I should have asked,

How does iOS Home app communicate with Homebridge once absent/departed and off the LAN? i.e. how can Home app Automations communicate with Homebridge if not on the LAN? <~ I believe this is my issue.

You have to have an Apple TV, Homepod, or iPad setup as a Home hub. That does the heavy lifting and communicates to Homebridge.

I have not used any "presence" integration between Home app and Hubitat. However, you can set up a rule in the Apple Home app to turn on/off a Hubitat virtual device (proxy for presence). You would need to create this virtual device in Hubitat and then expose it to Apple Home via Homebridge. Then you could take the appropriate action in Hubitat based on a trigger off the virtual device. This would be similar to the last 3 bullet points in the post that you linked to (I am not sure what the Virtual Presence driver is doing that could not be done natively in the Apple Home app). Homebridge is just acting as a go-between Apple Home and Hubitat.

As @Ken_Fraleigh said, you need to have either an Apple TV, iPad or HomePod set up as a "Hub". The "hub" controls all the logic and the Apple Home app is the front end. If you have already set up Homebridge and created a "home" on your iOS app and you can control (turn on/off) your Hubitat devices, then there is one of these Apple devices that is acting as your home hub. In all likelihood, what you are missing is the "Automation" (rule) in Apple Home app to have the virtual device change when you arrive/depart. See example below:

I have two Apple TVs and an iPad but have not configured them to work with Homebridge. Is there a recommended plug-in or just native integration via the Home app?

Also, does the Apple TV have to be left 'on' or can it be put to sleep?

If you go to "Settings -> Airplay and HomeKit ->" on your Apple TVs, what do you see under Home Hub? If you have scanned or manually entered the QR code from your Homebridge install and you can see your Hubitat devices in your Apple Home app, then one of your Apple TVs is automatically configured. There is no "plug-in" required to configure Homebrdige to work with Apple Home.

The Apple TVs do not have to be left on.

1 Like

Okay, both of my Apple TVs are listed under 'Home Hubs' in the iOS Home app.

Perhaps the issue was that they are normally in 'Standby' when not in use. I will configure to never sleep and see if absence is detected when I depart.

Thanks for the help.

FWIW - mine are set to Sleep after 15 minutes and I can control my devices when I am not home.

I believe you can only have one of them act as a Home Hub. This is something that just has to be enabled from within the Apple TV settings. The Home app on your iPhone should just list them as connected.

My Apple TVs are both listed under 'Home Hubs.' When they are not in Standby mode, they are listed as 'Connected.' I couldn't find an Apple TV setting to make the device a Hub or not, just which Home to join.

I still don't understand what/how HomeKit presence is determined. My wife just took my phone to run an errand so I installed the Home app on my iPad and it states 'Occupancy detected.'

I just read that as long as you are signed in to the same iCloud account on your Apple TV, it automatically sets itself up as a home hub.
You might try signing out and back in to see if that resolves your issue.

It should be the iPhone that determines presence. You can check by going to settings/ first tab/ find my

Location settings in iOS all appear to be correct.

Looks like I have no remote access. Whenever I depart (or turn off Wi-Fi), the iOS Home app displays "accessories not responding."

Is tvOS up to date? I have seen this when my iPhone is updated but my Apple TVs have not. A power cycle of all the devices helps as well. You can also try toggling HomeKit (can't remember the exact setting but its something like that) on the ATVs before the last resort of logging out and back in on iCloud.

It appears the issue was that my Apple TV was on a nested subnet double NAT'd from the Internet.

Everything except HomeKit remote access worked perfectly and no error messages were surfaced - making nearly impossible to troubleshoot.

I've tweaked the firewall rules and may move it back to the nested subnet but it appears to be working on my non-nested trusted LAN and if it ain't broke...

2 Likes

Double NAT arghhh!!!!! It works well enough to lull you into a sense of complacency before hitting you over the head, stealing your girlfriend and kicking your dog...

:rofl: