Timers on Motion and ST Automatons Broken?!

Currently using WebCore but trying to use Automations to trigger faster and use the native solution.

I set up my simple automations in my office:

If Motion detected by ST Motion device
Then Turn on LIFX Bulb 1 and LIFX Bulb 2.
Turn off after 10 minutes.

Working at my desk, my lights go off after 10 minutes.

From what I can tell, if I have constant motion for 10 minutes, the built in ST Automation engine doesn’t keep resetting the timer if I have that motion. It has to stop detecting motion and then re-detect for the timer to continue.

Webcore - AFAIK, with constant motion, the pistons keep resetting and my 10 minute timer doesn’t count down.

Why can’t the ST Automation engine do this?

Anyone else seeing this?
How can we escalate to fix this?
I would like as much native capability as possible?
Also I would like to fade in and fade out my bulbs vs just banging them on and off.

Thanks in advance!

It’s a simple timer when added to an action in the automation creator. You can create a separate automation with a no motion for X time conditions. You can also set it up the the Smart Lighting Smart app this way.

Thank you @Automated_House.

I appreciate the quick reply.

I am not sure I understand your response. I have a few months under my belt with this stuff and also with webcore but I am nowhere near even setting up complex automations. See example:


With webcore, I can expect for the light to stay on once it’s triggered, even if motion is constantly detected with me in my office. Once I leave my office, and it goes past 10 minutes the lights go out. Or I may just step out for a minute to come back in but the lights stay on.

With the Automation Engine built into the app, it doesn’t seem to do that. I’ll come into a dark office and then the lights turn on but If I keep moving then the lights turn off after 10 minutes. The engine doesn’t reset the timer if motion is constantly detected.

I quickly tested this by setting the timer to 10 seconds and waving my had in front of the motion sensor. Light turned off.

It seems like the Smart Lighting SmartApp has some latency and turns on lights in series (like webcore). The Automation engine seems to do much better with less latency and turns on all the lights faster and seemingly, all at once. Wife really appreciates that! :slight_smile:

I get that it’s a simple timer. That being said, I am hoping that Samsung changes the default behavior to “if motion is detected then constantly reset timer” and then “when motion isn’t detected, start timer”.

As a community, we need a better base / native solution then what we are getting IMHO. I made a bet on SmartThings, now I find that I have to use solutions that either are easy to use but less complex or complex to use but latency and execution is poor.

Not ranting, just could use some help I suppose.

Now, if I could find a way of using webcore to turn on all LIFX lights at once versus in series and slowly…


The automation creator in the app is working as designed (for better or worse). If you create a second automation, for turning off, that matches my screen shot then it will work as you want without webCoRE.

I think I see what you are saying @Automated_House.

Automation 1 - Turn on Office Lights
If Motion then Turn on Lights (no timer)

Automation 2
If No Motion after 10 minutes, then Turn off Light

UGH. So many steps! Why does it have to be so complicated for something so simple. LOL!

I just need them to append the way motion is detected / triggered.

You got it!

And now to further confuse you…go to the upper left menu > smart apps > + > Smart Lighting. You can set the whole thing up with one automation in Smart Lighting.

1 Like

With respect, I think you just need to adjust a tiny bit of your thinking about automations/pistons. You have to consider when they run, and what they do when they run.

Your webCoRE piston will fire whenever the motion sensor changes state in either direction. Each time that happens it will run from the top and see what it needs to do.

It has been told that if the piston was executed because the motion sensor has just changed from ‘inactive’ to ‘active’, it should turn the light on.

It has also been told that if the piston was executed for any other reason, it should ‘wait’ for 10 minutes and then turn the light off. Those reasons would include the motion sensor changing from ‘active’ to ‘inactive’, or the piston being run from the test button, run from its external URL, or being executed by another piston.

webCoRE also has a common sense feature called the ‘Task Cancellation Policy’. To cut a long story short, for your piston this means that if the motion sensor changes to ‘inactive’ and back to ‘active’ again, it figures it won’t be needing to turn the light off after ten minutes any more. Effectively the timer is cancelled.

