Jump to content

does disabling a running program make it stop?


someguy

Recommended Posts

Here is the program called "Hearth Flashes Gym 1":

 

If
       From     5:00:00AM
       To      10:00:00AM (same day)
   And Status  'Gym-1-Light by TV' is On
   And Control 'Hearth-7a-MotionSensor' is switched On

Then
       Set 'Gym-1-Light by TV' Off
       Set 'Gym-1-Light by TV' On
       Disable Program 'Hearth Flashes Gym 1'
       Wait  1 hour 
       Enable Program 'Hearth Flashes Gym 1'

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

 

I'm wanting the motion sensor to flash the light once and then not flash the light again for another hour.

 

If the program diables itself, will it continue to run and then enable itself in an hour?

Link to comment

Seems to me if a program disables itself, it will require either manually enabling it or another program to enable it before it can run again.

 

Here is the program called "Hearth Flashes Gym 1":

 

If
       From     5:00:00AM
       To      10:00:00AM (same day)
   And Status  'Gym-1-Light by TV' is On
   And Control 'Hearth-7a-MotionSensor' is switched On

Then
       Set 'Gym-1-Light by TV' Off
       Set 'Gym-1-Light by TV' On
       Disable Program 'Hearth Flashes Gym 1'
       Wait  1 hour 
       Enable Program 'Hearth Flashes Gym 1'

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

 

I'm wanting the motion sensor to flash the light once and then not flash the light again for another hour.

 

If the program diables itself, will it continue to run and then enable itself in an hour?

Link to comment
If the program diables itself, will it continue to run and then enable itself in an hour?

I found myself wondering about this a few days ago as well, and this question motivated me to check it out. The answer: Disabling a program causes it to terminate if it is running. So a program can't disable itself and expect to continue running.

 

Here's the test program I used, called LR Lamp 4:

 

If
       X10 'H4/On (3)' is Received
   And X10 'H4/Off (11)' is not Received

Then
       Set Scene 'LR Lamp' On
       Disable Program 'LR Lamp 4'
       Wait  10 seconds
       Enable Program 'LR Lamp 4'

Else
       Set Scene 'LR Lamp' Off

 

 

It was pretty obvious watching in the Program Summary pane of the admin console that the program stopped running immediately after the Scene turned on, at the same time it was disabled.

 

--Mark

Link to comment

One caveat....

 

If a program is running and in the process, it has turned something on, disabling that program will not turn it off.

 

For instance, if my irrigation program starts running and I then disable it, the irrigation continues to run until I manually turn it off. If you were to write a program to turn off the irrigation, you would first tell it to disable the program and then turn off all zones, one by one.

 

The same is true if you have a program that turns on lights or changes the set point on a thermostat. Disabling the program will not return the device to its native state.

Link to comment

Archived

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


×
×
  • Create New...