Comfort  Automation/ Security System Forums Home
Home Search search Menu menu Not logged in - Login | Register
Comfort Automation/ Security System Forums > Support > Questions on Programming Comfort > Timer turns lights off when I dont want it to!

Timer turns lights off when I dont want it to!
 Moderated by: slychiu
 New Topic   Reply   Printer Friendly 
 Rate Topic 
AuthorPost
 Posted: Sunday Aug 9th, 2015 02:43 pm
   PM  Quote  Reply 
1st Post
ComfortGeek
Member


Joined: Thursday Jul 12th, 2012
Location:  
Posts: 66
Status: 
Offline

  back to top

Hi,                                                                                                                                                                                               

 

I have a problem with timers on lighting.

 

I have exterior spot lights which come on when one of three things happens: 1)  the intruder alarm is activated, or 2) when I turn them on through the control menu, or 3) if there is movement picked up by the external PIRs.

 

When the lights come on activated by movement via the PIRs, they stay on for 120 seconds and then turn off.  However, the problem is, if I turn them on by the control menu and / or when the alarm is activated, if there is also movement past the external PIRs, the lights then turn off after 120 seconds - which is annoying as I need them to stay on until I decide to turn them off.

 

What can I do add so that the lights are only timed and turned off after 120 seconds when activated by movement, but when turned on through the control menu or by the intruder alarm, they stay on until I decide to turn them off?

 

The response currently is:

 

If NightTime <> 0 Then
    Do SideOsLitesOn
    Do OsSpot3and2On
    Do OsSpot3and2off After 120 Seconds Using OsSpots2and3
    Do SideOsLitesOff After 120 Seconds Using SideLightTimer
End If

 

And the response to turn them on via the control menu is:

 

    Do SideOsLitesOn
    Do OsSpot3and2On


 

What can I add to either / both of these responses to stop the timer turning the lights off after 120 seconds when I have turned the lights on through the control menu?

Kind regards,

Kevin



 Posted: Sunday Aug 9th, 2015 08:14 pm
   PM  Quote  Reply 
2nd Post
Ingo
UCM Pi Users


Joined: Sunday Jan 21st, 2007
Location: South Africa
Posts: 562
Status: 
Offline

  back to top

Your best bet would probably be to put some sort of Flag in the mix. My thinking is that if EG. Flag01 is set then skip the response internals (meaning the light is On already) or if Cleared (Light Off) then execute the response normally.

Setting Flag01 should probably be done in a response where you manually turn the lights on, in my case a Counter is set from Cbus so I would just Set|Clear Flag01 as the light changes state. You could also use a Counter if it's mapped to your lights.

I might not work at all but it's the avenue I would try.

Ingo



 Posted: Monday Aug 10th, 2015 06:26 am
   PM  Quote  Reply 
3rd Post
slychiu
Administrator


Joined: Saturday Apr 29th, 2006
Location: Singapore
Posts: 5502
Status: 
Offline

  back to top

Yes Flags are the way to go

Your zone on response could be
If NightTime <> 0 Then
    Do SideOsLitesOn
    Do OsSpot3and2On
    If Flag001 =0 then
    Do OsSpot3and2off After 120 Seconds Using OsSpots2and3
    Do SideOsLitesOff After 120 Seconds Using SideLightTimer
    Endif
End If

Hence set the flag Flag001 in the control menu and Intruder Alarm or in other events that you dont want the lights to be switched off

However take care to turn OFF the flag afterwards otherwise the lights would never turn off after 120 seconds when you want them to



 Posted: Thursday Aug 13th, 2015 10:49 am
   PM  Quote  Reply 
4th Post
Swiss-Toni
UCM Pi Users


Joined: Thursday Sep 15th, 2011
Location: Greater London, United Kingdom
Posts: 349
Status: 
Offline

  back to top

I remember having a very similar problem when I first started writing command lines, their is another alternative.
for the control menu add a new "response"

Do SideOsLitesOn
Do OsSpot3and2On

you will also require a response to turn off or use the toggle feature to do so.
The problem I see you having is that you are trying to use the same response for a different function, albeit it has the same result for the lighting. However using this method can still be overridden with the initial sensor/s kicking in when activated "If night time" this is the simplest way round it, but using flags is a better way overall.



 Current time is 06:39 am
Comfort Automation/ Security System Forums > Support > Questions on Programming Comfort > Timer turns lights off when I dont want it to!
Top




UltraBB 1.172 Copyright © 2007-2014 Data 1 Systems