[RELEASE] OwnTracks Presence

Check out this..

GeoFency has iBeacon support.

1 Like

@erktrek Thanks for the link. That appears as though Autolocation is still a GPS based geofence, which is exactly what I was trying to get away from.

@brianwilson Thanks for the response. GeoFency is for iPhone only. I have both iPhone and Android in my house. OwnTracks will work on the iPhone with beacon support, but the two androids needed a solution still.

For those that might be looking for a similar solution, I was able to find the app Beacon Locator for android. This has beacon support and supports endpoint URL commands just like OwnTracks. So far I only have it set up on my phone (android) and it seems to be working reliably so far. I had one issue where I was in the far back corner of my house and it thought I left (beacon is in the ceiling outlet in the garage at the front of the house), so I ordered a high power beacon (1000m range adjustable). Once I'm confident it is working smoothly I will update the other android phones in the house with Beacon Locator and the single iPhone in the house with OwnTracks.

1 Like

Can you describe how beacon works as opposed to whatever Owntracks is using? I've got an Android with Owntracks and it works well - the HE presence fails so much I had to stop trying it.
In my Girlfriends house, she has an iPhone - and we can't get Owntracks to work reliable - just the opposite of me. but again, HE doesn't work for her and we shut it off.

Both of us are using Presence Plus. I've tried the wifi solutions and didn't find them useful in our cases - I even tried the Alexa presence, which worked pretty well, but ocassionally would get lost... Another problem with Owntracks for Android is no ability to tie my phone into two HE units as the URL is a not editable, whereas on the iPhone you can edit the URL per region (map location)
So ATM she is voice commanding Home and Away and getting very frustrated about it!
So. I'd really like to learn more about GeoFency and/or beacons...

Geofency doesn’t have to use an iBeacon, it can also use geo from the phone - just like OwnTracks. I use Geofency on my phone and not Owntracks as we are iPhone only.

Geofency also supports iBeacons. Benefit of an iBeacon is the accuracy of the location report. If I’m in the garage and my phone can see the beacon plugged into the wall, then it marks me as present. You can’t do this with geo fencing because of how accurate it is. It’s also more tailored for internal tracking.

There is another way to skin the cat if you want accuracy/resiliency and don’t want to use a phone to do it: [RELEASE] BTLE Presence Sensor (Tile Mate)

@jshimota OwnTracks on android can only use GPS, something I was trying to get away from. A beacon is constantly broadcasting a bluetooth signal, in the case of the one I purchased, 1000 meters but with adjustable output. When my phone sees the beacon, it sends the present command to hubitat via the endpoint URL. So I'll have to play with the power output on the beacon a bit until I find the right size geofence, but I'm hoping in the end this will be much more reliable than GPS based sensing.

Asking for a little input here.
I am finding crosstalk between two devices and want to know if this is a built in feature.
I have two devices set up.
A cell phone (galaxy S9) and a tablet (galaxy A7GLE).
I have created two virtual devices S9 and A7 and they have region of A7home and S9home respectively. Both have user Dave.

The device A7gle has identification user Dave and device ID A7 and region A7home. The device galaxy S9 has identification user Dave and device id S9 and region S9home.
And it seems to be working, at least the device list current states shows changing lon and lat and bssid, battery etc.
Problem is data is not correct. Battery level is the same on both devices as is bssid and charging, even when only one device is charging.

If i change the user to A7Dave and S9Dave respectively as well as the relative identification user and host entries then it is fixed. So that would indicate that one user cannot have two devices tracking at the same time?? is that by design?

Sounds like a bug to me. I assume the last device to do something causes the info from that device to propagate to both devices?

Yes, the last one to start, but only if the user is the same. And there isn't a device superiority, either one can be subordinate.

I remember reading in another thread that someone was using a SmartThings key fob for presence. I have no idea what it is, but they seemed to like it.

