Jump to content

Anything wrong with this technique?


Recommended Posts

Posted
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'

 

 

 


 

 

Posted

Due to the sequential execution of statements, you may want to have the light turned on first.

Posted

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')

 

?

Posted

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.

Posted

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

Posted

TexMike, you are correct. A second program is needed if you want to disable and enable a program.

Posted

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.

Posted

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?

Posted

My concern was wrt/oberkc's post, one program or two?

Posted

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.

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)

  • Forum Statistics

    • Total Topics
      37k
    • Total Posts
      371.4k
×
×
  • Create New...