[RELEASE] OwnTracks Presence

Mine are below. I don't actually use location too much as the rest of the family has decided they don't want it on their phones. When I have checked it off and on it has looked accurate/up to date.

"_build" : 24101,
  "autostartOnBoot" : true,
  "cleanSession" : false,
  "cmd" : true,
  "debugLog" : true,
  "deviceId" : "o1q",
  "dontReuseHttpClient" : false,
  "experimentalFeatures" : [ ],
  "fusedRegionDetection" : true,
  "ignoreInaccurateLocations" : 0,
  "ignoreStaleLocations" : 0.0,
  "locatorDisplacement" : 500,
  "locatorInterval" : 900,
  "locatorPriority" : 2,
  "mode" : 3,
  "monitoring" : 2,
  "moveModeLocatorInterval" : 10,
  "notificationEvents" : true,
  "notificationGeocoderErrors" : true,
  "notificationHigherPriority" : false,
  "notificationLocation" : true,
  "opencageApiKey" : "",
  "password" : "",
  "ping" : 30,
  "pubExtendedData" : true,
  "remoteConfiguration" : false,
  "reverseGeocodeProvider" : "Device",
1 Like

I'm running the Samsung Android 12 beta on my S21 and discovered a new twist in location services, which sounds like it may have been introduced in Android 12 as a part of privacy improvements. I don't remember this issue when I was running Android 11.

A notification appeared stating that location permissions aren't allowed after the phone reboots until you open the app. The Owntracks app also includes this info on the Advanced page of Settings:

So you have to open the app before Android will re-authorize it to continue getting location information.

This seems new...anyone else seen it before on Android 11?

@brianwilson - I'm getting an error in Hubitat Package Manager on Owntracks update to 1.1.3.2.

Just me? Any suggestions? Thanks!

Try now.

1 Like

:+1:

Thanks for the help w/this.

Sadly for me it's still not working... :frowning:

I tried and it failed, so I rebooted my hub and tried again and it failed again, unfortunately. I had some other updates that applied normally so I don't think it's a general issue w/HPM.

Try doing a repair on the app (sometimes works better for some unknown reason). If that doesn't work then I'd go to the app and do an import from:

https://raw.githubusercontent.com/bdwilson/hubitat/master/OwnTracks-Presence/owntracks-presence-app.groovy

Thanks! Good idea, I should have thought of that.

Repair ran and a message appeared for a moment (two quickly to capture) that Owntracks presence was missing so was being installed.

After the repair I had two Owntracks apps in my app list. So somewhere along the way Owntracks was connected enough for HPM to still see it, but not enough for an update to complete successfully. Interesting...

Hmmm...I think I'm going to have to re-install from the Add Built-in Apps button and then set everything up again. Correct? I only have the original Owntracks app installed at this point, not the newer one. I may just update the original app manually rather than have to re-do stuff. Lazy...

May need to go to the Apps tab and remove the application and then re-add from the new source. (I usually go into the old app source and change the name slightly so I know which one to pick when adding it back.)

See you're thinking along those lines already. Import in the old version would probalby be the easiest.

1 Like

Yup...only takes me about five hours to catch up to you. :smiley:

Updated existing app w/new code, deleted newly added version, and checked in HPM and it seems to think that Owntracks is installed. Ran a Match-up and it didn't see Owntracks as orphaned.

We'll see how it goes at the next update. :slight_smile:

@brianwilson - sorry for bothering you about what appears to have been a personal issue. :slight_smile:

1 Like

No worries.

Hi there! Love the app - thanks @brianwilson ! This has been working perfectly for me until the iOS 15 update. I'm not sure if it's the Hubitat side or the OwnTracks side of things, but Hubitat stopped receiving updates from OwnTracks. I'm narrowing it down to the update because my fiancee's is working fine and she hasn't updated yet.

I tried uninstalling/reinstalling, repairing, etc, all to no avail.

I'm using combined presence so I have some redundancy built in, but thought I'd mention this in case anyone else comes looking if they're having any trouble.

1 Like

Well, at least the OwnTracks app still works with iOS 15. I’m using it with MQTT, and it continues to work.

1 Like

Interesting. I am on 15.1 but don’t use OwnTracks. That being said, Geofency is working fine on 15.1.

1 Like

@brianwilson Successfully installed the GeoFency version of this last night and am trying to install the OwnTracks version today into an iPhone 12p running iOS 15.2 beta (OwnTracks app works fine in this environment.)

Installed via HPM, resulted in two instances of the app to install, the first gave me the OAuth error, the second opened right up. I ended up uninstalling and deleting everything and starting fresh. Second time around, single instance as expected and no OAuth error/s.

Created two Virtual Devices:
OwnTracks-Beachwalker - my location device
OwnTracks-iPhone - my user device
Both are set to OwnTracks-Beachwalker as the location, OwnTracks-iPhone as the user. This mirrors the same approach I took with the Geofency app.

I'm getting the following error in the logs:

I'm getting the following error in OwnTracks on the iPhone:
Screen Shot 2021-11-13 at 6.10.22 PM

Settings menu in OwnTracks:

Lastly, the URL test returns:
** "This is the right URL! Add it directly into the OwnTracks URL field and make sure your virtual presence device is configured with the the location/region and user (OwnTracks-iPhone) within the device preferences."*

I'm at wits end here because I'm missing something obvious and I don't know what it is.

One device per user & location. Device name can be anything but set the Owntracks region name and user (person using the geomfencing) in the device prefs.

2 Likes

@brianwilson Ok, I'm back in front of this now (puppysitting :service_dog: ) and here's what I have so far:

One Virtual device in Hubitat named BeachwalkerOT-iPhoneOT
Screen Shot 2021-11-13 at 9.39.32 PM

The link in OwnTracks for the Connection Parameters is:
https://cloud.hubitat.com/api/9049xxxxxxxxxxxxx1f5/apps/194/location/iPhoneOT?access_token=4caxxxxxxxxxxxx14e

Still giving me the same errors for OwnTracks (but following the same guidance you provided cleaned up my GeoFency like a pro.). :man_shrugging:

Actually my last post was incorrect. Device name doesn’t matter since you set it in the device prefs. I was thinking of an older version. Maybe this will help. Device is called Test Location. Region name is Home, user is Brian




@brianwilson Double-check my work here but I've stared, deleted, and reconfigured again.

Regions in OwnTracks:

Virtual Device in Hubitat:

Here's the OwnTracks configs:


Screen Shot 2021-11-13 at 10.43.45 PM

Same errors.

Is OAuth working normally because I never had to configure anything regarding it?

Installing the Owntracks user app sets up oauth. Go back into the user app and grab the test URL and see what that says. Your example looks correct other than your device ID in Owntracks isn’t random like mine.