So I looked at this. Battery and wifi info are sent via _location events (JSON - OwnTracks Booklet). These events do not contain the Waypoint (your location), however, it does contain which regions you are "in". When you leave/arrive the data is sent as a _transition event, which does contain your Waypoint (which is part of your device name because your device name is your User + Your Location (Waypoint)). The only way to get unique Wifi & Battery info is to have unique users. I suppose I could look at and see which regions you are "in" and update those with battery/wifi info, but when you leave that area, then they wouldn't update. Try making the user's unique and see if that fixes the issue.

I am at the beginning of the setup and already confused. I have the app on my phone, I installed the app on HE using HPM. I created 2 virtual devices, one for me and one for my wife.

I'm on step 3:

Set the Location/Region and User to correspond to the location/region in OwnTracks you'll be monitoring and person who will be running OwnTracks

I don't understand what I am supposed to put as the location or the user in the virtual device.

You need to install the OwnTracks app on iOS/Android and create a region name which you will use here. You’ll also plug in a user into the app for the callback so that the app knows which device to update as I’m assuming you will have the same region name for both users, there needs to be a way for the app to distinguish whose phone is sending the update.

Okay, so I can just enter whatever I want in those fields. I thought it was looking for some ID number from the app or something.

I'm trying to get the app on my phone setup now and it doesn't look remotely like what the guide shows.

When I go to the connection settings I see this

and if I tap Identification I get this

I set the URL from the HE app as the host, but not sure what I should do for any of the fields inside identification. There is no option to disable authentication like the guide says.

Leave all that Identification stuff empty. the only critical thing is the 'Host' above it. you really have to be sure you get your name in the right place in that Host String - which you parse from the Hubitat app.. Be really careful and read the instructions for Step 3 carefully.

Also. I strongly suggest using lowercase everywhere - I did have a problem with a Upper/Lowercase at one point, I believe on the user name but it might have been the region... I no longer recall.
Mode is HTTP. If you switch it to MQTTT you must start all over!, do not touch that!
On the Advanced page is an 'autostart' under Misc. I checked that on my phone as well so I don't have to manually update and start app after a phone reboot.

2 Likes

Okay, I seem to have it working. Few questions about the Android app.

  1. When adding a region, is it possible to do it from the map? Sure doesn't seem like it. Typing in coordinates for places you're not at is annoying.

  2. What units is "radius"?

  3. Combining questions 1 and 2. Once you've made a region, is it possible to see it on the map? I set my radius as 50, but have no idea what that looks like visually.

Not sure why you would add places your not at... unless you're just setting up a few spots where you will be in the future... regardless -
I'm usually sitting at home in my office, I pop google maps - locate the exact spot I'm adding and hand enter. I have 4 spots I toggle 'present/not present' for and I did hand add them.
Radius I believe is in meters - since location is calc'd in meters (see owntracks.org) for more info.
Once I got it working - I quit dinking with it. Like the other presence sensors, they all seem finicky at times but my success with Owntracks has been the best of them all. I even recently got the iPhone working perfectly for the GF :slight_smile:

Well, the main one I want to set up is an "out of town" detector, but without the visual aid of the map it's really hard to know where the actual geofence is.

I've been playing around with OwnTracks and I'm having issues getting it to send updates of my location.

You can see that it's 1:25pm and the last update happened at 8:56am. I can look at the OwnTracks map and clearly see that I definitely should be inside the geofence (which is why the circle on the map would be really useful) and confirmed this using Google Maps and the measure distance tool.

I'm on a Pixel 6 Pro running Android 12. In the advanced preferences, the location interval is 15 minutes.

the 200 response is a good thing... pretty sure thats the HE responding it got the message.

Only thing I can think of - well 2 things - background functioning and setting the update type.
Look here:
image

The basic 'play' button means its in 'significant changes mode'. If its the play button with the vertical lines before it like this:
image
it's in it's most active state (uses the most battery!) and sending updates whenever the device moves more than a few feet. I leave mine in 'significant changes mode'. Does that help?

2 Likes