Problem with piston to control Front Door Lights


#1

1) Give a description of the problem
I have a piston that manages the front door lights but its not working as expected.

2) What is the expected behaviour?
2 lights turn on 1 hour before sunset to 9pm.
But if there is motion or door open or ring the doorbell the lights go to 100% for 5 minutes and back to 5%.
But outside the 1 hour before sunset to 9pm the lights on motion or door open or ring the doorbell the lights go to 100% for 5 minutes and then turn off.

3) What is happening/not happening?
Lights don’t come on at 1 hour before sunset but turn off at
Lights go to 100% with motion or door open or ring the doorbell but turn off straight away when the motion goes to inactive or door closes.

**4) Post a Green Snapshot of the piston![image|45x37]


#2

Your first IF block is using a condition rather than a trigger, so that isn’t causing the piston to fire on time. Since you have an IF block that turns the light off at 21:07, you don’t really need the time range in the initial block. Change the first IF block to Time happens daily at 1 hour to sunset. That will make this a trigger and the piston will activate at that time.


#3

Thanks Brian.
But what would happen after 21:07 ?
If there is motion detected will it go to 100% and then after 5 minutes goto 5% and remain there as there is no trigger to turn the light off ?


#4

You are correct. I’ll post an edited piston which I think would work for you. You also had your “if inactive” check inside the “if active” block, so I moved that out a level. Try this.


#5

Thanks will try that…

One question if motion is detected outside the 1 hour to sunset and 9pm will the lights come on to 100% ?
If yes will they turn off and if yes what will trigger them to turn off ?

Thanks
David


#6

I kept all of your triggers intact, but moved them around to make them all happen properly. Between 1 hour to sunset and 9pm, lights will come on 100% if there is motion. Lights will drop to 5% when motion stops. Lights will turn off completely at 9:07 every night.