[RELEASE] OwnTracks for Hubitat Presence Detection

Thanks again. It's going to be nice having a life 360 replacement

4 Likes

Ok, should be live now! I've made a couple changes in this version:

  1. App and driver versions are now visible on the HE app and HE devices (this version is 1.6.0)
  2. Added a imperial/metric slider on the HE app. You can toggle on the fly to change the display. There will be a bit of a rounding issue since all settings get stored in metric and converted to imperial as required.
  3. Added an optional "home Wi-Fi SSID" field to the HE app to be used to prevent a "non present" transition if the phone is reporting that it is still connected to this Wi-Fi access point. I'm not 100% sure how the lat/lon works when using Wi-Fi, but on occasion I'd get a random geo location that put me at the Telco box for my neighborhood (which was outside my geo fence, and clearly a Google/Telco issue). This is meant to address those oddities.
4 Likes

Love this! Any chance of adding more than one SSID?

3 Likes

I've noticed I haven't had a Presence event (Present or Not Present) since Jan 3rd...I just updated to the most recent app/driver (1.60) and still not getting presence. Got this from the logs for the driver:

And the HE app:

Mobile app: (Your modified version)

It seems like all other types of reporting are working, and the Owntracks device shows Present in the device page but not sure if that's just left over from the last time it reported Presence on the Jan 3rd - note that below attribute "Since" says "Wed 3:13 PM" on the 3rd, two days ago. I was out of my home twice yesterday.

I went into the HE app after the update and selected the option to use hub location for Home Geofence (I had thought I had originally set that) and toggled the the two update options for myself for the mobile app at the lower half of the screen.

In the Regions section of the HE app I don't find any regions to edit or delete. I do have a Home region in the mobile app. I set the option to update regions on next update from the mobile app and then the Home region from the mobile app did appear in the Region edit section.

Have I botched something up, or ? :slight_smile:

Easy. Next version will allow a comma separated list of SSID's.

Let me check into that.

2 Likes

Ok, pushed a version that allows for a comma separated SSID list.

@danabw can you try this version as well? I found the issue where it was throwing those errors in the imperial conversion. Also, on the mobile app, can you: Click preferences -> Configuration Management -> '3-dots in the top right' -> Restart

Let me know if that doesn't address the issues you are having.

1 Like

Well, I am quite upset that I had to wait like five minutes for the fix, but as I am a generous person I will forgive. :wink:

Off to try it now. Thanks!

1 Like

I installed the new version, went into the HE app and added a second SSID and then hit "Done." Then did the restart on the phone and have also done a manual location update from the phone as well.

  • The second SSID isn't showing up...I initially had it w/a comma-space and then the second SSID and it didn't show up, not sure if it's commas w/no spaces, or commas w/space between the SSID. Even though I've done a manual update on the phone do I need to just be patient for the second SSID to appear in the Owntracks device Current States?
    image
    2024-01-05 11_19_28-Hubs, Network, & Tech

Still not getting any Presence events ... even if I'm already home my understanding (correct?) is that when I do a manual update from the phone I should get a Presence event indicating I'm home from the Owntracks device, right?

No errors in the logs for app or device since the update. Same initial error in the mobile app logs followed by all green...

Oh, what you are seeing in the driver is the SSID that the phone is currently connected to (not the list). If that matches one of the SSID's on the list you entered, then it should indicate "present". There will only be one SSID listed in the driver.

Still not getting any Presence events ... even if I'm already home my understanding (correct?) is that when I do a manual update from the phone I should get a Presence event indicating I'm home from the Owntracks device, right?

Yes you should. If you open the Hubitat app, click the gear in the top right corner, and then scroll down to application state, is it showing a "home" entry like below?

Application State

Name Type Value

home HashMap {geofence=0.15, latitude=12.345, name=Home, longitude=-123.56789}

That first error message is "normal" from my experience with the app. It sometimes doesn't have a fresh location so it throws the error.

Thanks! DOH on the SSID, I should have thought a second or two longer. Baking while I troubleshoot so my mind is scattered... :slight_smile:

Yes I do have a HashMap entry...lat and long in it are correct, it's named "Home." Cap w/actual deets left out below:
image

Hate to show my ignorance, but I have 1.5.7 installed and working. Previously on other programs I updated by using Package Manager - Update, but it does not show an update for the OwnTracks app. How do I update to the latest app without causing problems? Thanks

Did you install via HPM from the start, or did you install by copy/paste code into App and Driver code section?

If the latter, do a Match Up in HPM so it can connect your manual install to the HPM instance.

Seeing this in the logs with version 1.6.0....

app:29052024-01-05 12:33:45.932 PMerrororg.codehaus.groovy.runtime.metaclass.MissingMethodExceptionNoStack: No signature of method: java.lang.String.call() is applicable for argument types: (java.lang.Double) values: [53.125]
Possible solutions: wait(), chars(), any(), wait(long), any(groovy.lang.Closure), each(groovy.lang.Closure) (displayKmMiVal)
app:29052024-01-05 12:33:45.851 PMerrororg.codehaus.groovy.runtime.metaclass.MissingMethodExceptionNoStack: No signature of method: java.lang.String.call() is applicable for argument types: (java.lang.Double) values: [53.125]
Possible solutions: wait(), chars(), any(), wait(long), any(groovy.lang.Closure), each(groovy.lang.Closure) (displayKmMiVal)
app:29052024-01-05 12:33:18.908 PMerrororg.codehaus.groovy.runtime.metaclass.MissingMethodExceptionNoStack: No signature of method: java.lang.String.call() is applicable for argument types: (java.lang.Double) values: [53.131]
Possible solutions: wait(), chars(), any(), wait(long), any(groovy.lang.Closure), each(groovy.lang.Closure) (displayKmMiVal)
app:29052024-01-05 12:33:18.823 PMerrororg.codehaus.groovy.runtime.metaclass.MissingMethodExceptionNoStack: No signature of method: java.lang.String.call() is applicable for argument types: (java.lang.Double) values: [53.131]
Possible solutions: wait(), chars(), any(), wait(long), any(groovy.lang.Closure), each(groovy.lang.Closure)

I did a copy and past and them Matched, but it still does not show up as an update. Trying again...

If you can't get it to match up, you might have to start over w/a re-install from HPM...ah, never mind, missed that you said they matched. Should get the update, then.

You can also try a Repair.

Thanks. For some reason it found it on the second Match attempt. Apologize for being a novice. Having to replace Life360 for my presence...

3 Likes

Oh my, don't say that. I'll have to go back to all of my early posts in every forum I've ever been in and apologize as well... :wink:

How can I confirm that the program updated? If I go back into the App Code it shows as having 2X OwnTracks enable, but one of them has today's date. Is this correct?

Open the app - the version is at the top of the screen:

image

In the app code, it's on this line:

image

Looks like ill have to transition to this ......very very soon unfortunately

2 Likes