Jump to content

Bathroom Timer Program


markgam

Recommended Posts

Posted

I have a timer for our bathroom and I have been receiving complaints from the occupants of the lights suddenly turning off, so I figure to add a 1 minutes warning. Here is my code:

 

Bathroom Light Timer

If
       Status  'Bathroom Light' is On

Then
       Wait  30 minutes 
       Set 'Bathroom Light' Off
       Set 'Bathroom Light' On
       Wait  1 minute 
       Set 'Bathroom Light' Off

Else
  - No Actions - (To add one, press 'Action')

 

First, is this an efficient program and second how would I go about "re-activating" the timer to start the 30 minute count down again?

 

Thanks

Posted

Hello Mark,

 

In your program below, when you set the bathroom light to off your "if" condition will become false (i.e the bathroom light status is no longer "on"). The remainder of your then statements may not execute.

 

Try using a control condition for your if statement instead (i.e. If bathroom light is switched on). This should prevent the statements in your "then" loop from re-triggering the program.

 

I have a timer for our bathroom and I have been receiving complaints from the occupants of the lights suddenly turning off, so I figure to add a 1 minutes warning. Here is my code:

 

Bathroom Light Timer

If
       Status  'Bathroom Light' is On

Then
       Wait  30 minutes 
       Set 'Bathroom Light' Off
       Set 'Bathroom Light' On
       Wait  1 minute 
       Set 'Bathroom Light' Off

Else
  - No Actions - (To add one, press 'Action')

 

First, is this an efficient program and second how would I go about "re-activating" the timer to start the 30 minute count down again?

 

Thanks

Posted

Mike,

I see what you mean, so I decided to change the criteria in my If statement, this seems, to work:

 

If
       Control 'Bathroom Light' is switched On

Then
       Wait  15 minutes
       Set 'Bathroom Light' Off
       Set 'Bathroom Light' On
       Wait  2 minutes 
       Set 'Bathroom Light' Off

Else
  - No Actions - (To add one, press 'Action')

Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Forum Statistics

    • Total Topics
      37k
    • Total Posts
      371.4k
×
×
  • Create New...