Jump to content

Anything wrong with this technique?


Recommended Posts

Still a bit of a noob (few weeks with ISY). Anything wrong with temporarily disabling a program for a motion sensor so as not to get repeated alerts for a time period. The programs below work, I'm just wondering if it's a good technique or any pitfalls. 

 

Thanks

 

 

Away Motion

 

If

        $Away is 1

    And 'Entry motion E11' Status is On

 

Then

        Send Notification to 'SMS Mike' content 'Open while away'

        Set 'Entry RC xceiver Can light E9' On

        Set 'Chime E16' On

        Run Program 'Enable entry motion' (Then Path)

        Disable Program 'Away Motion'

 

Else

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

 

 


Enable entry motion

 

If

   - No Conditions - (To add one, press 'Schedule' or 'Condition')

 

Then

        Wait  1 minute and 30 seconds

        Set 'Entry RC xceiver Can light E9' Off

        Enable Program 'Away Motion'

 

 

 


 

 

Link to comment

I am not certain what you want these programs to do, but I see nothing inherently "wrong" with your programs.  If it works, even better.

 

As far as technique, why did you choose to split these two programs?  What about:

 

If
        $Away is 1
    And 'Entry motion E11' Status is On
 
Then
        Send Notification to 'SMS Mike' content 'Open while away'
        Set 'Entry RC xceiver Can light E9' On
        Set 'Chime E16' On
        Disable Program 'Away Motion'
        Wait  1 minute and 30 seconds
        Set 'Entry RC xceiver Can light E9' Off
        Enable Program 'Away Motion'
 
Else
   - No Actions - (To add one, press 'Action')

 

?

Link to comment

I am not certain what you want these programs to do, but I see nothing inherently "wrong" with your programs.  If it works, even better.

 

As far as technique, why did you choose to split these two programs?  What about:

 

If
        $Away is 1
    And 'Entry motion E11' Status is On
 
Then
        Send Notification to 'SMS Mike' content 'Open while away'
        Set 'Entry RC xceiver Can light E9' On
        Set 'Chime E16' On
        Disable Program 'Away Motion'
        Wait  1 minute and 30 seconds
        Set 'Entry RC xceiver Can light E9' Off
        Enable Program 'Away Motion'
 
Else
   - No Actions - (To add one, press 'Action')

 

?

A program will not execute further lines after a Wait program  line, and disabling itself. Control has to be passed to another program during the disabled period.

Link to comment

Yep, learned early on through trial and error and reading the forums about the nuances of the wait command. As I understand the wait command also causes a reevaluation of the program execution status. My question was just about the technique of disabling/re-enabling a program within a program. In my short time, I haven't seen it used a lot in the forum examples. 

 

Guess I should turn the light on first and get it on a fraction of a second sooner.

 

Thanks for the feedback so far,

 

Mike

Link to comment

A program will not execute further lines after a Wait program  line, and disabling itself. Control has to be passed to another program during the disabled period.

 

Cool.  I did not know that.

 

My question was just about the technique of disabling/re-enabling a program within a program.

 

On the other hand, count me among those who disable and re-enable programs within a program.

Link to comment

On the other hand, count me among those who disable and re-enable programs within a program.

 

You enable and disable a program within itself or you use a second program to disable and enable the first program?

Link to comment

You enable and disable a program within itself or you use a second program to disable and enable the first program?

I have, in the past, disabled programs within their own actions. I dont think I have any of those now, but do have currently programs that disable other programs.

Link to comment

Archived

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


×
×
  • Create New...