Jump to content

Program Help--Time for dinner


Buzzhazz

Recommended Posts

I'd like to get some help on what I think should be a fairly straightforward program, but there are probably several ways to do it, some simpler than others.

 

I have a KPL at the top of the stairs.  I want to use one of the secondary buttons in non-toggle always OFF mode to activate a program.  The program would be used to call the kids up for dinner or whatever.  We have a music room and a rec room (among others) down there, and I envision a program which flashed the lights three times in both rooms with one second on and then one second off per cycle--and then leaves the lights in the state they were before.  So lets say the kids are in the rec room with lights on and the lights are off in the music room.  That's the way the lights would remain after the program had been activated from the KPL button.

 

Ideas?

Link to comment

You'll need two programs, one if the light is on and another if the light is off.

 

Light is Off

If

     Control 'KPL button' is Off

   And Status 'light' is Off

 

Then

     Repeat x times

     Set 'light' On

     Wait 1 second

     Set 'light Off

 

Light is On

If

     Control 'KPL button' is Off

   And Status 'light' is On

 

Then

     Repeat x times

     Set 'light' Off

     Wait 1 second

     Set 'light On

 

Link to comment
  • 5 months later...

OK, I finally got around to playing with this.  I am doing one step at a time and wrote the progam such that when a KPL button is turned off and a target light is off, it should cycle on and off three times at one second intervals.  The purpose is to call the kids to dinner from downstairs without screaming downstairs through a closed door and over a home theater.

 

Here's the program.

 

If
        Control 'LL - Stairs / Call Upstairs' is switched Off
    And Status  'Great Room - Sconces (North)' is Off
 
Then
        Repeat 3 times
           Set 'Great Room - Sconces (North)' On
           Wait  1 second
           Set 'Great Room - Sconces (North)' Off
           Wait  1 second
 
Else
   - No Actions - (To add one, press 'Action')
 

 

It only cycles one time though.  Here's the event viewer log.  What am I doing wrong?

 

Sat 05/16/2015 15:24:25 : [  15 C6 8C 5]      DOF   0
Sat 05/16/2015 15:24:26 : [  15 C6 8C 5]       ST   0
Sat 05/16/2015 15:24:26 : [  1A 3A 21 1]       ST 255
Sat 05/16/2015 15:24:27 : [  1A 3A 21 1]       ST   0
 

Link to comment

As soon as the Program changes the Status of 'Great Room - Sconces (North)' the Repeat is terminated by the Program being triggered with a False state running the Else.

 

One approach is to put Repeat loop in second Program so the trigger of the first Program does not affect the Repeat.

Link to comment

As soon as the Program changes the Status of 'Great Room - Sconces (North)' the Repeat is terminated by the Program being triggered with a False state running the Else.

 

One approach is to put Repeat loop in second Program so the trigger of the first Program does not affect the Repeat.

 

Thanks Lee, but I'm not following you.  I think I understand what you mean with the False state thing--that rather than runnin g sequentially through the THEN portion and repeating, the change in Status is making the program terminate.  I don't follow how to fix it though.  Do you have time to provide an example?

Link to comment

Repeat and Wait statements can be interrupted by another Program trigger.

 

 

If

Control 'LL - Stairs / Call Upstairs' is switched Off

And Status 'Great Room - Sconces (North)' is Off

 

Then

 

Run Program 'Program2' (Then Path)

 

Else

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

 

Program2

 

If

Then

Repeat 3 times

Set 'Great Room - Sconces (North)' On

Wait 1 second

Set 'Great Room - Sconces (North)' Off

Wait 1 second

Else

Link to comment

Repeat and Wait statements can be interrupted by another Program trigger.

 

 

If

Control 'LL - Stairs / Call Upstairs' is switched Off

And Status 'Great Room - Sconces (North)' is Off

 

Then

 

Run Program 'Program2' (Then Path)

 

Else

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

 

Program2

 

If

Then

Repeat 3 times

Set 'Great Room - Sconces (North)' On

Wait 1 second

Set 'Great Room - Sconces (North)' Off

Wait 1 second

Else

 

You are a good teacher Lee.  That makes sense.  I programmed it as suggested, and it works perfectly.  Thanks.

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...