Posted: Saturday Jun 9th, 2012 08:52 am |
|
1st Post |
wexfordman
UCM Pi Users
Joined: | Monday Jan 1st, 2007 |
Location: | Cork, Ireland |
Posts: | 546 |
Status: |
Offline
|
back to top
|
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 ?
|
Posted: Saturday Jun 9th, 2012 09:37 am |
|
2nd Post |
ident
Administrator
Joined: | Wednesday Aug 9th, 2006 |
Location: | Singapore |
Posts: | 3493 |
Status: |
Offline
|
back to top
|
The PIR Response
Bathroom PIR Response
If Flag Sunset <> 0 Then
Do IPBathLightOn
Stop Timer Bathroom
End If
should work ie keep the light on when motion is detected
However rhe picture may be incomplete
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
What happens with " Do Btrhrm_Of_Delay After 2 Seconds Using Bathroom" above?
Is "Btrhrm_Of_Delay" using another time, or does it immediately switch off the light?
|
Posted: Saturday Jun 9th, 2012 10:00 am |
|
3rd Post |
wexfordman
UCM Pi Users
Joined: | Monday Jan 1st, 2007 |
Location: | Cork, Ireland |
Posts: | 546 |
Status: |
Offline
|
back to top
|
Hi ident
The bathroom of delay response uses the same timer as the one that is stopped! I did it that way to add a bit of a delay between starting the timer again for when you leave the room, just in case the pir caught you one last time or stayed open for a bit longer than the door closing!
Regards
EamonLast edited on Saturday Jun 9th, 2012 10:02 am by wexfordman
|
Posted: Sunday Jun 10th, 2012 07:29 am |
|
4th Post |
ident
Administrator
Joined: | Wednesday Aug 9th, 2006 |
Location: | Singapore |
Posts: | 3493 |
Status: |
Offline
|
back to top
|
I cannot see where the 60 secs timer is started
Please send the cclx file to support@cytech.biz so we can have the complete picture
|
Posted: Monday Jun 11th, 2012 01:16 pm |
|
5th Post |
wexfordman
UCM Pi Users
Joined: | Monday Jan 1st, 2007 |
Location: | Cork, Ireland |
Posts: | 546 |
Status: |
Offline
|
back to top
|
Hi Ident,thanks for that, have just mailed config file to support.
Regards,
Eamon
|
Posted: Tuesday Jun 12th, 2012 08:23 am |
|
6th Post |
slychiu
Administrator
Joined: | Saturday Apr 29th, 2006 |
Location: | Singapore |
Posts: | 5499 |
Status: |
Offline
|
back to top
|
See the following response
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
Look at the Response Btrhrm_Of_Delay
Btrhrm_Of_Delay
Do IPBthm_Light_Off After 60 Seconds Using Timer29
For some reason you are use Timer29 for the 60 second delay
This means that when the PIR detects motion it stops Tomer Bathroom but Timer29 continues to run and after 60 seconds switches off the light
|
Posted: Tuesday Jun 12th, 2012 12:29 pm |
|
7th Post |
wiredhome
Comfort Distributors
Joined: | Thursday Apr 12th, 2007 |
Location: | Dublin, Ireland |
Posts: | 81 |
Status: |
Offline
|
back to top
|
I spec this on every job for our integrators
but i do it the oppsite way
we use the pir to turn on the light for 3 mins( It retriggers eachtime it sees movement)
then the door turns off the light after 3 secs when opened
If there is KNX dimming controlling the light we turn the light on at 5-10% at night
|
Posted: Saturday Jun 16th, 2012 08:20 am |
|
8th Post |
wexfordman
UCM Pi Users
Joined: | Monday Jan 1st, 2007 |
Location: | Cork, Ireland |
Posts: | 546 |
Status: |
Offline
|
back to top
|
Hi
That sorted it, thanks! (can't believe I missed that), I just changed the timer to the bathroom timer and all works perfect now!
Wired, the reason I don't use the pir to turn the light on and start the timer is that I find that if I set the timer too short, then someone gets caught out if they sit on the throne to long :-) or if they are in the bath for example!
So my solution was to put a recessed door closer (cost about 10 euro) on the door, so the door always closes! Then I use the door relay to turn on the light and start the timer to turn it off again (using the door also means the light comes on quicker)! The pir then picks up
Movement in thee room, and of the door relay is closed, then it stops
The timer and the light stays on until the door is opened again to start the timer!
Basically if the pir goes off, the room is occupied and will
Stay occupied until the door opens again! Works perfect now!
Going to do it to a few more rooms now!
Regards
Eamon
|
|