Jump to content

Bathroom Timer Program


markgam

Recommended Posts

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

Link to comment

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

Link to comment

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')

Link to comment

Archived

This topic is now archived and is closed to further replies.


  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

    • There are no registered users currently online
  • Forum Statistics

    • Total Topics
      36.9k
    • Total Posts
      370.2k
×
×
  • Create New...