This may be common knowledge to many here, but I figured I would post the steps to do this fairly simple integration. As a more reliable (hopefully, still testing) presence sensor, I thought it would be beneficial to share this integration based on IFTTT and a simulated switch to act as a trigger for routines.
Connect IFTTT to SmartThings by authorizing in the IFTTT app (From the IFTTT App > Tap My Applets > Tap Services > Tap SmartThings > Tap Connect > Login and Authorize all Devices)
Next, on your computer, navigate the the IDE, be mindful of if your account is on a particular URL (easiest way to tell is if you log in and there is nothing there, you are on a different URL)
In the IDE, tap My Devices
Tap + New Device
Fill out the Device Name, Device Network ID (make up a DNI) and for Type, select Simulated Switch
If you have more than one Hub and Location, be sure to select the correct ones
From the IFTTT App, navigate to the page that shows your SmartThings integration (My Applets > Services > SmartThings) and tap the Gear icon in the top right corner
Tap Edit Connection
Select your location from the drop down menu and Checkmark the new switch you just created in SmartThings
Scroll down and tap Authorize
Tap the Back arrow twice or until you are on the screen that shows My Applets
Tap the + Symbol in the top right corner
Tap and select a This trigger and select Android Device from the list
Scroll down and tap Connects to a specific WiFi Network and enter your home network name
Tap the That action selector and scroll down to SmartThings and tap Switch On
From the drop down menu, select the simulated switch you just created in the IDE and tap the checkmark in the top right corner
Feel free to have the applet send a notification when it is activated as well as edit the text, if you choose
Tap Finish and then tap the back arrow to return to the applet screen
Next tap the + again in the top right of the screen (On the My Applets page)
Tap the This trigger selector and select Android Device
Scroll down and select Disconnects from a specific WiFi network and enter your home networks’ name again
Tap the That action selector, scroll down and select SmartThings
Select Switch Off and from the drop down menu, select your simulated switch you just created in the IDE
Tap the Checkmark in the top right and once again, feel free to either edit the title or receive a notification from the applet
You should now be able to see both the on and off switches triggered by connecting and disconnecting from your home network
Lastly, you will need to make this the trigger for any routine based on presence. You will do this in the SmartThings app on the routines page, after selecting the gear icon for the routine you want to automate and under ‘Perform _______ Automatically when…’ you would select Something Turns On or Off and select your Simulated Presence Switch (Off for Goodbye, On for I’m Back)
I hope this helps anyone who may feel at that they are unable to use location services because of poor service, and before going the Arrival Sensor route, want to try one last thing.
I do want to add the caveat that I have not thoroughly tested this, so I am not entirely confident yet in it’s reliability. The biggest downside to this setup is that there is not an adjustable presence timeout (i.e do not run if disconnected for <5 minutes) but I’m sure someone may have found a way around this.
Please offer any insights, tips or experiences using this, as it would be great to know if others are finding success with this WiFi based presence sensor.
You might also consider instead of using just a simulated switch, use a virtual presence sensor with capability.switch.
That way, you can still turn it on from IFTTT exactly the way you do in your post, but the device will also show up under “family” as a presence indicator, and you will be able to use it in Smartapps and routines that are based on “someone arrives” or “everyone leaves.” So it just gives you a few additional options.
The following is a popular virtual presence sensor with this capability:
If you get a chance, you might also take a look at the presence FAQ. The thread discusses a number of other ways to use Wi-Fi – based presence, although those tend to be more technical than the IFTTT method you detailed.
I did this in the past.
I had to define virtual presence sensors for 2g and 5g as the phones would not always pick one, it could be either.
Also the routine in IFTTT didn’t always run so the virtual device didn’t turn on or there would be quite a delay.
Really worth trying though as yours may be more reliable.
Good instructions and well worth trying.
The one downside I am already realizing is that when using a simulated switch as the trigger, the automation only allows for one or the other switch to be triggered, not both, meaning that I am unable to get it to activate ‘Goodbye!’ only when all parties are gone. ‘I’m back!’ does trigger when any of the switches are turned on, but I am not sure how to adjust the parameter for Goodbye! to require BOTH switches to be Off. Any suggestions or ideas are most welcome.
You would basically need to create another virtual switch that is tied to the switches you already made. When both of those switches turn off, the new virtual switch turns off. Then you use the new virtual switch in your goodbye routine.
You can probably use a few different smartapps to link the status of the switches in this way, I think most people these days would suggest CoRE.
As you can see, it’s easy to go down a rabbit hole of workarounds that trigger other workarounds when it comes to reliable presence sensing with mobile phones.
Sorry, I’m confused. What two switches are you referring to? Do you mean one for each person in a two-person household?
If you use the virtual presence sensor i linked to instead of just a plain simulated switch then you still turn it on and off through IFTTT, but in your routine, don’t trigger based on a switch coming on–instead, use the presence capability and trigger based on “everyone leaves.”
The main advantage of using a virtual presence sensor instead of just a simulated binary switch is that you can have smartapps or routines react to it as a presence sensor, not just a switch.
If I misunderstood and you are referring to some other issue with two switches, just let me know.
So I have done something like this with IFTTT and Automate to send a web request to webcore. It works well for connecting to the WiFi but when you disconnect from the wifi you suddenly have no internet connection unless you keep 3G on all the time so the disconnection message only gets sent when you reconnect to the internet.
Any ideas of how to overcome this without having the 3G data connection on all the time?
I would appreciate some help, please!!
I am stuck at the last point… I got IFTTT to switch on/off a virtual switch on smartthings and google home… I can see the switch properly in both apps.
Now, how can I use this device as a trigger for google home routines???