[RELEASE] OwnTracks for Hubitat Presence Detection

I can’t send you a screenshot right now as I am not at my computer. But if you really need to see them I can later,. But they are not there. That’s why I didn’t show in the first place.. do you see them in Webcore?

I don't have all this setup to try it myself.

webCoRE gets the attributes from the device.

To be sure things are up to date, go into webcore, settings, and add/remove devices...select a device (and turn on /off / on (or off/on/off) and then next/done your way out so the device attributes are updated to the IDE, then edit your piston again...

ie webcore gets all these from he device, if you update the device list to webcore.

That's what I was meaning. If you refresh that device, and they are displayed, then they should be consumable by other apps.

Unfortunately, I'm still seeing this in the logs and the lat and long are the same -- only difference is that in HE, the Detection radius (ft) is 410 and in the Android app, it's showing 125.

What version was the last update?

I get that one even though my Home has the identical settings in the app and mobile.
I also get this a lot even though it's working and everyone has an identical Home.

app:16332024-01-21 17:56:25.637errorOwnTracks: No 'Home' location has been defined. Create a 'Home' region to enable presence detection.

1 Like

Hi @nh.schottfam and @lpakula!

Just wanted to share a quick update on the Webcore situation. Here's what I did:

First, I opened the Webcore App in Hubitat and unchecked the two OwnTrack devices. Then, selected update, clicked next, and finally, done.

Following that, I went back and opened the Webcore App in Hubitat again, but this time, I checked the two OwnTrack devices before hitting update. Again, clicked next, then done.

After that, I jumped into Webcore and set up a test piston, adding the newly updated devices. Great news – all the shiny new Current States are now showing up! Big thanks to both of you for the assistance. Always learning something new.

Cheers,
David

1 Like

@lpakula -

Same here- it does seem like presence is still working correctly.

Hi @nh.schottfam and @lpakula!

So, as I've delved into writing pistons with the newly discovered custom attributes, I've hit a little snag. The "status" attribute seems to behave differently compared to other custom attributes, like "transition," when setting up conditions in Webcore.

When selecting "status," it prepopulates with options like "playing" or "stopped," as shown in the screenshots below:

On the other hand, when I select "transition" and others and set a comparison, I can freely input the value I want, as expected:

It almost seems like "status" is using a predefined set in Webcore. To double-check, I exposed it in an expression, and it appears to be working correctly:

Any ideas on why this might be happening? Would love to hear your insights. Thanks a bunch!

Cheers, David

webCoRE does understand attributed defined by the Hubitat capabilities documentation. You might check in the list if there is a custom variant, not sure there is.

I have found not all drivers list their enum values

@dnickel Can you both check the Regions section that "Home" is still selected? One of the updates made a change to allow you to edit the home name, which made that box unchecked.

The enums can be defined when the attribute is created. Let me check, since I don't think the variants are exposed, only the actual attibute

The app is v1.6.22

Home is still selected.

OK, that's the reason. The hub is claiming you came home when you got 410 ft from your home, the app says you are away since it's not 125ft from your home.

Can you make them the same? Either both 125 or both 410?

I thought that one was in meters the other in feet. I've got the "Display imperial units instead of metric units" slider on. Last I checked (a few weeks ago), when I change it in HE or the app, it auto-populates in the other. So, not sure I can manually change them both to be the same if it's trying to convert it.

1 Like

I am seeing only 500 errors in Owntracks (iOS) when posting location and the corresponding (DEBUG level) log in Hubitat:

app:11732024-01-22 11:01:48.516 error groovy.lang.MissingMethodException: No signature of method: java.util.ArrayList.toDouble() is applicable for argument types: () values: [] Possible solutions: toUnique(), toUnique(), toSorted() on line 1276 (method webhookEventHandler)
app:11732024-01-22 11:01:48.346 debug OwnTracks: Updating 'Location' presence for member OwnTracks - Erik
app:11732024-01-22 11:01:48.342 debug OwnTracks: OwnTracks: Delta between location events, member: Erik, Distance: 9034 m, Time: 300 s
app:11732024-01-22 11:01:48.324debugOwnTracks: Received update' from user: 'Erik', deviceID: 'REDACTED', data: [acc:5, conn:m, alt:14, _type:location, lon:-REDACTED, m:1, tid:ED, p:99.981999999999999, batt:100, bs:3, tst:1705693830, vac:3, topic:owntracks/Erik/REDACTED, cog:140, vel:122, lat:REDACTED]

I redacted some of the logs for obvious reasons. Has anyone gotten this before?

Based on the code there:
return (createConfiguration(member, ((closestWaypointDistance > closestWaypointRadius) && (closestWaypointDistance < (closestWaypointRadius + regionHighAccuracyRadius.toDouble())))))

it may be that regionHighAccuracyRadius is returning an array where it's not expected, @lpakula ?

UPDATE: solved by setting value to some settings that seemed to have been set already bu weren't (like the thing that defaults to 750m)

1 Like

I've got multiple +follow regions on an iPhone, and can't figure out how to delete the "extra" +follow regions. Long-press on the region on the phone doesn't work. Appreciate pointer to the secret sauce...

My wife's iPhone has multiple +follow regions as well.
Easiest way to deal with it (IMO) is to ONLY delete the region in the Hubitat app, and then to also delete it in the iPhone app.

On iPhone you swipe left (or is it right?) to reveal the delete option.

2 Likes

@lpakula

Talking about multiple +follow regions...

  • I only experience this on my wife's iPhone (Android is good)
  • my understanding is that +follow is at a region like lat/lon of 0,0... That is the way it appears on the Android. And it never changes. HOWEVER, on the iPhone, after I delete a +follow region, and then sync with Hubitat manually, it correctly gets the 0,0 +follow region back again. Problem is the +follow region moves by itself, ending up wherever the phone is at the time!! Confirmed this by the co-ordinates that show. Unfortunately I do not have a screenshot of that right now.

I also have this issue on the iPhone only... Somehow I think it is related to the +follow issue, but, as an ie. if the error occurs, the deletion of the +follow region doesn't fix it. Only a significant move does... This BTW only happen trying to do a MANUAL update via the upper right button. Changing to significant/manual/quiet mode to do a manual update result in the same issue.

For obvious reasons the above is bad as I cannot manually update at all to fetch Hubitat changes...

Thoughts?