[HOW TO] SmartThings Presence reporting using Tasker/SharpTools/AutoLocation

Glad the instructions are working out. I’ve noticed most setup guides online are either incomplete, skip steps, or vague due to the assumption that the user is familiar enough with the subject that the details don’t need to be included. Frustrating when you’re new to the topic and have to fill in the blanks with little or no knowledge of the subject.

3 Likes

Went through the setup as much as I could… Appreciate the guide. Ran into an issue with SharpTools I’ll have to reach out to @joshua_lyon for.

SharpTools isn’t authorizing my things properly. I had 59, went to add my virtual presence and it dropped to 11 things. I went in, unchecked and rechecked everything and it stayed at 11.
I cleared the cache for the app and started over. It’s at 10 items now. Weird. Might try deleting the app and starting over.

Feel free to PM me or use the “Send Feedback” option in app to get an email started as that does sound very odd.

Do you have a second location authorized? And have you taken a look at which devices are showing and which are hidden? You can send the list of devices to me using the Send Things option from the drop down menu of the SharpTools Settings screen.

Thanks for looking. I sent you an email using Send Things.

Just checking in with a report. I quoted the above because your extensive instructions saved me a lot of hassle. For other reasons, I had to wipe my phone and re-install everything. I was able to back up profiles, tasks and geofences; but forgot about autolocation preferences. So I had an anomaly where losing Wi-Fi triggered Not Present. Your instructions pointed me right to the solution.

I’ve been diligently tracking the reliability (I put a bunch of logging commands in all the tasks so I could observe performance). Arrival and departure has been nothing short of perfect. It’s quick and accurate. I don’t have a good way of evaluating battery use, but I don’t see anything unusual.

As I mentioned a few posts back, I implemented the retry logic that @hellfire51 suggested. My logging shows most all changes register with SmartThings on the first try, so the retry is rarely called upon, but there have been a couple of instances where it took two tries, so I’m keeping it because there is no penalty and certainly some benefit.

For more than a year, presence has been vexing, but this is proving to be the perfect solution. Many thanks to @destructure00 @joshua_lyon @hellfire51

3 Likes

One additional thing I noticed is that if I rebooted my phone while at home, the order in which the Tasker profiles re-activated was causing location monitor to turn on. Normally when coming home, I’d cross the outer perimeter and location monitor would turn on, then when I connected to WiFi location monitor would turn off. When I reboot my phone, the WiFi profile activates first, then the outer perimeter profile activates second, causing the location monitor to turn on and stay on. I solved this issue by creating a variable called %Rebooting, then creating a new profile that sets %Rebooting = true on Device Shutdown, and adding a condition to the location monitor actions to only execute when %Rebooting = false.

1 Like

I’ve never had much luck using Device Shutdown profiles. I haven’t looked into it exhaustively, but it seems to shutdown so quickly that tasks don’t get executed before shutdown.

What do you think of this alternate method: in the Home-WiFi entry task (the one you show) put in a delay until uptime (%UPS) exceeds something like 60 or 120 seconds. When arriving this would always fall straight through since %UPS would exceed the threshold; but on boot up the location monitor turn-off would come after the outer perimeter task that turns it on. (Minor penalty of high accuracy for a minute or two, but negligible.)

Would that work?

1 Like

Sounds like it would accomplish the same thing. I haven’t had any issues with the device shutdown profile/variable though, works fine on my phone and my wife’s.

The only action I have on device shutdown is the variable set.

2 Likes

Still doing great here. One question:

Under Preferences - UI, there is an option to “Use Motion Detection” that reduces power while stationary. As I understand it, there’s no reason to check for location if the device is sitting still. Do you recommend it?

I haven’t experimented with that before so can’t really give any advice on it. Give it a try and see what happens :slight_smile:

2 Likes

I’ve been using this for about 3 weeks now. It all works great however sometimes when I get to work its still showing my simulated presence sensor as “PRESENT”. Is there something specific i should look at?

I’m not the expert, but I’d start with checking the two geofences that you have defined in Autolocation. Do they show you in or out of the inner fence? The outer fence isn’t used for actual presence, so it shouldn’t matter. Maybe check the Wi-Fi SSID’s to see if your work SSID is confusing with Home?

1 Like

Yeah they are both showing outer i will have to check that when it happen’s again but currently it’s showing them both as Outer. As far the SSID’s they are both completely different from Justins-WiFi to Belkin928x

@CAL7 has you pointed in the right direction with a good first troubleshooting step.

Some phones are over aggressive with battery management which may impact this. If @CAL7’s troubleshooting steps don’t help, you could try whitelisting some of the apps in this chain to see if that improves things.

First, I’d double-check the Autolocation advanced settings from the OP, item #4.

When you leave the inner geofence, the activation of the “Home-Location” profile should trigger the “Home” profile (assuming you used Chris’s original profile names) which sets the simulate presence sensor “not present”. Verify all the profile names match.

At this point, I’d add some notification alerts in the tasks to trace what is executing (and what’s not). E.g. in the “Home-Location” profile exit task to indicate when you left the inner geofence and in the “Home” exit task to prove the task is being triggered. If that proves to be right, you can focus on why the final task is not correctly telling SmartThings that you left. (One reason might be the timeout problem @joshua_lyon describes in post #4.)

1 Like

Notifications are a great idea. Between those, monitoring which profiles are active in Tasker, and which geofences are inside/outside you should be able to get a good idea of what’s happening.

I’ve done a few tweaks on my phone to increase reliability. I noticed that when I was near the edge of my inner geofence my presence bounced back and forth a few times and ultimately landed on the wrong one, so I’ve actually implemented a third geofence in between my inner and outer that handles departures.

Interestingly, this has all been working near flawlessly for me, but I have not been able to get my wife’s phone to be consistent. Ended up putting her back on the stock ST geofence for presence, with a huge radius for the geofence. :frowning:

1 Like

Are the phone models different?

Yes, mine is a Droid Turbo 2, hers is a HTC One M9.

[quote=“destructure00, post:36, topic:70564”]
I noticed that when I was near the edge of my inner geofence my presence bounced back and forth a few times and ultimately landed on the wrong one
[/quote] I’ve seen a couple of “bounces”, mostly when I’m walking (i.e. moving slowly), but it always ended up right so I haven’t worried about it.

1 Like

So far I made sure when i was in battery saving mode that it would not touch the GPS location, SmartThings app, AutoLocation, Tasker or SharpTools. I’ll post back in a few days to let you know the outcome so far it’s been great.

2 Likes