How to turn off a piston for a short time that activates a light on motion


#1

I have a piston that is a great great grandchild of the famous @bangali work from a few years ago that is still referenced to this day when someone wants to activate a light on motion but also wants to be able to override it by manually turning it on. Mine also activates if the front door opens and has some other special conditions for turning it off so that is why it looks so different from the original Piston:

this is the original Bangali thread

In any event, I would also like to temporarily override it as well by keeping it OFF if necessary. This is my front porch light and I would like to have the ability to be able to disable the Piston and go outside and have the light NOT turn on in some cases.

It is a smart switch/dumb bulb implementation. In a perfect world, I would like the Piston to not trigger by simply hitting the off toggle on the smart switch 3 times (or something like that) as I am walking out. I would not want to have to toggle the switch on/off as it would turn the light on and off which is what I am trying to avoid in the first place. Then I would have to reactivate the Piston somehow as well when I go back in the house, again not wanting to cycle it on/off because it would activate the light.

I hope this makes sense. Thoughts please! My working knowledge of WebCore is good, but certainly not expert enough to figure this out. My working Piston is below:


#2

I would suggest creating a simulated switch ‘Porch Enable’ or something like that. Then you can either check for this switch on/off status in your piston before doing anything or create a separate piston that pauses/resume your porch light piston when the switch is turned off/on. With so many triggers, probably easiest to have a separate piston that pauses this one when you turn off the enable sim switch. second piston might be something like this:

if Porch Enable's switch changes
then
  if Porch Enable switch is on
  then
    resume piston
  endif
  if Porch Enable switch is off
  then
     pause piston
  endif
endif

#3

Just what I needed. Thank you for that bit of inspiration and direction :slight_smile:


#4

You’re welcome. Hope it fills your need.