Motion Based Light EXCEPT when Manually turned On

manual
except
off
light
motion

#250

@bangali , Thank you very much for your nc4jh piston. I am using it to turn on two lights in my living room area at the front door when my Ring doorbell senses motion after sunset. I have two versions of the piston running so that each light turns off at a different amount of time after the motion. I really want to use this to simulate a presence only when my wife and I are not at home. I am a noob and have searched all over and tried a few things myself, but I can’t figure out how to add the presence sensor component to this piston. I apologize if it’s out there somewhere in this forum or in the Smartthings forum that I haven’t seen or figured out.


#251

Add a condition or restriction at the beginning so that it only runs in “Away” mode, or add your presence sensors to the condition: if x & y presence sensors are ‘not present’.


#252

@J_B_1 Thanks. I’ll try the presence sensor approach. My phones were not showing up as presence sensors and realized I needed to go back into WC in the ST app and add the devices, since I didn’t have them setup as presence sensors when I first installed WC.


#253

was traveling without access to my home setup hence the delay … sorry about that.

if what @J_B_1 recommended does not work please feel free to ping me.


#254


OK I tried your piston and it’s a hit and miss…this is the piston I currently use and it works great except for when I turn it on manually it goes off in 5 minutes. All I want is a piston that when I turn on manually it stays on and when I turn it off manually it goes back to motion without having to flick switch on/off on again to activate motion again. Is this possible? :tired_face:


#255

You willl have to have a DTH that recognizes manual switch interactions or use variable. Here is an example of mine with a variable. Although randomly I run into an issue that I believe is related to my motion detector…


Light Control – two questions (variable evaluates incorrectly; “switch physically”?
#256

Hello, This example is what I am looking for. I see “To import this piston import code below edsh2”. I can’t seem to figure out how to do that, can somone help? Maybe send a link to the page I need to go to ? Thanks!


#257

OK, I figured out how to import pistons based on the code given. I picked the devices from my system after importing. I am trying to keep a light on that does not have a physical switch, I turn it on or off with ST or Alexa. Can someone help me alter the code so that I can use either (or both preferably) to keep the motion sensor from turing off the light? Thanks!


#258

I read through the other posts concerning this piston. I am finding that my situation may be different than the setup for the original. I Have a ST motion sensor working with a ST V3 Hub. The motion sensor controls a zwave switch which controlls the light. Again, my goal is to have some way to over ride the motion sensor timer when I turn the lights on with Alexa or the ST app. I suspect that the last part of the piston needs to be modified, but really don’t know where to start. Any help would be great, thanks!


#259

Great information here. I have spent time reviewing. Piston example I am looking for is I have zwave dimmer light switch to control flood lights. The light will turn on by motion sensor or door sensor. Between 9:45PM and 5:00am I would like to add the option to have lights stay on if light switch is physically turned on. Then when light switch is physically turned off revert back to motion or door sensor that will trigger the zwave light switch. Is there a piston I can reference?


#260

Hi there, would there be a way not to use the ST app at all. And just say that when the “lutron caseta” switch is press on do not consider the motion condition.

what’s the boolean programmatic ?

thanks


#261

Maybe something simple like this:

IF Sensor's motion changes to active  <-- Trigger
Then
    IF LutronCaseta is off            <-- Condition
    Then
        Turn on lights
    END IF
END IF

#262

Maybe I got it wrong but it doesn’t work and state is false


#263

The last IF should be outside any other IFs.
(not-indented)


#264

Doesn’t change much…state is now true but the light still closes after a minute when I’ve walked in the room after switching on manually the lutron


#265

I tried to turn aroung the logic but it did again the same thing

it’s like it’s not taking into account the first condition lutron switch must be off


#266

My earlier logic:

1   IF Sensor's motion changes to active  <-- Trigger
2   Then
3       IF LutronCaseta is off            <-- Condition
4       Then
5           Turn on lights
6       END IF
7   END IF

…only works if the device(s) on line 3 are different from the device(s) on line 5

(Ideally, line 3 should be a SimSwitch, but you can use a real light there IF it is not mentioned on line 5)


If you go this route, the turn off portion should be similar:

IF Sensor's motion stays inactive for X minutes  <-- Trigger
Then
    IF LutronCaseta is off                       <-- Condition
    Then
        Turn off lights
    END IF
END IF

This way, the motion sensor won’t do anything if that SimSwitch is on.


#267

Does anyone have a handler for switches for which physical and programmatic conditions work as expected?


#268

I am trying to learn how this works so I can apply it to my current lighting program. I have a smart dimmer switch and a motion sensor.

I have the motion sensor set to turn the light on at specific dim level at specific times.

I would like to be able to override the code with manually hitting the switch on a 120mintue timer. So of I turn the smart switch off, then the lights turn off for 120 mins then the motion turns back on. Same for if I manually turn the smart switch on then I would like the light to set the level to 100% for 120minutes and then restart the motion program.


#269

No one has an answer to this?