[RELEASE] OwnTracks for Hubitat Presence Detection

Hi i just switch over from android Samsung to an Iphone. I read through most of the post to see why this new iphone doesn't update on a regular bases and gets the red location update needed in the app until I go out with the phone or manually send location from the phone app, is this the way it should would or is there a setting to send location more often like the Samsung cell does the phone is now set to Significant? My wife still has the samsung phone which updates through out the night even when sitting in one location. I am using the latest app versions.

My brides iPhone does this. My android is better at updating.

Not sure how to get around this lot of times my armed away doesn't switch to Home un-armed till i'm in the house for a min or so checked the settings in my iphone location precise ect all seems to be set ok. agreed my Samsung had no issues either and my wife's present Samsung works perfect.

I'm not able to help you with that. We have a zigbee keypad on the exterior that we use to disarm/arm HSM and unlock the door.

I do use location data to lock up and set the alarm if we forget, and it works well, but that's not time critical.

I do believe that I did expand my home area because I found that the iPhone would sometimes not send updates for the final 200 feet or so.

Thanks, what did you set expand your home to? do you have hers set for significant or move?

The Owntracks app devs released beta 5 today. LOTS of bug fixes in it. IIRC @lpakula, your fork had a couple extra nifty settings compared to the official release. It's been a while though. Have these changes been merged in? Or is your fork still better?

Hi been trying to sort out owntracks with my new iphone i read that the app has to be running in the background at all time to work proper is this correct?

Pretty much, yes. You will want to disable the auto archiving feature too. I don't know what Apple calls it, but if the app hasn't been "opened" in a certain amount of time, it uninstalls it. I personally don't have one of those phones, but remind my kids to open (re-download) the app after I get a Stale notification on them.

I've never been able to get my phone (Android) to be 100% reliable for GPS updates, so I use a fallback that isn't dependent on the phone's GPS, but my method is specific to the hardware I have in my network.

My failsafe is to set presence based on phones joining the WiFi. What I have set up now uses my OpenWRT router which can send logs to a syslog server, and NodeRED which can receive the logs. When the router logs that either my phone or my wife's phone has connected to the WiFi, the appropriate presence sensor is set to present. There have been 17 times in the last 30 days where one of our phones was detected on the WiFi before Owntracks or the Hubitat app geofence showed us at home.

I like this setup because it results in instant detection when the phone joins the WiFi. You could do something similar using only the hub, but it would not be quite as quick to react. Create a rule that starts pinging the phone when the user's Owntracks device switches to 'not present'. If the ping succeeds, switch the user's device to 'present'. The faster you repeat the ping, the more likely you are to catch the phone on the network before you open the door.

I also got tired of the opposite, where the GPS would momentarily jump away and turn out all the lights when one of us was still home, so I hardened the other end of the process by making a rule that pings our phone when a Owntracks or the Hubitat app show one of us departed. When either app switches to 'not present' a rule pings the phone. In normal circumstances, the first ping will fail and a virtual presence sensor gets set as 'away'. If the ping succeeds, it pings again every minute until either the ping fails or one of the apps switches to 'present'.

So the normal 'away' flow is now: GPS device departs -> ping phone -> ping fails -> user is set away -> HSM arms and lights are turned out.

The 'gps glitch away' flow should now be: GPS device departs -> ping phone -> ping succeeds -> ping phone -> ping succeeds (repeat x times) -> GPS device returns -> nothing happens with HSM or lights

Thanks im not sure if something isn't configured right, when leaving i get a notice almost as soon as i leave the radius (owntracks has left the home area ) but the automation doesn't happen for some time later say 4 min or, and same for when i return to the set radius i get a notice (owntrack is in home area) but the automation is delayed until after I've been in the house for several minutes sometimes 4 or 5 minutes lock doesnt open and mode stays in armed away. Also when checking the device owntrack-john it shows not present for the 4 minutes then changes (delayed) thinking i might delete owntracks and start fresh. Just a note wife has Samsung phone no issues I switched my Samsung to iphone and problem started my old Samsung and hers worked flawless for a long time. Is it something with iphones?

Thanks, when i was using just the android phones i had zero issues only since i switched the one phone to iphone. I'll check a few settings and see if Lpakula has any input on what might be causing these issues.

Where are you seeing that notification? On the phone? iPhone is a bit different of a beast. Android allows a periodic heartbeat "ping" that it sends out it's locations, iPhone does not.

It would be worth checking the hub logs to see if they align with what you are seeing as well.

Only thing that is actually missing is the sending over the address you are at instead of the hub looking it up. Otherwise, pretty close to the same so the public Beta is a solid one to use.

Hi the notification came up on the phone. I seem to have it working at least for the last few departs and arrivals but automation kicks in very close to the door almost as i'm ready to open the door, which option should I adjust to fire the automations sooner? I didn't set up a radius in the phone app seems when i deleted the old radius of 150m it seem to started to somewhat work. Not sure if this has anything to do with it. Pryor I would leave and automation would take a long time after the notification came up on the cell that I was leaving home and when returning I would get a phone notification that I was arriving at home well in advance but the automation didnt kick in until I was in the house for 4 to 5 minutes and when checking the owntrack device in Hubitat for my phone it would show not present then a few minutes later kicked in and showed present. I'll keep an eye on the log. Little history I did have my old Samsung phone set then I had a loaner Iphone setup and deleted the Samsung and then finally set up my new Iphone and removed the loaner iphone not sure if this might have caused some issues.

My recollection was incorrect. Every setting for both Android and iPhone are at the defaults that Lyle determined are the correct balance between accuracy and battery usage.

I tried significant and move back to significant I had a loaner Iphone which seem to work ok until I updated to the new Iphone when it came in. I tried different ones think the last is at 150m in the radius if this is what you mean.

Since there are security fixes in the new release I'd like to move to it sooner than later, unless you're planning on rolling a new version of your build soon.

Are you planning on doing an update of your build in the near future? No pressure/rush, just deciding if I want to switch to the official version of the app for a bit. :slight_smile:

It is a beta release, but I agree. At this stage in the AI world, a beta release is better than no updated release. Also no rush/pressure. Standing right behind @danabw in that switch decision line

Finnnnneeeee... I'll get off my lazy arse and do a quick build 'n' publish this evening. :rofl:

Did you enable that CMD slider on that app and have it sync the hubitat settings? If you did, you should see that "+follow" region. That forces the phone to keep the Owntracks app awake as it keeps tracking that region.