Keep light on when manually turned on turn off after set time when IFTTT turned on


1) Give a description of the problem
I have my Blink XT2 camera set to turn on my light via a smart life switch using IFTTT.

2) What is the expected behaviour?
It is set through webCoRE to turn off the light after 1 minute. I am trying to get webCoRE to recognize if I manually turn the switch on and not to automatically turn the light off. Only turn off if it was turned on with IFTTT.

3) What is happening/not happening?
Light turns off after 1 minute. Regardless of weather I turned the switch on or it was turned on by blink IFTTT

**4) Post a Green Snapshot of the piston!

New to all of this. I’ve tried searching but haven’t found anything. Thanks in advance.


Hi Joe,

Even though webCoRE has the capability of distinguishing between programmatic and physical interactions, 98% of Device Handlers do not distinguish between the two…

This basically means, unless you have tested that specific device, the general rule-of-thumb is to program based on ANY interaction.

Here is a decent search that focuses on that, and ways around it.


I switched to ANY and the piston didn’t work at all

Switched back to programmatically and it turns off after 1 minute. But it is turning off no matter if I turn the switch on manually or it is triggered by the IFTTT command from the blink camera.
I need it to ignore the command to shut off after 1 minute if I have manually turned on the switch.

This is the piston that that is always turning off after 1 minute.

Hope this makes sense to you. Seems it’s something easy I’m just not seeing it.


IFTTT can directly trigger a piston… Why not streamline the entire process with something like this:

IF IFTTT sends command
    With Light (TCP set to Never)
    Turn on 
    Wait 1 minute
    Turn off 

This method will never turn off the light unless IFTTT sent a command a minute earlier


So I changed the piston to this

When I created the condition it gave me a url I this pic

I have been searching for a few hours and can’t figure out where this is suppose to go. Don’t see anywhere in the IFTTT app to enter it.


It’s been awhile since I used IFTTT in this manner, but if memory serves me correctly, I used the External URL found at the top of any piston.


When that URL is ran, it basically triggers that specific piston. (as if you had pressed TEST)

Because of this, I usually make sure there are no triggers in that piston.
(IE: It only runs when the URL is opened)

Once the piston is saved, I want to see this up top:

Perhaps a hard-core IFTTT user can elaborate a bit…


Thanks for your replies and trying to help me. Still no luck. Hopefully a IFTTT user sees this and can help out more. I also posted on the SmartThings forum. Is there an IFTTT forum? I’ve tried searching but didn’t see anything.
Didn’t think it would be this frustrating to setup.



There are some good IFTTT examples here
(and great discussions)

@eibyer mentions one method in this old post
…but if it still works, I might go with @hmin03’s External URL method

Technically, you don’t have to pass args… Simply making a web request should trigger the piston.


One suggestion, though it has a few more steps is to create another Blink trigger that uses a webhook to call a webCoRE piston whose only task is to set a global Boolean variable so you can have a way of checking if the light was turned on by ifttt. You can then use that variable within your original piston as a condition to turn off the light after a minute, if true, then set it back to false when the light turns off.


So I can now get the piston triggered by a web request via IFTTT. When motion is detected light turns on for 1 minute then turns off.

I tried adding another trigger to say if the light is on do nothing. That part of the piston doesn’t work. Did I program it wrong ?


I would combine the two into a single trigger… Basically:

IF IFTTT executes 'Blink motion'
    IF Side Porch's switch is off
        Do cool stuff
        Do nothing
    END IF

(Notice the 2nd IF is inside the THEN section of the top IF)


Is this what it should look like ? Still only works turning light on wait a minute then off. Not leaving it on if already on.


So you are saying if the light is on at the beginning, it turns off after 1 minute?
(this tells me the piston likely was triggered more than once. Full log analysis can confirm this)

How about if the THEN/ELSE was inverted?

IF IFTTT executes 'Blink motion'
    IF Side Porch's switch is ON  <-- Inverted this
        Do nothing                <-- Switched w/the block below
        Do cool stuff             <-- Switched w/the block above
    END IF

Also note, the WITH that contains the WAIT should have TCP set to Never

Pro Tip:

You can drag & drop those two blocks so you don’t have to retype anything.

Also for testing, you can drop the WAIT to 15 seconds so you can test quicker…


Still no luck I have attached the piston and the log to maybe help a bit.


Your logs look perfect:

5:16:49 =

  • IFTTT trigger
  • Switch 1 was off, so turned it on
  • Set wakeup schedule for 15 sec in the future

5:17:03 =

  • Switch turned off

The log looks like exactly what you are asking for…
(only the ELSE block executed commands)


After seeing you say this I have rechecked everything in my setup. It turns out there is a delay of 3-6 minutes before the switch tells SmartThings it has been turned on manually.
This is why it wasn’t working when I was testing it. I would turn on the switch and then trip the motion, the piston would run, but the switch had not told Smartthings it was on yet, so piston was given wrong information.
Going to start doing search and see if I can find out how to speed that up.

Thanks so much for all your help.