Do I need WebCore (multiple single motion triggers)


Hey all,

Please move if this is the wrong place for this.

I’m trying to workout if I need this or not. What I want to do, is have my TV lights come on by motion when I come into the lounge, But I only want it to turn on once, not keep coming on while I’m watching TV

The best Idea I have for this is if motion detected turn on lights, but then don’t re-run the automation until no motion has been detected for 30mins.

A) Does that sound like the best way and B) can I do that in stock SmartThings?

Thanks guys!


Ok, so I have webcore installed and ready to go.

I just need an idea of the best way to set this up?


I am thinking outloud here… Untested, but maybe something like:

To test, you can import the piston above by clicking on:
During the import, just point to your Motion Sensor and Light, where appropriate.

Note: I did not account for turning OFF the light, because you did not mention that… but it can easily be added, if desired.


Oh thank you for that :slight_smile:

I know Powershell (google lol), but nowhere near a dev so thanks :slight_smile:

I’m also looking to set up something similar for my bedroom night light. similar thing, but I’m not really sure of the syntax.

Hows this?



Usually it is good form to use a separate thread for different pistons… Unless they are a direct relation to a current thread. (it helps others when searching & reading the threads)

As far as snippets go… the green camera (found on every piston page) is great for creating PNG image files… (or you can crop that pic smaller, if you like, just please keep the line numbers for reference)



Yes that’s true, ill start a new thread :slight_smile:


Don’t forget to come back later and update this thread if my piston above works for you.
(or even if it doesn’t, LOL)


I have added the new Piston, But I need to add another section, for this only to happen between sunset and sunrise.

I know I need another IF right, how do I insert another IF to add to the mail two that you created (I’m assuming that’s right?

Thanks again mate, really appreciate the help :slight_smile:


Before I answer that, I need to ask.

Are you planning to add a “light off” command to this piston, or not?
(the resulting code will be different based on your answer)


Yes, can I add a “if no motion detected for 20mins turn off”.

So, its 30mins for no detection, before the action is allowed to run again. “20 mins of no detection” to turn off the light. Oh crap sorry, the other thing I wanted was only run this if the light is not already on?

Can I do that?


My… You ask a lot… LOL

Give me a few… Let me try to work my magic


HAHAHA I know, I was just thinking the same thing!

Really thanks for doing this, it should give me a good idea of syntax for the other stuff I need :slight_smile:


I think this thought should be discarded…

  • IF the light is on, then turning it on will have no impact
  • IF the light is off, then you WANT it turned on when entering the room

Am I right?


Yes, sorry, that’s what I meant. Only run if the light has a status of off.

Sometimes I have this light on if I’m having friends over so I don’t want it to run if already on.

Does that make sense?


OK, Now I am confused. Can you elaborate on this logic?
I thought the light logic was going to be based on motion and a proper delay?
(it is usually bad form to base LightA’s logic on LightA’s status)


Ok, if that’s not a good idea, then just give me what you can. You’re already doing a lot for me here, dont want to make it harder then it already is lol


OK, I get this… But follow me for a second…

If the light is on, and someone enters the room, the piston will see that the light is on, and not send the ON command. (IE: there is no need to code to look at the light’s current status)

In other words, if the light is already on, it stays on… If the light is off, then entering the room turns it on.

Isn’t this what you wanted?


Ok got ya


OK cool. Just give me a few more mins. I have almost finished it


Yes, I’m still thinking it terms of Alexa routines where its pretty dumb and just triggers an action if you know what I mean.

I’m still new to the deeper complexity of this LOL

It’s not letting me reply LOL. BUT Yes, I knew there might be some overlap here. I can play with the timings if I need.

Thank you so much! It will be a few hours before I test, but Ill let you know.

I understand most of this, so Ill take it and create the night light. 

Thanks again mate, really appreciate the help and crash course :)