# \[HOW TO\] SmartThings Presence reporting using AutoMagic/SharpTools

**URL:** <https://community.smartthings.com/t/how-to-smartthings-presence-reporting-using-automagic-sharptools/118316>\
**Category:** Projects & Stories\
**Tags:** android, project\_presence\
**Created:** [February 8, 2018, 9:26pm UTC](https://community.smartthings.com/t/how-to-smartthings-presence-reporting-using-automagic-sharptools/118316 "2018-02-08T21:26:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Scott\_H](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/scott_h/32/71175_2.png) [@Scott\_H](https://community.smartthings.com/u/Scott_H)\
**Post date:** [February 8, 2018, 9:26pm UTC](https://community.smartthings.com/t/how-to-smartthings-presence-reporting-using-automagic-sharptools/118316/1 "2018-02-08T21:26:33Z")

</div>

**tldr;** When my WiFi connects, OR when I’m within 120m of my home, I set myself as “present”. When my WiFi is disconnected AND I’m more than 400m from home, I set myself as “not present”.

* * *

If you’re interested in Presence Reporting, you’ve probably been to the [[HOW TO] SmartThings Presence reporting using Tasker/SharpTools/AutoLocation](https://community.smartthings.com/t/how-to-smartthings-presence-reporting-using-tasker-sharptools-autolocation/70564) post. @destructure00 has a lot of great info there on the what/how/why as well as some links to other good resources. If you want more info, I’d recommend taking a look there.

I’m doing the same thing, only along with [SharpTools](http://sharptools.boshdirect.com/), I’m using Automagic instead of Tasker & AutoLocation. The cost is pretty close, [Automagic](https://play.google.com/store/apps/details?id=ch.gridvision.ppam.androidautomagic) is currently $3.90 (if you want to try it out, you can get a trial version from the Automagic website [here](http://automagic4android.com/en/evaluation)) and Tasker + AutoLocation would be $4.50. But I’ve been using Automagic for years, and I prefer it to Tasker.

I consider myself home if EITHER my WiFi connects, OR I’m within 120m of home. I consider myself departed only when my WiFi is disconnected AND I’m more than 400m from home. I don’t want my presence to bounce if my WiFi cuts out for a minute or my phone’s GPS freaks out (which happens from time to time). I don’t have this controlling access (door locks etc.) yet - when I get a connected lock (which is on my shopping list 😄), I may have to adjust a bit.

So on to the process:

* * *

**How I make it happen**

1. Create a virtual presence sensor in **SmartThings**.

2. Authorize **SharpTools** to access your devices

3. Create global variables in **Automagic**

4. Create “Arrive Me” flow in Automagic

5. Create “Depart Me” flow in Automagic

6. Create “Geofence Arrival Boundary” flow in Automagic

7. Create “Geofence Departure Boundary” flow in Automagic

8. Create “Home WiFi Connect” flow in Automagic

9. Create “Home WiFi Disconnect” flow in Automagic

10. Toggle all 6 of the flows you created to “on” with the toggle button at the top right of each

11. Profit!

* * *

I tried to make this so someone who isn’t already familiar with AutoMagic would be able to follow it and get everything set up. Hopefully I got everything, but certainly let me know if something looks off, or if you have any questions. I’m going to test this guide by using it to add the functionality on another phone, so I’ll come back and update if I find any problems there.

* * *

_Update 2/11/18: Added step for creating & using global variables, and updating labeling of locations from just “Home” to “Home120” & “Home400”_

_Update 12/18/19: Fixed reference to creating “global\_at\_home” which should have been “global\_me\_home”_

---

<div class="post-metadata">

**Author:** ![destructure00](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/destructure00/32/87397_2.png) [@destructure00](https://community.smartthings.com/u/destructure00)\
**Post date:** [February 9, 2018, 2:01am UTC](https://community.smartthings.com/t/how-to-smartthings-presence-reporting-using-automagic-sharptools/118316/2 "2018-02-09T02:01:54Z")

</div>

Nice writeup! 🕶

---

<div class="post-metadata">

**Author:** ![miasuh](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/miasuh/32/95479_2.png) [@miasuh](https://community.smartthings.com/u/miasuh)\
**Post date:** [June 18, 2019, 2:39am UTC](https://community.smartthings.com/t/how-to-smartthings-presence-reporting-using-automagic-sharptools/118316/3 "2019-06-18T02:39:59Z")

</div>

@Scott_H

Thank you for sharing this. I’ve been having some problems with it working consistently. Could you share the flows so I can implement it more easily. It would also help in figuring out what I did wrong so I can learn from my mistake. Thank you.

---

<div class="post-metadata">

**Author:** ![Scott\_H](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/scott_h/32/71175_2.png) [@Scott\_H](https://community.smartthings.com/u/Scott_H)\
**Post date:** [June 18, 2019, 1:18pm UTC](https://community.smartthings.com/t/how-to-smartthings-presence-reporting-using-automagic-sharptools/118316/4 "2019-06-18T13:18:34Z")

</div>

I can put up screen shots of the flows. Posting the flows themselves would require a good deal of work to remove any personal info. I’m not too worried about the SSIDs that are shown in the images, but the flow detail has home location, etc.

I’ve tweaked the flows a bit since posting this last year, so there are a few things in the images that aren’t described above.

On the Arrive Me flow, I added a toast notification, a call to my “Enter Known Location” flow (this just sets some phone stuff like ringer volumes, screen brightness, etc.). Then I turn on my entry light and go to the home screen on my phone (I have a shortcut there to unlock my front door).

The Depart Me is similar, I have a notification, then I a phone settings update.

I think the Geofence and WiFi flows are still as described above.

 ![Arrive%20Me](https://global.discourse-cdn.com/smartthings/original/3X/3/c/3cbc3fce1652844836b7000826ca579ded8cde0e.jpeg) ![Depart%20Me](https://global.discourse-cdn.com/smartthings/original/3X/8/f/8f51c3b9cf27f75a6d18b8f06c5875215d6dd63c.jpeg) ![Geofence%20Arrival%20Boundary](https://global.discourse-cdn.com/smartthings/original/3X/5/5/5586f753e76a0b7c85f4335296ec251659b787be.jpeg) ![Geofence%20Departure%20Boundary](https://global.discourse-cdn.com/smartthings/original/3X/a/5/a5bfc9b7b3629ba8d4c9e596919509552e728827.jpeg) ![Home%20WiFi%20Connect](https://global.discourse-cdn.com/smartthings/original/3X/6/9/69ccd4916eab57dbe8b49bc586b4405bedf99fc1.jpeg) ![Home%20WiFi%20Disconnect](https://global.discourse-cdn.com/smartthings/original/3X/f/5/f5608cfe6516b58f0a46c97f0b10ce39e888c306.jpeg)

---

<div class="post-metadata">

**Author:** ![js2719](https://avatars.discourse-cdn.com/v4/letter/j/3ab097/32.png) [@js2719](https://community.smartthings.com/u/js2719)\
**Post date:** [October 25, 2019, 3:17am UTC](https://community.smartthings.com/t/how-to-smartthings-presence-reporting-using-automagic-sharptools/118316/5 "2019-10-25T03:17:06Z")

</div>

Hi Scott. I noticed you created 2 global variances (global\_at\_home & global\_my\_presence). I see in step #4 you use the global\_my\_presence. However, on all the rest of the steps you are using a global variance of global\_me\_home, which was never created. Are the steps wrong?

---

<div class="post-metadata">

**Author:** ![Scott\_H](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/scott_h/32/71175_2.png) [@Scott\_H](https://community.smartthings.com/u/Scott_H)\
**Post date:** [December 19, 2019, 1:01am UTC](https://community.smartthings.com/t/how-to-smartthings-presence-reporting-using-automagic-sharptools/118316/6 "2019-12-19T01:01:00Z")

</div>

Good catch. I changed this at some point when I expanded it to have a separate presence variable for each of my family members. My guess is I changed the variable in that process and got it crossed up here. Fixed in the original post now.
