Problem triggering.

I'm currently playing with the following variables:

  1. x_at_home (where x is household member name)- a separate variable for each household member being home or not, based on a webhook that is triggered from ifttt on conecting or disconecting from the home wifi network.
  2. x_charge- triggered from ifttt on phone being plugged in or unplugged per resident.
  3. x_asleep_at_home - combines a household member being at home and their phone being plugged in after dark (which almost certainly means they are in bed). Cleared by them unplugging the phone within a time window of when they might get up. At some point I'm going to make the bedroom lights LED and want this variable so that if one of us arrives home after the other one is asleep the bedroom lights come on dim and blue to not disturb their sleep.

Last night our living room lamp came on at 2 in the morning.

What I think happened is my phone for whatever reason disconected from the wifi, briefly setting the variable will_at_home to 0. It then reconnected to the wifi, restoring it to 1.

the change from 0 to 1 is the trigger for one of my sequences that if I get home when its dark the living room lamp turns on.

so my question is: how are people suppressing problem triggers like this?

  • my first thought was I could use something related to my partner being home to mean that the wifi would have to glitch on both phones simultaniously to cause the problem. But thats not going to work for various scenarios.
  • I dont want to suppress the sequence by blacking it out for set times in the middle of the night, once I'm back at work I could conceivably get home from work at any point during the night. I could use the will_charge variable to suppress the sequence somehow, which would prevent it triggering when I'm in bed, but I can see causing more problems than it solves if I arrive home with my phone charging, connect to the wifi but don't trigger because I've not yet unplugged.
  • I presume there is a way to set the trigger of me arriving home to only trigger if I have been away for a certain amount of time?
  • Should I just give up on wifi as an at home indicator and go to geofencing? I didnt do this initially because we're currently in a rented home, hoping to buy in the not to distant future once pandemic is over and I can go back to work, and my thinking was the home network will be moving with us and it'd save me reprograming things on phones. Would this be more stable or is it likely to glitch as often?
  • any tricks I've missed for how other people deal with device glitches causing trigger states?
Asked by Will on August 20 at 5:37pm

Hi Will. I use geofencing myself, but also encountered this problem because my area was set too small. Sometimes during the night my location would bounce outside that area and the lights would come on. I ended up increasing the size of the area which helped.

That being said, location tracking with IFTTT can be temperamental as well, so may not completely solve your problem.

You could try to prevent it retriggering if you leave and arrive home too quickly. To do this I think the following steps would work:

  • Trigger: When x_at_home changes to 0
  • Change variable x_at_home_recent = 1
  • Pause 5 minutes
  • If x_at_home_recent = 1
    • Run whatever steps should run when this person leaves home
    • Change variable x_at_home_recent = 0
  • Else
    • Change variable x_at_home_recent = 0
  • End if

You would also need a sequence to do the following:

  • Trigger: When x_at_home changes to 1
  • Change variable x_at_home_recent = 0

Combined, these two sequences should do it. When you disconnect from wifi the 'leave home' sequence will trigger but wait for 5 minutes. If you reconnect before 5 minutes are up, x_at_home_recent will be reset to 0 causing the first sequence to stop after the 5 minute pause. If you have not reconnected, x_at_home_recent will still be 1 and the sequence will continue after the pause.

Thanks Derek,

I think that explanation is backwards for my problem- it'd be useful for routines running after I leave to avoid things like accidentally arming a security system while still in the house, but my problem is the reconnecting triggering arriving home routines. 

I think what I actually need to do is more along the lines of:

-Leaving Wifi currently makes x_at_home=0

-set x_at_home falling as a trigger

-wait some time

-if x_at_home still = 0

-change x_really_not_home to 1


add a new sequence that sets really_not_home to 0 when x_at_home rises to 1 (probably with a 1 minute delay)

Then trigger my sequences for arriving home off a rise in x_at_home, when dark but only if really_not_home=1

does that make sense?

That has just given me the idea that if I really want to over-complicate this I could replace my x_really_not_home with x_time_away, have the sequence repeatedly wait periods and add 1 and set clauses to trigger different actions depending on how long I've been away- such as if I've been out over an hour put the kettle on for a cup of tea.... I'll work on the trigger suppression first



Hi Will, yes what you've summarised there would work but I think you can do away with x_really_not_home and at that point just start triggering the various steps that should run when someone is gone.

And since you will probably want to set this up for multiple people, you can have a sequence to run those steps which has the other sequence trigger and then call that using the call sequence step.  This will save you having to create the same set of steps over and over again.

Thanks Derek.
I think I've got it doing what I want it to do now.
I've settled on calling the variable x_away_timer which for now suppresses the glitch if it lasts under 5 minutes (I figure anything longer than that is likely the whole home wifi shitting itself so none of my devices will be receiving instructions until i get up and reboot it anyway... unless theres a power cut but thats rare enough I'm not going to factor that in)

Just took a look at the sequence and I'm a little confused...but if it's doing what you need that's the main thing!

I use alexa for geofencing it is much more reliable than ifttt for me. I tried to use wifi as my trigger but I had the problem that each time i received a text my wifi would disconnect and reconnect. Could just be my phone. Pixel3 both mine and my wife's phone had this problem but they are the same model phones.

Thats interesting- me and my partner both have pixel 3a and have never had that problem.
Either way I've now got it so that if I disconnect and reconnect within 5 minutes, whether that be a wifi glitch or going out of range doing something like putting the bins out or moving the car to a different space it dosnt treat it as a new arrival at home. 

Post a reply

The SEQUEmatic bot is still new and learning. If you don't get the answer you need, just ask to speak with Derek and your chat will be transferred.