[RELEASE] OwnTracks for Hubitat Presence Detection

@jbwrd3 Ask all questions about the new OwnTracks integration here rather than in the original OwnTracks topic...

The Host line is a straight copy and paste from the App in Hubitat in this integration, do not add the user name...that was one of the improvements that @lpakula has added.

You can start with the first post of this topic for answers to questions you will have regarding setup. :slightly_smiling_face:

1 Like

As previously stated i have OwnTracks setup and is on my dashboard-Android

I am not home however i have an app GPS Emulator do change my location my presence detection. This has been a proven tool for Hubitat native presence and Life 360 app presence testing and checking

I changed my location
Hubitat presence and Lifeb360 detected the change
Owntracks i saw the change. Howver on my dashboard the presence didnt change. Is something not configured right ?

When looking at OwnTracks history log it says 3.8 miles away
However the looking at the owntracks app it states i am Home at the location.

That could be the reason why it's not stating Present. Any reason for this?

Firstly thanks a lot for all the hard and perfect work. Since L360 isn't working for me since yesterday I had to move on very fast. So I started setting up OwnTracks for Hubitat yesterday night and did a first test this morning.

So far it looks promising. No error logs and the presence status changes. I love it.

Two questions came up.
When I set up the HE app I set up a second "home" Regions in addition to the HE based "Home" location. Later on I deleted the "home" region in the Region section again. Unfortunately the child app still shows home,Home (see below). How can I get rid of the second ("home") location which doesn't exist anymore.
image

Second question related to the settings in the HE app:
When I set up the HE app I selected the family members in the Mobile App Configuration. did all the other settings and hit done.
Opening the HE app again shows the picture below. The family member are not set anymore, at least not visible in the app. Is this suppose to work this way?

I notice same behavior in the "Regions Configuration"


image

and also the display configuration
image

All the individual settings in the lower part of the settings seem not to be stored.

Is this normal or is here something wrong with my installation?

As I said, a first very quick test looked very promising, but I had no time to check if all the settings are working like expected.

Would be nice to get some answers from you guys with more experience on this nice app.

Thanks for all the nice and really good work

