Author |
|
jeffw_00 Super User
Joined: June 30 2007
Online Status: Offline Posts: 929
|
Posted: December 17 2007 at 22:41 | IP Logged
|
|
|
Hi - Just thought I'd pass along what I think is a neat trick. I've been wanting to replace my maxi-controllers with something Insteon. THe 2-KPL in a box has it drawbacks - tiny buttons with tiny labels, a bit unstable on the desktop, ugly when surface mounted on the wall (all my controllers are either tabletop or on wall), and $170 for 16 buttons (2 units with tabletop box and clear buttons).
So I decided to make Controllinc do it. As you know, Controllinc has 10 programmable buttons. Using the awesome power of Powerhome (unpaid plug), I first tried assigning one device to each button, with single-press meaning on, and double-press meaning off. (No, Controllinc doesn't support double-press, but PH can detect it). Then, I defined 2 third-row of devices, for which triple-press on the upper row turned the device on, and triple-press on the lower row turned it off (so there were 3 devices listed in the display between a vertical pair of buttons, the one assigned to 1- and 2- press on upper, the triple-press, and the one assigned to 1,2 press on lower).
Ultimately this turned out unsatisfactory. It gave me only 15 devices, and because PH had to wait 3 seconds after the first press to see how many more times you were going to press, it was unergonomic because you had to rush to press the button, and/or wait to see the action happen, so WAF was low. Also, absent the plastic cover from the Maxi-controller, ANYONE could press a button.
So i came up with something better.
The top-left button is now called the "GO" button. It's a prefix to any command. You press the GO button 1,2,3,or 4 times, and then press another button. So each of the 9 other buttons has up to 4 actions associated with it. To make it simple, each button has 2 devices associated with it and the actions work the same:
GO x 1 + button = device 1 on
GO x 2 + button = device 1 off
GO x 3 + button = device 2 on
GO x 4 + button = device 2 off
The "device 2"s are typically devices that are rarely controlled from a keypad, so that most of the time you hit GO once or twice (once for on, twice for off), and then select your devices.
advantages:
1) pressing a random button has no effect on anything.
2) no requirement to do multiple presses within a fixed time window
3) no waiting, action happens immediately upon your last press.
It's not perfect, and not for guests (as the paradigm requires a one-time explanation), but I think once you "get it" it's pretty intuitive.
Here's the code...
First - you have to define a Go-count global variable for every keypad.
Second, you need a trigger for every button of every keypad.
The Trigger for a given key would trigger a macro with one line...
MACRO: CLnON or CLnOFF (Controlinc button n on or off)
There are 9 of these macros, one for each key. Each macro looks like:
ph_macroparm("MULTIPRESS","MACRO1","MACRO2","MACRO3","MACRO4 ","[LOCAL1]")
Where MACROn = what macro to run if the Go button was pressed n times, and
[LOCAL1] is the global variable specific to this controllinc keypad (passed down from the trigger)
[The CLn level of indirection allows multiple keypads to use the same key definitions]
MACRO: MULTIPRESS looks like what's shown below - it simply executes the correct macro depending
on the number of times GO was previously pressed.
insert into macroheader values ('MULTIPRESS','Generic Multipress',0,0,1);
insert into macrodetail values ('MULTIPRESS',1,38,'',0,'ph_killmacrowait("GOCLEAR")',0,'');
insert into macrodetail values ('MULTIPRESS',2,16,'',NULL,'if(ph_getglobal_n("[LOCAL5]") = 0,999,1)',0,'');
insert into macrodetail values ('MULTIPRESS',3,16,'',NULL,'if(ph_getglobal_n("[LOCAL5]") = 1, 1, 3) ',0,'');
insert into macrodetail values ('MULTIPRESS',4,38,'',0,'ph_macroparm("[LOCAL1]",1,0,0,0,0)',0,'');
insert into macrodetail values ('MULTIPRESS',5,16,'',NULL,'9',0,'');
insert into macrodetail values ('MULTIPRESS',6,16,'',NULL,'if(ph_getglobal_n("[LOCAL5]") = 2, 1, 3) ',0,'');
insert into macrodetail values ('MULTIPRESS',7,38,'',0,'ph_macroparm("[LOCAL2]",1,0,0,0,0)',0,'');
insert into macrodetail values ('MULTIPRESS',8,16,'',NULL,'6',0,'');
insert into macrodetail values ('MULTIPRESS',9,16,'',NULL,'if(ph_getglobal_n("[LOCAL5]") = 3, 1, 3) ',0,'');
insert into macrodetail values ('MULTIPRESS',10,38,'',0,'ph_macroparm("[LOCAL3]",1,0,0,0,0)',0,'');
insert into macrodetail values ('MULTIPRESS',11,16,'',NULL,'3',0,'');
insert into macrodetail values ('MULTIPRESS',12,16,'',NULL,'if(ph_getglobal_n("[LOCAL5]") = 4, 1, 2) ',0,'');
insert into macrodetail values ('MULTIPRESS',13,38,'',0,'ph_macroparm("[LOCAL4]",1,0,0,0,0)',0,'');
insert into macrodetail values ('MULTIPRESS',14,38,'',0,'ph_setglobal_a("[LOCAL5]",0)',0,'');
Three other macros needed:
MACRO: CL1ON (triggered by the go button)
one line -
ph_macroparm("GOBUTTON","[LOCAL1]",0,0,0,0)
where [LOCAL1] is defined as for the other CLnON macros above
MACRO: GOBUTTON - increments the keypad-specific counter variable, and when the variable is
incremented the first time, it also fires the timeout (GOCLEAR)
insert into macroheader values ('GOBUTTON','Go Button',0,0,1);
insert into macrodetail values ('GOBUTTON',1,38,'',0,'ph_addtoglobal("[LOCAL1]",1)',0,'');
insert into macrodetail values ('GOBUTTON',2,16,'',NULL,'if(ph_getglobal_n("[LOCAL1]") >4, 1,3) ',0,'');
insert into macrodetail values ('GOBUTTON',3,38,'',0,'ph_setglobal_a("[LOCAL1]",0)',0,'');
insert into macrodetail values ('GOBUTTON',4,16,'',NULL,'999',0,'');
insert into macrodetail values ('GOBUTTON',5,16,'',NULL,'if(ph_getglobal_n("[LOCAL1]") =1, 1,999) ',0,'');
insert into macrodetail values ('GOBUTTON',6,38,'',0,'ph_macroparm("GOCLEAR","[LOCAL1]",0,0,0,0)',0,'');
MACRO GOCLEAR:
insert into macroheader values ('GOCLEAR','Delayed Clear of Go Count',0,0,1);
insert into macrodetail values ('GOCLEAR',1,31,'',NULL,'12',0,'');
insert into macrodetail values ('GOCLEAR',2,38,'',0,'ph_setglobal_a("[LOCAL1]",0)',0,'');
(note, pressing any non-GO button kills the GOCLEAR macro)
/j
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: December 30 2012 at 14:31 | IP Logged
|
|
|
I just dug out my ControLinc, so, this would be cool.
It seems, though, that there are setup steps that need to be done? I was only getting Group 1 buttons to respond at first, but, those stopped after I started troubleshooting by clearing the PLC and adding everything back.
|
Back to Top |
|
|
jeffw_00 Super User
Joined: June 30 2007
Online Status: Offline Posts: 929
|
Posted: December 30 2012 at 14:37 | IP Logged
|
|
|
Hi Tony - nothing 'special' per se, but i did have to link all 5 buttons from each controllinc.
BTW - I'm still using this system, works very well.
/j
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: December 30 2012 at 15:02 | IP Logged
|
|
|
Did you have to link manually?
|
Back to Top |
|
|
jeffw_00 Super User
Joined: June 30 2007
Online Status: Offline Posts: 929
|
Posted: December 30 2012 at 15:05 | IP Logged
|
|
|
I do all my linking via drag/drop/save in Insteon Explorer. Is there another way? 8-}
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: December 30 2012 at 15:10 | IP Logged
|
|
|
Hmm. That's what I tried doing with no real luck.
|
Back to Top |
|
|
jeffw_00 Super User
Joined: June 30 2007
Online Status: Offline Posts: 929
|
Posted: December 30 2012 at 15:15 | IP Logged
|
|
|
Hi Tony - don't know what to tell you. I don't muck with it that often so I'd have to crack the docs, but you can do that. I do know that I never do "tap" linking, always do it through PH.
I think that AFTER you link it, you have to clear and reload the PLM so it knows that it's an address that it needs to watch.
HTH
/j
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: December 30 2012 at 15:29 | IP Logged
|
|
|
I'm back to seeing the first group of On/Off buttons. Need to figure out how to see the rest.
|
Back to Top |
|
|
jeffw_00 Super User
Joined: June 30 2007
Online Status: Offline Posts: 929
|
Posted: December 30 2012 at 15:32 | IP Logged
|
|
|
Hi Tony - I put a screen shot at
www.kwcpa.com/clinc.pdf
see if that helps.
/j
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: December 30 2012 at 15:42 | IP Logged
|
|
|
Thanks. Do you not have those groups (1-5) in use elsewhere?
|
Back to Top |
|
|
jeffw_00 Super User
Joined: June 30 2007
Online Status: Offline Posts: 929
|
Posted: December 30 2012 at 15:45 | IP Logged
|
|
|
those groups are local to the controller, if I look at my setup for any of my other 5 keypads it looks the same.
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: December 30 2012 at 15:56 | IP Logged
|
|
|
Wonder if that is my problem. I'm already using groups 1-4.
|
Back to Top |
|
|
jeffw_00 Super User
Joined: June 30 2007
Online Status: Offline Posts: 929
|
Posted: December 30 2012 at 15:59 | IP Logged
|
|
|
dont know - in this regard your PH knowledge exceeds mine.
|
Back to Top |
|
|
|
|