Do I need WebCore (multiple single motion triggers)


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 :)


I just encountered a tiny snag with your numbers…

Lets say:
1:00 = Enter the room = Light comes on
1:01 = Leave the room = Light stays on
1:21 = Room still vacant = Light turns off (20 min timer)
1:25 = Enter the room = Light REMAINS off (hasn’t been 30 min)
1:31 = Still in room = Light finally turns on (30 min mark)

Is this scenario acceptable to you?


OK, with those caveats out of the way, I introduce to you:

Please delete the previous piston, and import this one in it’s place.
(there are a lot of advance features here, so be careful when editing you don’t break it, LOL)


Sure thing, and thanks for keeping us updated.
(your post count should reset soon)


Im back, that time out is so painful lol

SO I think this is working. I was in the lounge room before sunset so i’ll have to do more testing tonight.

But I walked in later and it turned on, left and was off this morning when I went in again lol, so guess it’s working ok. Will update again tonight :slight_smile:


Sometimes, on a new (or complex) piston, I may turn my Log Level to Full for a week or so. This gives me a detailed record of all events… So if I need to do any troubleshooting, I will have all the information I need.

Once I’m happy with a piston’s reliability, I’ll usually lower the level to Minimal, or None.