[RELEASE] OwnTracks Presence

Correct. The default minimum move that triggers OenTracks to send a location event is 100 meters.

I’ve used it under Android and iOS, and have found both accuracy and reliability to be outstanding.

2 Likes

So I am trying to set it up on my Android device and that UserID field does not seem to exist, see screenshot below. Any ideas?

Also as a side note, what monitoring mode did you guys find was the best?

It looks like @brianwilson has removed the [person] step from the setup process with the latest update. I am not sure what other advise I can give but maybe to update the Hubitat app and start from scratch. When you get everything up and running make sure that you disable battery optimization for the app on Android as well as changing location access to always.

You don't need to put anything into the identification part of the app if you are using HTTP. I am using the significant changes mode.

Okay, then where is this UserID field that I have to fill in? The Android app seems to be completely different from the iOS app btw based on the screenshots above. Even when I try to manually add a "UserID" in the configuration management, it says invalid key for that term.

Also in regards to the virtual device in HE, we are free to change Device Label as we please to whatever naming convention we already use correct?

@brianwilson I am closer with Android device. I have everything setup as your instructions and what @breindl2005 did.

I have a virtual device using your driver and it is called Home-Scott. I have a region in OwnTracks app called Home.

Here are the logs:

As you can see, I am getting some null entries. It seems to be choking on the user field, but I can't find anywhere to enter a user. I did find UserId in the Android app but it does not seem to make a difference.

Anything else to try?

Where is the UserID field in the android app?

My bad, it says Username, not UserID. I scanned over it quickly and saw that and Device Id.

For the iOS users out there what does your configuration management page look like? This is mine:

So I added everything before the latest update that changed some things but to those having issues with the username in the Android app try this. Take the name from the virtual device such as Home-Name and put it in the long url that you put into the app as the Host. You should put the name after the location in the url so it should look something like @@@@@/location/Name?access@@@@@@. Also make sure that you are using the virtual device driver called Virtual Mobile Presence for OwnTracks.

Okay, that seems to be getting somewhere, the battery data is updating but the bssid and ssid are still null, and it does not seem to be changing the presence even though the debug log says in region:

app:20182020-10-23 05:38:54.716 pm debugOwnTracks-MultiUser-Presence: Received location event
app:20182020-10-23 05:38:54.713 pm debugOwnTracks-MultiUser-Presence: DATA: [acc:13, conn:w, _type:location, ... , tid:ra, batt:51, t:u, tst:1603499933, inregions:[BH], vac:2, vel:0, ...]

Also the Refresh function part of the Virtual Device does not seem to work, this is the debug log:

dev:19852020-10-23 05:51:15.952 pm errorgroovy.lang.MissingMethodException: No signature of method: user_driver_brianwilson_hubitat_Virtual_Mobile_Presence_for_Owntracks_1313.refresh() is applicable for argument types: () values: []
Possible solutions: every(), parse(java.lang.String), every(groovy.lang.Closure), grep() (refresh)

Finally, if you adjust the Device Label in HE it breaks it, is it possible to rename the virtual devices to be in line with whatever naming convention we chose without breaking functionality?

Thanks for the tip. This worked for me!

Is your presence working as well?

So far. Shows me present. Haven't left yet to test that. Shows presence: present and switch: on. However, bssid and ssid are both null whatever they are for.

If you manually change to not present and then send a location event from the app what happens?

Hmmm. Doesn't appear to do anything. Maybe because I am still within my "home" geofence? I do get an entry in the logs though.

Yeah I am unsure exactly how that works, I would assume that a location event is triggered whenever you go inside that zone, so I would assume that manually triggering it would have the same effect as walking out of and then into the zone.

Yeah I get a log as well, and in that log it says I am in-zone, but the virtual device does not reflect this.

What I did was move from quiet, manual, significant and move a few times, also went into settings and did publish on both items a few times. But to really test, left on significant and walked outside of my boundary.

1 Like

I think you have to physically leave the geofence area. Don't think you can "trick" it by saying you are not there. I would think the event sends an update to the HE app on the entry/exit of the fence area.

You can still do this step and things will work, but if UserID is set OwnTracks (username on Android?), you don’t need /location/[user] in the URL.