Jump to content

Correct use of long "Waits"


yardman 49

Recommended Posts

Posted

Hello all:

 

I think that I have written this correctly, but I have some questions:

 

Here is a program that turns off my outside floods:

 

If
       From    10:15:00PM
       For      1 hour 

Then
       Wait  15 minutes  (Random)
       Repeat 3 times
          Send X10 'E3/Off (11)'
          Wait  2 seconds
       Repeat 1 times
          Wait  4 hours 
       Repeat 3 times
          Send X10 'E3/Off (11)'
          Wait  2 seconds

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

 

I originally put in the "From...For" to account for the timer bug that showed up in version 2.4.15 (I think). Prior to that I had just used 10:15 with a 15 minute randomization.

 

More recently, I put in a 4 hour wait, at which point the "E3 Off" would be sent again. This is in case someone turns the floods back on late at night and forgets to turn them off.

 

 

 

So I have two questions:

 

1) Will this program actually work for the 4 hour wait? Or do I have to have the "From...For" statement be long enough to encompass the entire time needed for all of the events? So say increase the "For" time to 5 or 6 hours?

 

2) If this is correctly written (which it may not be), then why when I look at the Program Summary page at 11:30 pm does the "Activity" column show "Idle", and the "Status" say "False". Since the "Then" statement should still be running, shouldn't the "Activity" column read "Running Then"?

 

 

 

Thanks

Posted

1) Will this program actually work for the 4 hour wait? Or do I have to have the "From...For" statement be long enough to encompass the entire time needed for all of the events? So say increase the "For" time to 5 or 6 hours?

 

2) If this is correctly written (which it may not be), then why when I look at the Program Summary page at 11:30 pm does the "Activity" column show "Idle", and the "Status" say "False". Since the "Then" statement should still be running, shouldn't the "Activity" column read "Running Then"?

Hi Frank,

 

I think this answers both questions ...

 

From/For behaves the same as From/To, for example, From 5:00PM For 4 hours behaves identically to From 5:00PM To 9:00PM.

 

Therefore in this case you must either change the "For" to 5 or 6 hours, or just change the From/For to a Time is instead.

Posted

Chris:

 

Hi. Wouldn't it be safe to say that the "FOR" is really for periods associated with a variable, like say sunrise. From sunrise for 1 hour, etc. Otherwise, if one wanted a fixed time for an hour, you'd be best to go from -to hard times? Or is ther some other real reason for "FOR"?

 

aLf

Posted

Hello Chris:

 

I changed the "For" time to 6 hours. Now the "Running Then" shows up for the time period specified in the "Then" actions.

 

If I instead set a specific time (or a 15 minute Random time), should I then also see "Running Then" appear in the Program Summary during the time period specified by the "Then" actions?

 

Thanks.

Posted
Chris:

 

Hi. Wouldn't it be safe to say that the "FOR" is really for periods associated with a variable, like say sunrise. From sunrise for 1 hour, etc. Otherwise, if one wanted a fixed time for an hour, you'd be best to go from -to hard times? Or is ther some other real reason for "FOR"?

 

aLf

 

You are correct that the typical usage of For is in conjunction with a variable start time like sunrise/sunset, or last run time for a program. It also has a use for fixed times though, for example, if you want something to run all day on Thursday:

 

If 
       On Thu
       From    12:00:00AM 
       For      24 hours 

Posted

If I instead set a specific time (or a 15 minute Random time), should I then also see "Running Then" appear in the Program Summary during the time period specified by the "Then" actions?

 

If you mean just change it to the following, then yes, 'Running Then' will appear until the 'Then' is complete (about 4 hours + 1 to 15 minutes). In fact, this is the preferred way of doing it for this type of program.

If 
       Time is 10:15:00PM 

Then 
       Wait  15 minutes  (Random) 
       Repeat 3 times 
          Send X10 'E3/Off (11)' 
          Wait  2 seconds 
       Repeat 1 times 
          Wait  4 hours 
       Repeat 3 times 
          Send X10 'E3/Off (11)' 
          Wait  2 seconds 

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

 

By the way, If you want the program itself to become 'False' after its done, just add 'Run MyProgram (Else Path)' as the last action. It will change the program to False, and run the empty else (ie. do nothing).

 

Program 'MyProgram':

If 
       Time is 10:15:00PM 

Then 
       Wait  15 minutes  (Random) 
       Repeat 3 times 
          Send X10 'E3/Off (11)' 
          Wait  2 seconds 
       Repeat 1 times 
          Wait  4 hours 
       Repeat 3 times 
          Send X10 'E3/Off (11)' 
          Wait  2 seconds 
       Repeat 1 times 
          Run 'MyProgram' (Else Path) 


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

Posted

Chris,

 

Thank you. I was looking for a way to qualify a program with a false status on a previously run schedule (trying to avoid conflicts). Your 'Run program (else path)' does the trick.

 

You answered my question before I could post it. Are you becoming clairvoyant as well?

 

IM

 

By the way, If you want the program itself to become 'False' after its done, just add 'Run MyProgram (Else Path)' as the last action. It will change the program to False, and run the empty else (ie. do nothing).

 

Program 'MyProgram':

If 
       Time is 10:15:00PM 

Then 
       Wait  15 minutes  (Random) 
       Repeat 3 times 
          Send X10 'E3/Off (11)' 
          Wait  2 seconds 
       Repeat 1 times 
          Wait  4 hours 
       Repeat 3 times 
          Send X10 'E3/Off (11)' 
          Wait  2 seconds 
       Repeat 1 times 
          Run 'MyProgram' (Else Path) 


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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing

    • No registered users viewing this page.
  • Forum Statistics

    • Total Topics
      37.2k
    • Total Posts
      372.5k
×
×
  • Create New...