Author |
|
Handman Senior Member
Joined: February 02 2009 Location: United States
Online Status: Offline Posts: 229
|
Posted: June 02 2009 at 16:19 | IP Logged
|
|
|
I was wondering how to require multiple triggers before executing a command or macro. I have an insteon KPL and I would like to use it to open a garage. I have an X10 module that can activate the contacts, so now I just need PH to activate the module. Only problem is that I would like to use a sequence on the KPL to activate the module (e.g., A-B-C) like a security code so the door isn't opened accidentally. Is there a way to require multiple triggers "A", then "B", then "C" within 5 seconds to trigger the PH command to the X10 module?
|
Back to Top |
|
|
grif091 Super User
Joined: March 26 2008 Location: United States
Online Status: Offline Posts: 1357
|
Posted: June 02 2009 at 17:23 | IP Logged
|
|
|
Powerhome has so many facilities that there are almost always multiple ways of doing something, You can set a Global variable representing the press time of button A. The now() function provides current time down to the millisecond. Button B press can check the time in Global variable set by button A press to be sure button B press is within x seconds of button A. If true, set a Global variable representing the time button B was pressed. When button C is pressed it checks the value in the Global variable representing when button B was pressed. If button C press is within x seconds of button B press, do your X10 command. If any of the conditions are false or if button C press is valid, reset the two Global variables representing button A and button B press time so the process can start over.
You would put the three KPL buttons in non-toggle mode so the buttons give the same command and it is not necessary to press each button again to turn off the LED.
I am certain there are many other ways to do this.
__________________ Lee G
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: June 02 2009 at 23:00 | IP Logged
|
|
|
Hmmm...as Lee stated, alot of ways to accomplish this. Im just trying to think of the easiest way.
While I havent actually tried this but this may work. Say you want a combination of 3 buttons to trigger the garage door. I would create a trigger for each button. To keep it simple, lets say the sequence is ABC. I would have the trigger for A enabled and the triggers for B and C disabled. I would have the action for A that disables trigger A and enables trigger B. I would also have the action launch a macro that waits for 5 seconds (or however long you want). The action for trigger B will disable trigger B and enable trigger C. The action for trigger C will open the garage door, kill the waiting macro, disable trigger C and enable trigger A. The last part of the solution is that when the macro wait expires, it enables trigger A and disables triggers B and C.
There may be a simpler way but I think this would be fairly painless to implement.
HTH,
Dave.
|
Back to Top |
|
|
Handman Senior Member
Joined: February 02 2009 Location: United States
Online Status: Offline Posts: 229
|
Posted: June 03 2009 at 01:03 | IP Logged
|
|
|
Dave, your method worked like a charm. I am certain Lee's would work too, but now I can delay dealing with Global
Variables for a little longer! Now I just have to figure out why the X10 signal is not getting all the way from my PLM to the gate opener. I used to have all Insteon stuff and no X10, but the X10 is soooo much more affordable. The signal is probably getting sucked up somewhere in transit. Nothing a little time and money can't fix!
|
Back to Top |
|
|