[RELEASE] OwnTracks for Hubitat Presence Detection

Anytime! Love the challenge!

That should be what you are seeing today. This is what it would be doing:

  • Enter a region, you get that first notification. This starts the 90-second timeout
  • Leave or enter that same region, it keeps kicking that 90-second timeout.
  • After you stop enter/leaving that region, and the timer expires, then you get that last notification.
  • If you had entered a different region, then it sends the last notification and starts the process over again.

Ok, done. Waiting for iOS people to yell (maybe? :smile:). But mobileAppVersion should be reporting something like this:

  • Android v2.5.9.0
  • iOS v15.3.1

Just not 100% if the iOS parser is correct since I'm trusting the web for what it the format looked like.

1 Like

My iPhone members haven't reported an updated location since I update to the latest app version. In fact none of my members have except for me. I am reporting correctly as "Android: v2.5.9.0". My wife is reporting "Android: 2.5.6.0". Again, her phone hasn't reported back in yet, but I'm not sure if it matters since she's reporting a parsed version. My two iPhone members are showing a lot for their version. "[OwnTracks/18.5.1 CFNetwork/3826.500.131 Darwin/24.5.0]"
image
I'll monitor for the next 5-10 minutes before I sign off for the night. If they report in and anything changes, I'll edit this post.

interesting! In that case I will test it further! Thanks Lyle! :slight_smile:

1 Like

That looks like what I was expecting. As soon as they report again, it should say "iOS: 18.5.1"

2 Likes

If you turn on debug logging for a person you are monitoring (in hubitat), you will see things like:

  • "Scheduling transition update for ..." if a new transition occurred in the 90-second window
  • "Skipping duplicate transition (or presence) event ..." if a notification was queued, but was identical to what the last was
  • "Correcting presence of ..." normally transitions are now used to indicate home/away. If that was missed, or a location event came in just before the transition event, this will be displayed. It is really meant to deal with a dead phone entering/leaving home, and correcting when it powers on again.

You are correct.
image

2 Likes

Perfect!

1 Like

hey @lpakula
I was doing some debugging today and noticed that the "ping" option wasn't appearing in the advanced mobile settings.
Turns out your changes to the version display are making the app not detect that it's Android.
I believe the problem might be in this check:

if (appVersion?.toString()?.indexOf("Owntracks-Android",0) >= 0) {
    return (true)
}

But now the app is reporting mobileAppVersion Android: v2.5.6.0

Changing at the top this line fixes it:
@Field String ANDROID_USER_AGENT = "Android"

Good catch. let me check and get a fix up.

I was doing cleanup and seemed to miss that check.

1 Like

You're good, I PM'd him a pancake. :wink:

2 Likes

This is fixed on the version I just pushed. Looks like user agent field changed in the latest mobile app version, so I pruned back the check to work on the old or new apps.

I'm seeing this in my log:

2025-09-16 18:31:40.288

error

OwnTracks: status code: 500, reason phrase: Internal Server Error

Occurs couple of times on day.

Hmmm.. try rebooting you Hub. Error 500 is a catastrophic webserver failure (outside the scope of the app). Might just need a reboot to clean things up.

1 Like

Thanks. Going to try that one!

1 Like

Yep, problem solved. Thanks!

I'm not sure what happened about 12 hours ago because the "last location" hasn't been updated since then, but the latest location report works fine. I'm updating my location on owntracks, but two family members are "at home" when they're not, and one of them is completely off the map.

Is that the latest version? What about the mobile apps? Anything in the Hubitat logs for those users?

App version 2.5.4 and latest version of owntracks for hubitat too. Now that two persons arrived home somwthing happend and location was updated correctly. I'm still seeing slow behavior on owntracks app side. Location on map updates very frequently and it seems like something is working really slow at moment. If no one else does not see same issues then it has to be just me :frowning:

EDIT: All clients report "endpoint state error" or would wait connect to endpoint which would never happen. It would be really weird if this would concern only our family members. Can someone report seeing the same issue? For me this seems to be maybe bigger issue..

Location reports goes through but "last location fix" data doesn't. Not sure what that means.

Lots of error lines every time as I try to update location on owntracks. This same thing occurs with all 4 clients.
App 1438 is owntracks. Any idea what does that line 345 mean?

It's trying to update the location for that member device, but it's exceeded what was set as a limit per hour set in the device, so it tosses the error and that is why it's not updating.

If you go to each member device in Hubitat, and on the "Device Info" tab, increase the "Too many events alert threshold". I use a 1000, and once that stops erroring, your locations will update fine:
image

1 Like

Guys, have been using since about the time that Life360 stopped working. Primarily just for presence, but also use the family map. I updated my hub and Owntracks earlier today. It would appear that the map still is tracking and the Hubitat Owntracks program is showing location updates, but my Owntracks - user in Hubitat is not updating.

Any suggestions as to what I have to do to get the presence detection working again within Hubitat? Thanks.

Ed