Yet Another Motion/Light Issue


#1

I thought I was designing a very simple piston where by any motion detected between 11:58pm and 05:58am would turn on two lights until there is 5 minutes of inactivity.

Whats happening is if the lights are on during the daytime (outside the 11:58pm - 05:58am) and there is no activity for 5 minutes (sitting and reading) then the lights turn off, much to the LOUD dismay of my wife.

when designing the piston, I looked at the examples and copied one that seemed to be very close to what I wanted to accomplish. Here the snapshot:

Any thoughts, ideas and certainly corrections will be greatly appreciated.

Tomy51


#2

My immediate thought is that you’ve put 5:58 PM instead of AM so the lights will be motion controlled for twelve hours longer than what you’ve described.

However the other thing is that the ‘only when’ time restriction is only applying to turning the lights on. There is no similar restriction on turning the lights off.


#3

Hi @tomy51

Sorry to jump in,

When you want lights to be controlled by motıon sensors, WAIT is not the best way…
Try this instead:

IF motion sensor changes to ACTIVE
AND
IF time is between X and Y
Then 
With dimmer
Turn ON
Set level to xyz

IF motion sensor STAYS INACTIVE for 5 minutes
Then
With dimmer
turn OFF the lights

#4

Thank you for the assist. I used an old attempt and modified it to your suggestion. Looks like this:

Will give it a try.

Thanks…Tomy51


#5

GREAT catch, thanks for the assist.

Tomy51


#6

I would stay aaway from ELSE,
instead I would create a seperate second IF block for the turn OFF.


#7

Here’s the final, that finally works. Had to add the second “IF ONLY”, otherwise it was turning the lights off during the day.

Thanks for all the help.

Tomy51


#8

for the second IF i wouldn’t use a time condition because,
guess what will happen if the lights turn ON at 5.55 - 5.56 - 5.57 am??