You will need the port and a /pub path appended to the recorder URL (I'll add a note to this screen in the next version). Like this: http://192.168.168.168:8083/pub Assuming the recorder is at 192.168.168.168 and was left at the default port of 8083.

That should address the error you are seeing.

1 Like

Looks like the iOS app is sending the proper header back, but nothing in the body when you open the app. Can you check if you are running the latest 1.6.1 version of the OwnTracks HE app? If you do a manual location from the iOS app, does it still do that error?

After you spoofed your location, did you do a trigger a location update from the OwnTracks app on the phone? If the distance/time has been sufficient, it should auto send one, but you might be that window where you'd need to manually force a location pin for it to call back to Hubitat. (insert the 'not always sure what the crazy minds at google do with locations' here. :slight_smile: )

If you are using Android, and the APK I posted in the first thread, it should delete from the phone once the phone sends a location home. If you are not, and it's stuck in the phone, you can open the OwnTracks app on the phone, select "Regions" and then find the location you want to delete. Long press on it, and select "Delete".

This is "per design". I'll change the text as I can see how that can be confusing. Normally when a user sends in it's location, the HE app will only send back the locations of "your friends". If those sliders are set, or a user is selected from the list, then it forces that user get a full update of the settings. When you make changes to the location, display or regions, all the users get flagged for this to happen automatically on their next location update.

Those were meant to force a user's phone to mirror the HE settings (IE should they have manually changed them on the phone side)

I'll clean up the text sliders since that architecture did evolve since my initial crazy thoughts, and they are a bit redundant now.

Oh, found an issue with the addition of the imperial/metric which is probably causing users in "imperial" to not properly get present/not present. Will have a fixed version soon...

1 Like

Perfect seems to be working no problem. Thank you for your time and hard work on this.

Oops - as much as I would love to take credit for this integration (and include it in my will for my descendents) it is @lpakula who thought up and created it. :slight_smile:

So I will regretfully pass your thanks on to him. :wink:

Don't think we can't I see what's going on here...metric gets the good stuff, imperial gets the leftovers. I'm going to go measure an acre in inches and then convert the measurement to (dry) ounces just to make myself feel better. :wink:

2 Likes

@lpakula - regarding this part of jb1's question, I'm still a little confused...

Towards this question...in my Owntracks HE app I only have one family member, and I am present in all the drop-downs in the app, For example:
2024-01-06 08_54_37-Hubs, Network, & Tech
2024-01-06 08_54_45-Hubs, Network, & Tech

Family members should persist in the drop HE app downs once they've been added, right?

No, the idea is if you needed to force a sync to the user, then you'd select them from the list. The app spools them to get the settings in the background, and then it clears the list so that you don't perpetually spam those users each time you open the HE app.

Once you push the settings to the user's phone, they no longer need to be selected in the list. It's just the text explaining the box is less than clear. :slight_smile:

If I do a manual update I get the same behavior. I checked the version and its at 1.5.7, for some reason HPM didnt show an update available. I will manual update and see what happens.

Sorry - I didn't mean they would always be selected in the lists, just that the family members would persistently appear in the drop-downs, and could be selected if desired to make some change to their settings.

If they aren't persistently available for selection in the dropdowns, there would not be a way to update them after the initial setup. From what Jb1 was saying none of his family members were appearing in the dropdown lists, in which case he can't choose them in the app to make changes to their settings, re-sync stuff, etc.

Does that make sense? (My wife says no, I'm still a confusing mess, but she always says that.) :slight_smile:

Ahhh ok, I think I see what is being said.

If the users are selected in the top "Select Family Members" list, then they should persist if their child device was created. On the very first time, you might need to select them, and then have the phone push in a location. On that very first user registration, the HE app automatically flags the user as needing a full setting update regardless. Only catch22 is if "remote commands" (Android) or "cmd" (iOS) is turned off, then the phone rejects the settings.

In that case, you'd have to turn on the respective sliders, pick the user in HE app for the region/setting/display update and push another location from the phone.

1 Like

@lpakula, I updated to 1.6.1 but I still see the same connection HTTP 500 error in the owntracks app.

Here are the HE logs

app:11982024-01-06 11:23:39.874 AMerrorjava.lang.NullPointerException: Cannot execute null+750.0 on line 779 (method webhookEventHandler)
app:11982024-01-06 11:23:39.857 AMinfoOwnTracks: Updating waypoints for user jason
dev:11952024-01-06 11:23:39.663 AMwarnOwnTracks - jason: Location permisions currently set to 'null'. Please change to 'Allow all the time' and 'Use precise location'
app:11982024-01-06 11:23:39.536 AMdebugOwnTracks: Updating 'Manual' presence for member OwnTracks - jason
app:11982024-01-06 11:23:39.534 AMdebugOwnTracks: OwnTracks: Delta between location events, member: jason, Distance: 3 ft, Time: 75 s
app:11982024-01-06 11:23:39.530 AMdebugOwnTracks: Received update' from user: 'jason', deviceID: 'ot', data: [acc:5, conn:w, alt:326, _type:location, lon:-88.235889, m:0, tid:OT, p:98.213999999999999, batt:44, bs:1, BSSID:d2:21:f9:12:2c:7a, t:u, tst:1704337579, vac:3, topic:owntracks/jason/ot, vel:0, SSID:UDMP, lat:43.330739999999999]
1 Like

I have a fixed the nag warning in the driver log about presence coming in the next version. For the error, 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 with a lat, lon and geofence?

Application State

Name Type Value

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

I suspect that it's undefined, and I need to better handle that.

@lpakula
Hello / hi....still currently out of town. Will return tomorrow
I updated my location (i believe) on owntracks still no joy on presence. While spoofing location see below. Any suggestions?





Considerable amount of time has passed still no updated change on OwnTracks presence

Is this something where spoofing the location wouldn't work?
It still reads 3.8 miles from home location.

So I started over again, and removed the HE app and went through the setup again. This time I didnt really change anything from the defaults yet. So right now the app shows connected and idle. However I do get a warning from the child device.

2024-01-06 11:49:15.026 AMwarnOwnTracks - jason: Location permisions currently set to 'null'. Please change to 'Allow all the time' and 'Use precise location'

I double checked the app settings on my phone and they are set to always allow and to use precesion. So it doesnt seem to be properly reading this.