06-09-2012, 08:52 AM
I have 2 sensors in the main bathroom which I am using to control lights, and something a bit odd is happening! I am sure it is probably my approach to it so I will explain!
I have one input, a door sensor on the bathroom door and a second input,a pir inside the bathroom! What I am trying to do is use the door to turn on and off the bathroom light and the pir to stop the countdown timer which starts when the door is closed! The logic being if movement is detected when the door is closed there is someone inside
so stop the bathroom countdown timer! So here is what I have:-
I should point out the bathroom door has an automatic door closer so is never left open, hence in theory this should work!
Bathoom Door Reponse (actioned on door open and close)
If Flag Sunset <> 0 Then
Do IPBathLightOn
End If
Do Btrhrm_Of_Delay After 2 Seconds Using Bathroom
Bathroom PIR Response
If Flag Sunset <> 0 Then
Do IPBathLightOn
Stop Timer Bathroom
End If
So in theory, open the door, turns on the ligth, starts countdown timer, walk inside and pir stops countdown timer so light should stay on! It does not, it does off after 60 secs, so the bathroom timer does not seem to be stopped ?
Any advice would be appreciated, or perhaps some suggestions on a different approach ?
I have one input, a door sensor on the bathroom door and a second input,a pir inside the bathroom! What I am trying to do is use the door to turn on and off the bathroom light and the pir to stop the countdown timer which starts when the door is closed! The logic being if movement is detected when the door is closed there is someone inside
so stop the bathroom countdown timer! So here is what I have:-
I should point out the bathroom door has an automatic door closer so is never left open, hence in theory this should work!
Bathoom Door Reponse (actioned on door open and close)
If Flag Sunset <> 0 Then
Do IPBathLightOn
End If
Do Btrhrm_Of_Delay After 2 Seconds Using Bathroom
Bathroom PIR Response
If Flag Sunset <> 0 Then
Do IPBathLightOn
Stop Timer Bathroom
End If
So in theory, open the door, turns on the ligth, starts countdown timer, walk inside and pir stops countdown timer so light should stay on! It does not, it does off after 60 secs, so the bathroom timer does not seem to be stopped ?
Any advice would be appreciated, or perhaps some suggestions on a different approach ?