Presence sensing sporadic and unreliable; let's please get this fixed

This is great info, @jpage4500 , thank you.

It's clear to me that Hubitat lacks sufficient resources (devs) to track OS changes and make/keep this working, which feeds my initial proposal, make it work or dump it. Out of all the comments on this and other threads, I remember seeing ONE comment that this is working well for that person. I propose dumping GeoFencing from the mobile Hubitat apps and recommending Geofency or another option that actually works. At least it's an honest approach instead of ignoring the issue. How many wasted hours are spent by users on this before getting to these threads and finally giving up?

1 Like

100% agree . . . . I am new to Hubitat and I wasted many hours trying to get the app to work. Thought I was doing something wrong!

1 Like

This isn’t something they leave up to users.

But if it was, I would vote no on this proposal.

4 Likes

As OP, here's an update:
It's April 5th, my original posting is from last December, and nothing has changed, certainly this has not been fixed.

Despite my offer to help, Hubitat support is ignoring me. (Guess I've been blacklisted)

From an outsiders viewpoint, I'd guess Homekit, Hub v8, Matter, etc are absorbing resources and this just isn't a priority.
My offer to help still stands though.

I just recently bought a couple of the Samsung arrival sensors off Amazon in refurbished like new condition and this problem is now solved for me entirely! These things are amazing!


Battery life in these aren't great. Look up the aa battery hack for these. I have 3 or 4 of them.

1 Like

Agree battery life generally sucks, but if the device is kept on a keychain, a AA battery case is a pretty bulky add-on. That works best for those that have put the presence sensor in their car.

2 Likes

I haven't read this entire thread, just just jumped to the last page or two.

I honestly feel using mobile devices for presence this is just the nature of the beast. Smartthings presence sucked too.

So many different phone models, operating systems, versions, security patches, battery saving modes, etc. It's all mediocre at best.

4 Likes

That has almost always been my experience with using my iPhone as a mobile presence sensor (with Hubitat or otherwise). Even when using built-in apps like Apple Home or Shortcuts.

1 Like

I had been fighting this presence issue for years. I bought one of those SmatThings sensors a couple months ago for my Wife's keys since she never opens the Hubitat app, it never worked reliably for presence. Since I purchased this, it has worked reliably 99.9% of the time. It disappeared once in the middle of the night for a few minutes ONE time, and since then it's been bulletproof.

I guess I haven't had them long enough to run into battery issues yet. After the success with hers, I got myself one too and I love them.

I also have had less than optimal experience with our (2) iPhones for presence and geo-location functionality with both SmartThings and Hubitat. However, once I started using webCoRE presence with SmartThings and now Hubitat, presence and geo-location have worked 99.9% of the time.

FWIW, I have used a purpose-built geofencing app on Android for one year (2019-2020), and on iPhones since then. I cannot recall when it last failed. And, I'm lucky in that Apple Home + Shortcuts has been equally robust.

What I dislike about Apple Home is that I can only set a geofence around my home, while the other application I have lets me set multiple locations, as well as geofences that are concentric circles - which let me determine the direction in which I am traveling.

1 Like

.... and this is my point exactly. Making this work is possible. It's software that we humans write, is it not? And in my case, the Hubitat app correctly identifies when it's in or out of the geofence, just simply fails to send the message at the transition. I know this because I can send it manually with the "Send geo event" button, which works. Looks like a pretty fixable bug to me.

False.
I have 3 set.

During the creation on an Automation, you are able to pick a Location and create a new one by typing in an address.

I was so astonished by this when I first found out (here in this Community, years ago) that I set a geofence around my kids school. Useless because I already know when I'm at their school, but it was fun to view on a dashboard.

1 Like

Nice! Learn something new every day!

One of my jobs is as an iOS engineer, and it sometimes involves tracking location and using geofencing. There are a few things to know, if you want to understand why it doesn't always "just work".

  • Using the GPS sensor is EXPENSIVE. In energy usage. If an app tried to track GPS 100% of the time, the battery would be depleted at an outrageously fast rate.
  • Because of this, iOS and Android only allow app developers to use GPS, and run code in the background as a result, in very specific conditions. And only very limited times. And if you "misbehave", they just kill your app and you get zero processing time.
  • Okay, so why not just do that? Follow the documentation and do the allowed GPS and background processing? Well... neither Apple nor Google like to document exactly what their "rules" are. Because if they do, malicious actors will take advantage of it. So the rules are left undocumented, and only companies who are willing to make the long-term investment to discover the rules, follow them, and then update their usage as the rules silently change... only those companies will be able to track location reliably.

Based on my experience working on similar apps, it looks like Hubitat's app doesn't 100% follow the undocumented rules, and is thus not being granted enough background processing time by iOS. It works when you open up the app, because apps in the foreground are given all the processing time they want.

Honestly, I understand why Hubitat hasn't fixed this. It would be a large ongoing investment. I'd personally prefer that they prioritize other things. And I've prioritized other things by using other methods for tracking my presence.

Important: I have no knowledge of the internal business of Hubitat. Everything I've said is my guesses based on my experience, and the conclusions are only my own preferences.

Edit: Oh, one more thing. Part of why this is so expensive to engineer. It's not just an undocumented process. It's that testing is expensive. It takes a lot of time. You have to actually go driving and see if the geofences get hit. And just because it gets hit once, doesn't mean it will every time. You might find that it works fine for a couple days, but a couple days later, iOS decides that you're using too much battery and stops giving you geofence events. It is DIFFICULT to test.

15 Likes

Well said!

2 Likes

As has been discussed many times here, presence sensing is not easy! I use multiple geofence and WiFi sensors with the Combined Presence app. I would like to understand how the hub processes presence events so I can make the process more reliable.

I am presuming that the hub only generates an event when the state of the device changes? For example if the state of a phone device is "not present" and the phone comes home but it misses the geofence event. Then the next time it departs and sends the "departed" message there is still no hub event because the device state has not changed?

If so wouldn't it be better to manually set the phone state to "present" using a reliable (Wifi?) sensor. Then the hub would generate the departed event when the phone sends the geofence event?

1 Like

Presence sense and door/window Contact sense are more or less the same to the hub.

A sensing device sends a message to the hub and the hub "translates" that into an Event. Presence yields events that are "Present" or "not Present" while contact sensors yield events with "open" "closed". In other words, each device has a specific set of Event contents.

I myself use Homebridge to send a Presence plus switch into HomeKit. I have an Apple Automation track a geofence I created and set the switch accordingly. On Hubitat then, I see Presence track the iPhone.

Your idea to use multiple overlapping mechanisms to increase the certainty is commendable. I happen to use 3, including WiFi and a Zigbee fob. The fob is the least trusted because it's battery powered and can die.

Many thanks for the reply, can we dig one level deeper into the generation of an event.

Let's assume a phone device is really at home (present) but it did not send its "arrived" message, the device state will still be "not present". The phone now leaves the home and sends a "departed" message. Does the hub still generate a device event because it received a "departed" message or does it ignore it because the device state has not changed?