Jump to content

Creating a Time Window for Input Evaluation


matapan

Recommended Posts

Posted

I would like to set up certain actions to occur on a specific input sequences. These input sequences are in a certain order, but not necessarily triggered within tight time sequences.

 

Example: Opening garage door, pressing an RF command, evaluating time of day.

 

Is there a way programmatically to open a time window to wait for input, and to run the Then or Else branches based on input, or lack thereof?

Posted

Hi matapan,

 

May we assume that the only way that a program is to run is if all these conditions are TRUE? If so, then you could have a folder with the time condition and then you can AND the rest.

 

And, what do you mean by Input? Can you provide an example of what you would like done?

 

With kind regards,

Michel

 

With kind regards,

Michel

I would like to set up certain actions to occur on a specific input sequences. These input sequences are in a certain order, but not necessarily triggered within tight time sequences.

 

Example: Opening garage door, pressing an RF command, evaluating time of day.

 

Is there a way programmatically to open a time window to wait for input, and to run the Then or Else branches based on input, or lack thereof?

Posted

I am proposing the following:

 

- The program will only run if all conditions are satisified.

- There are multiple conditions.

- The initial condition can be set up as part of the folder condition

- The other conditions are satisifed relative to when the folder condition was satisified.

 

Examples:

 

- Directional sensing and keypad activation:

+ Two sensors placed in different areas of a space detect presence.

+ The sequence in which each sensor is activated provides directional

information.

+ The third input is a keypad button activation.

+ The directional information provides context for the button activation.

(examples: which lights to activate, for how long, etc.)

 

- Optional supplemental input to garage door opening and closure.

+ Garage door is opened using opener. Pressing an X10 or Insteon

keypad button within 3 minutes of the action will trigger a macro

 

One can currently specify a specific time or time range for a folder to be active. There is no way to specify time relative to an action or program condition change. Or is there one I've overlooked?

Posted

You can use multiple programs to do a sequence, where each program tests for the next condition in the sequence. In addition, each program has a condition based on the true/false state of the previous program in the sequence (essentially creating a state machine).

 

There are a couple of ways to set up a time window:

 

1) Have a program run its Then path when the start condition occurs, have it wait however long the time window is, then have it run the Else path. Folder conditions can use the true/false state of this program as a condition.

 

2) Use "last run time" in a schedule condition. Folder conditions can use the true/false state of this program as a condition.

Posted

Thanks Chris. I used your suggestion about employing the 'Last Run' condition to specify a countdown period for some secondary event to occur:

 

If

X10 'A1/On (3)' is Received

and From Last Run Time for 'test'

For 15 seconds

Then

Set 'Light A' On

Else

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

 

This program gets called by the primary program, which detects the initial state change. The second state change has to be detected within a certain time period after the initial state change to be valid. In the example, looking for a X10 command within 15 seconds to turn Light A on.

 

Thanks for the tip!

Guest
This topic is now closed to further replies.

×
×
  • Create New...