Motion Based Light EXCEPT when Manually turned On

manual
except
off
light
motion

#61

ok. that is exactly right. yes, it does.

since you are using a smart switch with dumb bulb everything should work from the switch itself and you dont need to use the ST app to turn off anything. i just posted this last part to distinguish it from the scenario that is posted in the example piston in the first post.


#62

Ok, cool.


#63

may I ask which bulb are you using that does this?


#64

i know of sengled bulbs that i use, support this. so, i use the lightify bulbs where its constant power and sengled where the bulb is behind a dumb switch.


#65

I gave the piston code (iuxsc) a try again and I still can’t get it to turn off the motion-based piston once I turn the switch off and back on…it reverts right back…I did see that ST is taking a while to show the new status of the z-wave dimmer, so I am not sure if that is causing issues…but to make sure, I kept the switch in the off position until I could see ST update the light to off, then turned it back on and that didn’t stop the motion-based countdown to off.


#66

unfortunately, its not designed to turn off the motion based countdown once that’s already started.

i have a ge dimmer switch hooked by to a dumb bulb somewhere, let me see what can be done.


#67

didnt realize you were using iuxsc. have you tried edsh2? thats in the first post in this thread.


#68

i tried edsh2 with a dimmer switch. except for the delay needed in between turning if off and turning it on, it worked for me.

remember, once you hit the off button the motion should not get activated before you hit the on button. stay very still in between. :slight_smile:


#69

I think I tried both codes. I can try again. Also, I was likely moving while I pressed off and back on, so the motion could have re-activated. Is there any way to program it so that won’t be a problem? Maybe if there’s some virtual switch or something that I can tell Alexa to activate a virtual switch to turn off the piston temporarily. There has to be some solution other than staying still.


#70

yeah, if you use alexa then its much easier.

  1. create a virtual switch in ST
  2. within the first if delete set programmatic = true
  3. on the 2nd if delete the condition programmatic is true
  4. delete the third if
  5. in piston options on top right corner check show restrictions
  6. on the only when right before the execute statement add the condition when virtual switch is off

and you are all set.


#71

Easier said than done hahah :slight_smile: Do you have an example you can post, please?


#72

add the switches or lights you want to control in the lightDevices and the motion sensor or sensors that control them in the motionDevices.

switch 21 is the virtual switch you would have to create in ST and control with alexa. when that is on, the piston does nothing otherwise the light is controlled by motion.


#73

Thanks, I will try…


#74

Here is what I have been using. Works pretty well.

I have 2 switches that I want to work together. 1 motion detector that controls the two switches. If motion is detected it resets the timer to a new 10 minutes. If the switches turn the lights on manually, it will override the motion until you turn the lights off manually.

Oh and only works between sunset and sunrise with 30 minute offsets


#75

That one looks interesting…I adjusted a bit, but I am not getting motion to activate the light…What am I doing wrong? :frowning:

Also, how do you address the motion detecting you before you physically turn on the light switch and/or turn it off (for purposes of disabling motion?)


#76

In order for it to start working I had to physically turn on a switch so that the variables would populate. Then should work fine. If motion picks you up before you turn on switch, I have to turn lights off/On physically and it should put in the override mode. Hope that is what you were looking for

If you can’t get the switch on the first time without the motion picking you up, try using the smartthings app to tun on the switch. That should detect as a physical turn on. At least it does for me. That should get it “ in sync”


#77

I am adding my own rendition of a ‘Motion based light’ because I was able to complete it by using your examples (so thank you). The lightbulb that I am using is a Sylvania Lightify bulb which may be different from yours in the sense that when the bulb is turned on it resets itself to 100% brightness instead of sending an “on” command (so make changes if needed for yourself)

Use case: This bulb is installed in the stairwell and attached to what is defined in this thread to a 3-way “dumb” switch. When either dumb switch is turned on the bulb automatically turns on at 100% and then within seconds is changed by the piston to the ‘ultra’ setting (which I have set to 70%). It stays there for 4 minutes and then turns down to the ‘lower’ setting (15%). Every time there is motion on the 2nd floor, it will dim up to the ‘upper’ setting (55%) then dim back down.
I have added some additional things in there to alert me when my kids are walking around after bedtime, but you can remove those.


#78

nice work. thanks for sharing.


#79

I’m not getting consistent results here, so maybe for my setup I need to modify it a bit? I’ll post a snapshot of my piston…It’s not activating the light based on motion unless I change the 'if" for motion sensing activate as never cancel…otherwise, it doesn’t seem to work (I modified it back to the original piston without this in the below screenshot.) I tried to override the motion by having no motion, then turning on the physical switch, which seemed to work as long as I waited (around 6 seconds) for ST to show the switch on, then motion didn’t seem to matter (which is what I want.) However, once in this mode, even when I turned the physical switch off, motion will subsequently turn the light on, but after 10 seconds, the light won’t go back off…lol! Help :slight_smile:


#80

@smartie give this a shot. because its dimmer there is a delay in sending the off event, so you will have to let the light turn off fully and then turn it on. i am trying to do this without introducing any artificial blind windows like introducing a wait for motion based light activation.