Jump to content

How to Use Repeat in a Program


paauto

Recommended Posts

Posted

I've hooked an I/O Linc up to my burglar alarm siren output (using a dry relay). I set up a program to turn on a bunch of interior lights if the buglar alarm trips. Now, I'd like to set up a program that flashes my exterior lights (front & side doors and lights on driveway piers) on an off for 20 minutes after the alarm trips and then sets them to on.

 

I created a scene called "Exterior Alarm Lights" and set up a program whereby the lights turn on for 3 seconds then off. I put a "repeat" after the off statment and set the repeat at 200 times. After the Repeat I set the "Exterior Alarm Lights" scene on.

 

Will this work? I notice the command to set the "Exterior Alarm Lights" on is indented under the Repeat. Is the Repeat in the correct spot?

 

Thanks.

Posted

Repeat statement is positioned at the beginning of the statements to be repeated. The statements that are part of the Repeat are indented.

 

Link to UDI Wiki that discusses Repeat

 

http://wiki.universal-devices.com/index ... EON:Action

 

Use the blinking lights with care. The process can be a significant load on Insteon. Since this only happening if the alarm trips it will be infrequent but could interfere with other Insteon traffic while the lights are being "blinked".

Posted

Here is a program of mine that is quite similar to what you want. It is to wake up my daughter (who still usually does not wake up). It flips the lights on and off and makes the switch beep each time. The "if" clause allows her to shut off the blinking by either hitting the on or off paddle of the switch (which causes the program to trigger, aborting the repeat, and running the empty then clause). You use the "repeat 1 time" at the end to revert to regular non-repeating stuff to follow the repeating stuff.

 

If
       Control 'Lauren Bedroom / Lauren BR-Overhead L' is switched On
    Or Control 'Lauren Bedroom / Lauren BR-Overhead L' is switched Off

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

Else
       Repeat 120 times
          Set 'Lauren Bedroom / Lauren BR-Overhead L' On
          Set 'Lauren Bedroom / Lauren BR-Overhead L' 180 (Beep Duration)
          Wait  2 seconds
          Set 'Lauren Bedroom / Lauren BR-Overhead L' Off
          Set 'Lauren Bedroom / Lauren BR-Overhead L' 180 (Beep Duration)
          Wait  2 seconds
       Repeat 1 times
          Set 'Lauren Bedroom / Lauren BR-Overhead L' On


Posted
Here is a program of mine that is quite similar to what you want. It is to wake up my daughter (who still usually does not wake up). It flips the lights on and off and makes the switch beep each time. The "if" clause allows her to shut off the blinking by either hitting the on or off paddle of the switch (which causes the program to trigger, aborting the repeat, and running the empty then clause). You use the "repeat 1 time" at the end to revert to regular non-repeating stuff to follow the repeating stuff.

 

If
       Control 'Lauren Bedroom / Lauren BR-Overhead L' is switched On
    Or Control 'Lauren Bedroom / Lauren BR-Overhead L' is switched Off

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

Else
       Repeat 120 times
          Set 'Lauren Bedroom / Lauren BR-Overhead L' On
          Set 'Lauren Bedroom / Lauren BR-Overhead L' 180 (Beep Duration)
          Wait  2 seconds
          Set 'Lauren Bedroom / Lauren BR-Overhead L' Off
          Set 'Lauren Bedroom / Lauren BR-Overhead L' 180 (Beep Duration)
          Wait  2 seconds
       Repeat 1 times
          Set 'Lauren Bedroom / Lauren BR-Overhead L' On


 

 

Cold water also works pretty well.

Posted

EZFlora Zone 1 ?

 

-Xathros

Posted
Have any ideas on automating it using Insteon?...

 

You won't have to. After a couple of mornings with the cold water treatment, I expect your daughter will suddenly have the ability to wake herself without further outside stimulus.

  • 1 year later...
Posted

Repeat x times

        program statements

Repeat 1 times

        program statements

 

The first set of statements repeat x times, the second set runs once.

Guest
This topic is now closed to further replies.

×
×
  • Create New...