Page 1 of 1

Lock my computer when I leave home

Posted: Sat Dec 18, 2021 11:19 am
by RobLatour
The purpose of this post is to show that you can have Push2Run triggered by events other than a Google home voice command.

IFTTT offers several triggers when you set up an applet. While the focus of Push2Run is usually a Google Assistant voice activated trigger, it doesn't have to be.

More to the point, when creating an IFTTT applet instead of selecting 'Google Assistant' - 'Say a phrase with a text ingredient" for the 'IF This' portion of your applet, you can select something else.

In the example below, in IFTTT in the 'IF That' portion of the applet, I selected 'Android Device', followed by 'Disconnects from a specific WiFi network'. I then entered my default WiFi network name which my phone connects to when I am at home, and pressed the 'Create trigger' button.

ifttt.jpg
ifttt.jpg (98.87 KiB) Viewed 4096 times

(although, of course, I used my WiFi network name in place of 'mywifinetworkname')

Of note to use this particular feature, you also need to the IFTTT Android app running in the background on your Android phone.

After that, I set up the 'Then That' portion of the IFTTT applet as I would normally (using either Dropbox, Pushbullet, or Pushover) to trigger Push2Run. For a refresher on this, please see the Push2Run setup instructions here.

Next, I set up a regular Push2Run card to tell my computer to lock its screen, based on a "Listen for" of 'disconnected from mywifinetworkname'
(using again my WiFi network name in place of 'mywifinetworkname').

Here is an example card:
Phone_has_disconnected_Lock_Computer.jpg
Phone_has_disconnected_Lock_Computer.jpg (72.9 KiB) Viewed 4104 times
Phone_has_disconnected_lock_computer.p2r
(569 Bytes) Downloaded 313 times

Now when I leave home (with my cell phone), my computer screen locks automatically!

IFTTT offers many 'IF This' triggers, these are listed here.

Hopefully, one or more these, and Push2Run, will be of good use to you!

Please pass on the good word about Push2Run when you can!