Jump to content

how to: nested conditions and more advanced seq programming


bwbeisne

Recommended Posts

Posted

Hi. I've been trying to add a some new functionality to my install. I have a 5 button keypad link. One button is labeled Panic. The intent is to trigger a program called 'all lights on'. This is easy and works fine. I want to have a coded exit point for this panic state that requires something like the following. A simple toggle of one button is fine but ultimately I want to incorporate a second button. If you guys can show me how to get this working I can go from there. Tia.

 

'Panic Exit Program'

Master Light.C is switched OFF

wait for Master Light.C = ON

wait for Master Light.C = OFF

THEN

Run > Panic Exit Program

 

I find it difficult sometimes in this environment to accomplish tasks that should be really easy. Am I the only one? Motion for instance, what a nightmare. I've given up using the ISY for this and just have them directly linked. It always seems to come back to nesting limitations. Thoughts?

Posted
I find it difficult sometimes in this environment to accomplish tasks that should be really easy. Am I the only one? Motion for instance, what a nightmare. I've given up using the ISY for this and just have them directly linked. It always seems to come back to nesting limitations. Thoughts?

 

No, I dont find this overly difficult. One must, however, pay attention to things beyond ISY programs, to include the relationships to sceces and configuration of the motion sensor.

 

Your panic exit, however, seems a bit more complicated. I suspect this will take a combination of several programs. The use of a variable may be the most viable approach.

 

In what status do you expect master.light c to be after panic is initiated? How long do you want to wait between the individual toggles of button c before failing to recognize the sequence?

Posted

[Edit]See next post which does the same thing with a variable instead of enabling/disabling programs[/Edit]

 

I would attempt to do this with a different program to represent each state, and a timer program to timeout each state, and reset the state machine.

The state machine would be controlled by enabling/disabling the programs:

 

State 1: (normally enabled)

If
       Control 'Master Light.C' is switched Off

Then
       Run Program 'Master Light Timeout' (Then Path)
       Enable Program 'State 2'
       Disable Program 'State 1'

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

 

State 2: (normally disabled)

If
       Control 'Master Light.C' is switched On

Then
       Run Program 'Master Light Timeout' (Then Path)
       Enable Program 'State 3'
       Disable Program 'State 2'

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

 

State 3: (normally disabled)

If
       Control 'Master Light.C' is switched Off

Then
       Stop Program 'Master Light Timeout'
       Run Program 'Panic Exit' (Then Path)
       Enable Program 'State 1'
       Disable Program 'State 3'

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

 

Master Light Timeout: (always disabled)

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

Then
       Wait 2 Minutes
       Disable Program 'State 2'
       Disable Program 'State 3'
       Enable Program 'State 1'
Else
  - No Actions - (To add one, press 'Action')

Posted

Ah ... cross posted with oberkc ... he is probably right ... might be easier done with a variable ....

 

State 1:

If
       Control 'Master Light.C' is switched Off
   And $i.PanicExitState is 1

Then
       Run Program 'Master Light Timeout' (Then Path)
       $i.PanicExitState = 2

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

 

State 2:

If
       Control 'Master Light.C' is switched On
   And $i.PanicExitState is 2

Then
       Run Program 'Master Light Timeout' (Then Path)
       $i.PanicExitState = 3

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

 

State 3:

If
       Control 'Master Light.C' is switched Off
   And $i.PanicExitState is 3

Then
       Stop Program 'Master Light Timeout'
       Run Program 'Panic Exit' (Then Path)
       $i.PanicExitState = 1

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

 

Master Light Timeout: (always disabled)

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

Then
       Wait 2 Minutes
       $i.PanicExitState = 1
Else
  - No Actions - (To add one, press 'Action')

Posted

Ok. In trying this I found one thing I'd like to do. How can I, from a program turn the Master Light.C button back to off. Ie. not lit.

 

I see >Insteon >Set Master Light.C > on 0 / off 0 (backlight level) but this doesn't seem to do anything. I don't understand what the different options here represent

 

on 6 / off 0 etc..

 

I thought it was simply on/off state or led levels for each but they don't do anything. Switch remains the same.

Posted

A KeypadLinc Secondary button must be turned On/Off with a Scene rather than a Direct command. An Insteon Direct On/Off command does not have a placeholder that identifies which button to act on.

 

Define an ISY Scene with KeypadLinc button C as a Responder. Turn the ISY Scene Off to Off button C.

 

EDIT: Backlight level sets the On/Off brightness level of all buttons on the KeypadLinc.

Posted

My response would have been similar to KMan, but I would have included provisions for the sequence to time-out after a certain period. If that intersts you, and if you care to respond to my initial questions, I would be happy to offer a suggested set of commands.

Posted
My response would have been similar to KMan, but I would have included provisions for the sequence to time-out after a certain period. If that intersts you, and if you care to respond to my initial questions, I would be happy to offer a suggested set of commands.

 

:( Thought I did provide a 2 minute timeout on the sequence.

Posted

I was unclear....I would probably include short wait periods for each keystroke, reverting back to the beginning if not executed on time.

Posted

lol ... I thought that's what I provided ... I just chose 2 minutes for the timeout.

 

I *think* the programs I provided will restart the sequence if the next keystroke isn't pressed within 2 minutes.

 

I was thinking that the "Run Program 'Master Light Timeout' (Then Path)" statements would re-start the 2 minute timeout each time a keystroke was pressed. But honestly I don't know if it works like that.

Posted
I was thinking that the "Run Program 'Master Light Timeout' (Then Path)" statements would re-start the 2 minute timeout each time a keystroke was pressed. But honestly I don't know if it works like that.

 

I think you are correct. It would work like you describe. I did not look close enough earlier, I guess.

Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

    • There are no registered users currently online
  • Forum Statistics

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