Jump to content

Program flow question


wwat

Recommended Posts

Hi,

 

The program Main Bath Light Initialize calls program Main Bath Light Timer when the 'If' conditions are met.

Once the 1 minute 'Wait' function is activated I would have thought that as soon as any of those 'If' conditions in the timer program evaluate to false it would break out of the 'Wait' function.

If the light is manually operated and still on, the initialization program should not run again until the light is switch off.

 

The problem is that the timer program continues in the wait state even if the Switchlink is manually operated. I had this working previously when I was using programs to control everything but now I've incorporated 'Scenes' I can't get it to work.

 

Note:

The initialization program is enabled and the timer is not.

The Switchlink and motion sensor are in a scene as controllers.

 

Thanks,

Wayne

 

 

Program Name: Main Bath Light Initialize (Enabled)

If
   Control 'Main Bath MS - Sensor' is switched On
   And Status  'Main Bath SL - Light' is Off
   And Folder  'Main Bath - Day' is False

Then
       Run Program 'Main Bath Light Timer' (If)

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

 

 

Program Name: Main Bath Light Timer (Disabled)

If
       Control 'Main Bath SL - Light' is not switched On
   And Control 'Main Bath SL - Light' is not switched Off
   And Control 'Main Bath SL - Light' is not switched Fast On
   And Control 'Main Bath SL - Light' is not switched Fast Off
   And Control 'Main Bath SL - Light' is not switched Fade Up
   And Control 'Main Bath SL - Light' is not switched Fade Down
   And Control 'Main Bath SL - Light' is not switched Fade Stop
   And Control 'Main Bath SL - Light' is not switched Bright
   And Control 'Main Bath SL - Light' is not switched Dim

Then
       Wait  1 minute 
       Set 'Main Bath SL - Light' Off

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

Link to comment
Why is your timer program disabled? This is why your switchlink actions won't cause the wait to terminate. Looks like all you need to do is enable that program so it sees the control events.

 

Hi Markens,

 

If that program is set as 'Enabled', then it would run every time the Switchlink was manually operated which is not what I want. I only want it to run if its called by the initalization program.

 

If I'm wrong in how this works please let me know.

 

Thanks.

Link to comment
If that program is set as 'Enabled', then it would run every time the Switchlink was manually operated which is not what I want. I only want it to run if its called by the initalization program.

There are two different things happening here. Your disabled program does run when "manually" invoked by the initialization program. Since it is invoked via the IF clause, those conditions are evaluated and the resulting (THEN) part is run. And it waits. Presumably as you want.

 

The problem is that the disabled program does NOT see the switch events when not manually called (even if it is already running via the previous invocation). The program must be enabled to allow the switch events to (re)start the program and evaluate the conditions. So, you'll need to come up with some other way to enable those events when desired. (Sorry, no suggestions on that part.)

Link to comment

Archived

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


×
×
  • Create New...