Idea that is puzzling me


#1

I would like to use an IFTTT WiFi Presence, however, my Pixel 2 XL (stock) sometimes will drop from the WiFi at home. Nothing I have done on my end prevents this.

I already have an IFTTT applet that tells me when my phone is disconnected and connected and another piston that evaluates those to put a virtual presence sensor present/not.

What I’d like to do is put a 5 minute wait on a piston, and if it turns out I’m still connected, cancel the piston.

What is the best way to do that?

BTW, this is a known issue with 8.1 and webCoRE presence sensor and the other SmartApp ‘Improved Presence Sensor’ don’t get around this problem.

I don’t care to get on a rant but, Google really screwed the pooch in 8.1 with WiFi and location. There are tons of requests on the Google developer forum about putting it back, but they haven’t.


#2

IF
presence is away
THEN
wait 5 minutes
do stuff

The wait and following ‘do stuff’ actions will get cancelled if presence changes back to ‘present’ before the end of the wait.


#3

On the flip side, you can test for something like this so that your “I’m back” style routines don’t run if your connection just disappeared for a brief moment.

image


#4

That would need to look at perevioisAge() as otherwise it could never be both present and not present for x at the same time.

IF
presence is present
AND
previousAge([device name : presence]) is greater than 300000
THEN
do welcome home stuff


#5

Where would you put the previousAge()? Above or below the phones presence?

Ex1;
Phone present
previousAge()

Ex2;
previousAge
Phone present

?


#6

Doesent matter… both conditions need to be met before piston fires and both conditions will also behave as triggers (will subscribe) because no ‘pure’ triggers are being used


#7

Thanks! I’ll give it a shot.

Appreciate it!


#8

Doesn’t appear that $previousAge exists. Were you thinking of another?


#9

You have to choose expression instead of ‘physical device’ and then type it in manually.