Jump to content

Trouble with WAIT in program


tdroney

Recommended Posts

I can't seem to get this to work, any help would be appreciated. The hot water turns on (and off) with the button push, but I can't get it to turn off automatically after 15 min like I want. The kitchen switch is a 6 button keypad and works on, off, etc.

I also have a similar program in the Mbath that turns on the hot water pump, same problem- thanks, Tim

 

 

If
        Status  'Hot Water Pump' is Off
    And Status  'Kit Sink Light / Hot Water Kit' is Off
    And Control 'Kit Sink Light / Hot Water Kit' is switched On
 
Then
        Set 'Hot Water Pump' On
        Wait  15 minutes 
        Set 'Hot Water Pump' Off
 
Else
   - No Actions - (To add one, press 'Action')
 
 
Link to comment

As soon as 'Hot Water Pump' Status changes to On and the Wait executed the If is reevaluated as False running the Else. The common approach is to split the Program into 2 programs. The Then of program 1 invokes Program 2. Program 2 contains the Then logic now in the single Program. When the Status of 'Hot Water Pump' changes and invokes the Else in Program 1 it will not affect Program 2.

 

 

 

If

Status 'Hot Water Pump' is Off

And Status 'Kit Sink Light / Hot Water Kit' is Off

And Control 'Kit Sink Light / Hot Water Kit' is switched On

 

Then

Run Program 2 (Then)

 

Else

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

 

Program 2

 

If

 

Then

Set 'Hot Water Pump' On

Wait 15 minutes

Set 'Hot Water Pump' Off

Else

Link to comment

I think my reason may not be quite right, its that the program is changing the condition of its entry. However, I believe the conclusion is right and that line should be removed.

I have to agree but I don't believe he needs two of the three lines leaving only

 

If

  Control 'Kit Sink Light / Hot Water Kit' is switched On

 

With just this line the timer would be retriggered each time you pushed the 'Hot Water Kit' button.

I am not sure why you would want to test if the pump is already on. Possibly so the timer cannot retrigger and be extended?

Link to comment

How about think of this another way. Seems like you have two Kpl buttons and then a third device that is connected to the pump (switchlinc I presume). Create a scene 'hot water' with all three devices as controllers. Then a program:

If status hot water switchlinc is on

Then

Wait 15 minutes

Set scene 'hot water off'

 

If you want the pump to go on longer than 15 minutes you would have to hit a button to turn the scene off, then again to turn it on and trigger the program.

Eric

Link to comment

Lee has it right. Status is re-evaluated each time there is a change. So the condition

 

If
        Status  'Hot Water Pump' is Off
 
evaluates as false as soon as
 
Then
        Set 'Hot Water Pump' On
 
occurs. Because the statement is false, the program executes Else.
Link to comment

LeeG-

 

Well the "program 2" method seems to work. I had this working a year ago when I first purchased the 994i. I don't remember the program, but it was not the 2nd program method you described.

So is this how to get a motion detector to turn on a light or other item for a period of time? Or some other program method?

 

Thanks so much for the help. This has been driving me nuts for a while now...

-Tim

Link to comment
So is this how to get a motion detector to turn on a light or other item for a period of time? Or some other program method?

 

The options can be a bit broader than this, but if you have a program condition who's status will be changed by the program execution, then, yes, it is often best and easiest to break these into two programs.  If your execution has no WAIT statements or REPEATs, then it matters less to break them into two programs.

Link to comment

tdroney

 

It is not that simple.  The need for two programs was dictated by the Program changing the Status of one of the conditions in the If section along with having a Wait in the Then clause.

 

A Motion Sensor driven Program might want the logic in one program.

 

If Control 'MotionSensor-Sensor' is switched On

Then

   Set 'xxxxx' On

   Wait 5 minutes

   Set 'xxxxx' Off

Else

 

In this case each new motion sensed before the 5 minutes is over sets a new 5 minute period.   Device 'xxxxx' turns Off after the last motion sensed.  This case needs the logic in one Program.

 

The requirements determine how the logic is implemented and how many Programs are used.

Link to comment

Archived

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


×
×
  • Create New...