How does Hubitat's built in presence detection work?

Hello from Scotland dear Hubitat community.

I'm just starting out on the home automation journey with my shiny new HE hub. I've been enjoying learning everything I can via a plethora of youtube videos and this community.

I've hit a roadblock (the first of many I'm sure) regarding the built in 'presence' functionality. I can't seem to find any information on how this works. I've added my iphone app as a device and on my dashboard I have then added this device with the presence template. I've confirmed in the app 'enable geofence' is on. I'm presented with this tile showing I'm present:

However, when I switch my phone to airplane mode, I expected the tile to update to 'not present' after a while but it doesn't change. Can anyone explain why?

I'd also appreciate any further information about how this built in functionality works? I presume my phone app pings a message occasionally to the hub to provide it's location and when it's outside the geofence the status of the device will change to not present automatically. Is that correct? If so how do I set the geofence? I've entered the address of my hub in the 'your location' area of the settings but I can't see option to define a radius for a geofence..

When your phone goes outside/inside of your Geo Location area that you have set then it will change the status of from Present to Not Present or Visa Versa. To set the geofence range open up the mobile app and click on geo fence area. There is a slider under the map that you can adjust the geofence range to your house.

1 Like

Like @dpdurst said, it will change to not present when the phone crosses the Geofence threadshold not just when the phone isn't on the internet or network any longer otherwise it might bounce away and back causing unexpected issues, like using the IP of the phone as a presence sensor will. If you can take a quick walk after setting the Geofence size to test it out or you could just move the red place holder on the Geofence map to see it go into away mode and move it back to see it arrive.

Thanks both for the quick and helpful responses.

@Terk: I only just noticed the red pin and it was set in America:

Yet for some reason my tile was showing 'present'. Any idea why this is? Does the hub also base presence on whether or not you're connected to the same WIFI?

I've moved the pin over to my location now so I'll take a walk this eve and see if the tile updates to not-present once I'm outside the geofence.

There are advanced options in the Geofencing screen for precise location and update on WiFi change but I believe it should have updated to away when you moved the red marker. I would go to the mobile device and try sending push notification to make sure that part is working. When I first setup my wife's phone I had to log out and back in a few times to get both the presence and push notifications working, of course that was over a year ago now so a lot has changed since then.

Thanks @Terk, how do I send a push notification?

In the app, within the 'debug information' section, there's a subsection for 'geofence'. I can see in there that when I move the pin so that I'm out the geofence it updates to 'currently out of geofence' and conversly when I move the pin back on top of my location it updates to 'currently inside geofence'. So I assume this means that within the app at least it correctly updating my presence. I've tried logging out and back in but so far no luck.

In the 'Events' section within 'Debug Information' there are some 'ERR':

  1. SCL-FAIL:HTTP Error retur..
  2. HTTP ERR: 202
  3. SCL-FAIL:HTTP Error r...
    Any idea what this means?

You do have internet access on your phone while trying this right? I don't know what the errors are but it looks like it can't update your presence. The app showing in or out should send that state to the Hubitat cloud which should update it on your hub, presence and push notifications are one of the few things built-in to their app and hub that require internet access on both the hub side and the phone for them to work.

To test push notifications go into your hub then devices and find your phone's mobile device and put in a message and hit Device Notification:

Yes I have internet access on my phone. I tested this while on my walk by opening up my 'all devices' cloud dashboard and turning a couple of socket switches on, (which I turned off before I left). When I got home I confirmed they were on - and I don't have any automations running yet, so it worked via the dashboard.

I tried sending a couple of device notifications. They're showing up in the events section, (see below) but nothing reached my phone. I double checked and all notifications are turned on for the hubitat (iphone) app on my phone. Any idea what the issue is?

Update - it works!

Why now? Because I resorted to the age old remedy for IT issues; "turn it off and then on again"... Or in this case unistall the app and reinstall it. Same phone, same hub settings, same everything but suddenly it's working. I really appreciate all the assitance @Terk - thanks for hanging in there.

2 Likes