There isn’t any constant resetting of a timer while motion is ‘active’ because nothing happens until the motion state changes, and because there isn’t a timer running.

Now I don’t know exactly how the automations work. However they still need an event to make them look to see if they need to do anything. So in your case the automation will execute when the motion sensor changes state. It may actually only execute when the motion sensor changes state to ‘active’.

Your automation will execute because it knows something has happened that might require a response. If the motion is ‘active’ it will look to see what you want it to do, and what you want it to do is turn the light on and they turn it off ten minutes later. So that is what it does.

If the motion cycles via ‘inactive’ and back to ‘active’ it appears that the timer gets reset (this might have more to do with SmartThings only allowing one active wake-up timer than the application of common sense, but I’ll be generous and assume the latter too).

I can appreciate the thinking about resetting the timer, but what about the use cases where you wouldn’t want the timer to be reset?

I don’t see anything as broken. Yes I believe that the Automations could be a bit more sophisticated (an ‘else’ statement would be useful), and I think the event driven nature of things could be made clearer. I also think they need to make Smart Lighting more prominent in the system and explain why it is still so useful.

I am also aware that what seems trivial from our end may appear somewhat differently from the Samsung end. Moving from an ‘if … then’ to an ‘if … then … else …’ means an automation has to respond to more events (a simple motion sensor based automation will need to response to both ‘active’ and ‘inactive’ events, for example) and that requires increased infrastructure. Perhaps it makes more sense to have some users writing two automations when one would seem to be easier.

Also, having seen your other thread, it probably ought to be pointed out that by default SmartThings only propagates attribute events if the state has changed. So if your motion sensor does send reports to the hub when motion is continuous (quite possible), and the device handler generates events from those reports regardless of whether there is a state change (it probably will), the device handler also needs to flag them all as being state changes to override the system (some might do that anyway). That increases the load on the system.

1 Like

LOL, no confusion at all. I’ve used Smart Lighting.

There are pro’s and con’s. The pro is that it will do what I need it to do (reset the timer on the trigger). The con is that it turns on my LIFX lights in series and the delay between lights turning on and off is unacceptable.

Go ahead and test it out if you haven’t. You’ll see what I mean.

That is what I posted in the other topics. There are so many trade off’s per solution. I haven’t been able to find a more complex automation engine that gang loads all my lights at once.

I hope that makes sense?

Thank you again for your reply and insights @Automated_House.


I sincerely appreciate your response here in explaining the logic and your thoughts behind automations. I openly admit that I don’t have a developers process for this logic and I’ve struggled with conditional launching. It’s a learning process and I am still learning thanks to kind people like yourself.

I am of the thought that Keeping It Simple is the best way. Perhaps my approach, as you suggest, needs to be rethought.

You’ve given me some really good morsels to digest and rethink my approach.

I would use Smart Lighting in an instant but as I explained to @Automated_House - the latency between turning on individual lights is not acceptable. I don’t know why the Automations Engine in the app is better or why webcore / Smart Lighting is so poor.

I have other concerns. For instance, I’ve also tried to build a scene and then trigger based on motion but the problem is, if the light changes color, dim, temp etc and the scene retriggers then I loose those settings. I just want my lights to stay on as long as I am in the room and retain my settings until I decide to change them.

Again, thank you for your help and the time it took you to write it.


Hi @Lutraphobia,

SmartThings has brought to us the Rules API. That’s another alternative to create your automation. It hasn’t been implemented a formal UI, but via Postman it is also easy.

At the redirect, you will find many examples that explains conditions flow.

Hope it becomes useful to you.

1 Like

What I do to prevent the latency is to create a virtual switch, add the lights and plugs to it, then use it with Smart Lighting to control the lights.

1 Like

I just tried this with LIFX Group of Groups @ [RELEASE][UPDATED] LIFX Group of Groups

Took a while to set it up but it seems to do pretty well. I can fade in and fade out as well as control a LIFX group or a bunch of groups with one group (virtual switch). My lights all turn on at once and works well with webcore after I imported them into the service.

I am pleased with the results!