Light Turning off with no motion


#1

1) Give a description of the problem
I have a light that turns on with motion and off with no motion. However, if I manually turn the light on with a switch, I would like the action of turning off with no motion to not happen.

2) What is the expected behavior?
If the light was on prior to being triggered to be on by motion, then don’t turn off with no motion.

3) What is happening/not happening?
light is turning off with no motion, if motion was sensed, I would like the light to not turn off with no motion if it was turned on manually.

4) Post a Green Snapshot of the pistonimage


#2

hi @lauzca I think i understand what you want and I believe a simple variable can do that but I just want to make sure I am on the same page with you.
Can you please explain in reality what is it you want? (I walk into a room and this and that etc)


#3

The challenge here is many switches do not distinguish if they were turned on physically or progamically. So if you turn on switch manually, and then there is motion, it will try to turn on the switch again, however it will cancel that because nothing would have changed. But… the piston thinks it turned it on, and when there is no motion it will then turn it off.

This has been floating around for quite some time, and there has not been a reliable way to do this that I have tried yet. I may have to take a stab at it again wen I have time, but not sure if it will work. Anyone figured it out straight forward, please share. I have been struggling with one two for my kitchen, and the wife approval factor is never met.


#4

Hi @Gopack2 I have a workaround for the problem you mentioned.
Not a good one BUT wife approved. So it’s a GREAT ONE LOL
(I wasn’t sure if this is what lauzca was wanting)

Anyway my workaround is using smart bulbs and remote switch (wall plated) the same time…

Motion sensors controls the lights directly BUT if remote switch on the wall is used - just like a regular switch - than piston changes a variable…


#5

So these are cabinet lights. I have it set so that after sunset when I walk into the kitchen the cabinet lights turn on, but only if the main kitchen lights are turned off. If the cabinet lights turn on because of motion, I want them to turn off because motion stops, except for it I manually turned them on. For example, lets say we are having guests over and I want the cabinet lights to stay on, in that case, I flip the switch to turn them on, if I turned them on by switch, I want them to stay on until I turn them off by switch. Currently if I turn them on by switch, if the kitchen senses motion they will remain on, but then turn off when motion stops. If I turned them on by switch, I want them to turn off only when turned off by switch. Thanks for your help.


#6

Are your lights smart lights (bulbs) ?? Or Smart switch controls them with motion sensors?


#7

They are smart bulbs activated by a double tapping a smart switch manually or by motion after sunset. Is there a way to prevent a piston from running if the lights were already switched on. What does the “only when” restriction before the if statement do?


#8

ok good…
I use a similar GUEST setup…
using a variable should do the trick. Her is an example how you can set it up…
part 1 = Lights are controlled my motion sensors.
part 2 = When switch is turned on manually, motion sensors are no longer active. Lights stay ON as long as they are needed.


Variable = lightsguestmode

(This part turns the lights ON)
If motion sensor 1, sensor 2, etc CHANGES TO ACTIVE
and
If variable {lightsguestmode} is FALSE
Then
Turn ON light bulbs

(This part turns the lights OFF)
If motion sensor 1, sensor 2, etc STAYS INACTIVE 2 MINUTES
and
If variable {lightsguestmode} is FALSE
Then
Turn OFF light bulbs

Now this part changes the variable, so that motion sensors are no longer in control
If wallswitch changes to ON
Set variable {lightsguestmode} = TRUE
then
light bulbs 1, 2, 3, 4 TURN ON (I guess you won’t even need this part because your lights will be on because of the switch - I assume.)

And finally this part changes the variable BACK TO motion sensor control.
If wall switch changes to OFF
Set variable {lightsguestmode} = FALSE

WARNING : if you are controlling RGB smart bulbs with a smart wall switch, please do your own research. I have read and heard most people are not liking that idea because smart bulbs should not be disconnected from electricity. BUT i do it anyway:))))))


#9

I had the same wish for having both a motion light on but wanting to turn the light on manually and stay on.Here’s my setup, works like a charm for me.