rlanza1054 Posted October 5, 2015 Posted October 5, 2015 Hi all, Tonight I was trying to control only one of the 8 led lights on my 8 button Keypadlinc. When I attempted through a program to SET the Keypadlinc Button Key F on, all 8 buttons LED's turned on or off. I could not get that individual F key button to be control by itself. Then I tried to look up the answer in the Wiki and if I am reading it correctly, I just need to create a scene with just the F Key from the Keypadlinc in the Scene, I guess as a controller, nothing else? And just have the program control the scene not the keypadlinc itself. Or do I need to change the default setting for the Button Group? The button group settings info seems to just control how a key is handled when tapped for example as a toggle, on only, off only, that sort of thing, nothing really to do with the individual led? I want to turn on the LED when I run a program, right now with no program or scene assigned to the individual key. When I tap the key ON, the LED for that key turns on and turns off with the second tap of the that key. I want my program to turn on wait a second then turn it off, repeatedly until a RUN THEN program (another program) finished. I could merge what that other program does into this program. The other program reboots both my cable modem and my router (the both are located in two different rooms), The reboot program turns off the cable modem and then turns off the router, then the program waits 1 minutes, after that minute, it turns back on the cable modem, then waits 2 minutes, after that 2 minutes, it turns back on the router. That program is run every day at 6am. Its been running just the way I wanted it to. But there are cases where I want to run the program manual (not from the ISY console which I am forced to do now) from just one tap of a particular keypadlinc key (in this case key F), so while I am waiting for those total 3 minutes, I want the LED on KEY F to slowly flash or turn on and off repeatedly (the interval between the on and off I'm not too picky with, I'm not looking for a strobe light effect) until the 3 minutes is over, then just turn off the LED of key F when its all done. Thanks Rob
stusviews Posted October 5, 2015 Posted October 5, 2015 It is not possible to control a single button's LED brightness as there's only one circuit that adjusts the brightness of all the LEDs. You can, however, create a scene with only one button as a responder and use a program to alternately turn the button on and off.
rlanza1054 Posted October 5, 2015 Author Posted October 5, 2015 (edited) It is not possible to control a single button's LED brightness as there's only one circuit that adjusts the brightness of all the LEDs. You can, however, create a scene with only one button as a responder and use a program to alternately turn the button on and off. Thanks Stusviews, So the individual LED of Keypadlinc is able to be turned on and off only through a scene, not by doing some SET command to the Keypadlinc. I'll try it out, it does seems a little strange that it has to be done like that, but I its because other than Key A (which is what the load is controlled by) the other keys are just sudo (couldn't think of another word to describe it) scene buttons. Rob Update: Should I add the key as a responder or a controller? Edited October 5, 2015 by rlanza1054
LeeG Posted October 5, 2015 Posted October 5, 2015 The Program Action is a Set Scene Then Set Scene 'kplbuttonCresponder' On - turns button C On Set Scene 'kplbuttonCresponder' Off - turns button C Off
MWareman Posted October 5, 2015 Posted October 5, 2015 Update: Should I add the key as a responder or a controller? Responder... The scene should have no controller and only the KPL button as a responder.
stusviews Posted October 5, 2015 Posted October 5, 2015 Add the button to the scene as a responder. You could add it as a controller, but since it's the only member of the scene, there's nothing to control. You can't control the secondary buttons without a scene because each button is a different group of the same Insteon ID and the ISY can only control Group 1 with a direct command. BTW, I have several scenes where the only member is a KPL button.
rlanza1054 Posted October 6, 2015 Author Posted October 6, 2015 (edited) Add the button to the scene as a responder. You could add it as a controller, but since it's the only member of the scene, there's nothing to control. You can't control the secondary buttons without a scene because each button is a different group of the same Insteon ID and the ISY can only control Group 1 with a direct command. BTW, I have several scenes where the only member is a KPL button. Hi, One more question: I want to REM out a line of code to test other parts of the code, is that function available, besides disabling the entire program? If not, I think I would like to ask that it be considered for version 5.0. Ok, here is what I did, I did not test it yet. I added a 'comment' to the program to describe what I am attempting to do. I did read in the wiki that it does need to be placed into the scene as a responder and not a controller in most cases. I wanted to have this function placed on a spare key of all 4 Keypadlincs, all got entered into the scene as a responder. Here it is: Modem/Router Reboot Key - [iD 0030][Parent 0001] If Control 'Live Couch Keypad - A / Live Reset Keypad - F' is switched On Or-( | Control 'Junk Keypad - A / Junk Reset Keypad - D' is switched On -) Or-( | Control 'Bedl-L Night Table Keypad A / Bed-L Reset Keypad - F' is switched On -) Or-( | Control 'Bed-R Night Table Keypad A / Bed-R Reset Keypad F' is switched On -) Then Set Scene 'Cable-Router Reset Scene' On <========= This is the scene created that contains all the Keypadlincs that were entered as responders. Wait 1 second Set Scene 'Junk Router Key F Scene' Off <========= This is the scene that is tied to Router On/Off Module - It turns the router off. Wait 1 second Set Scene 'Cable-Router Reset Scene' Off Wait 1 second Set Scene 'Cable-Router Reset Scene' On Wait 1 second Set 'Foyer Outlet Bot On-Off' Off <========= This is the Cable Modem, it is not tied to any scene, its direct control of bottom outlet - It turns the cable modem off. And then we wait 3 minutes approximate before turning anything back on, Wait 1 second Set Scene 'Cable-Router Reset Scene' On Repeat 6 times Wait 5 seconds Set Scene 'Cable-Router Reset Scene' Off Wait 5 seconds Set Scene 'Cable-Router Reset Scene' On Repeat 1 times Wait 5 seconds Set 'Foyer Outlet Bot On-Off' On Repeat 6 times Wait 5 seconds Set Scene 'Cable-Router Reset Scene' Off Wait 5 seconds Set Scene 'Cable-Router Reset Scene' On <========= This turns the Cable Modem back on. And we wait 3 minutes approximate before turning back on router Repeat 1 times Wait 5 seconds Set Scene 'Junk Router Key F Scene' On <========= This turns the Router back on. Set Scene 'Cable-Router Reset Scene' Off <========= Finally finished program and making sure LED is turned off. Else - No Actions - (To add one, press 'Action') This program is supposed to reboot both my cable modem and my router, both are physically located in different rooms. It is a way to activate manually via a particular key on a Keypadlinc. (Note: I have an automated program that does this function every night at 6am). This program doesn't just get activated from a key on Keypadlinc, it other purposewhile it is running is to flash (turn on and then off) the LED of that particular key. It does this by using multiple REPEAT and WAIT statements. I wanted to wait 3 minutes after turning off the cable modemand router before turning everything back on. I then wanted to wait another 3 minutes between the cable modemturning back on and the router being turned back on. While waiting for those minutes to be over I wanted the LED ofthe Keypadlinc to flash (turn on and off) every 5 seconds. I used the REPEAT command to do a on and an off waiting 5 seconds between each, so it is repeated a total 10 times. This repeat is done twice at to different times bringing the total wait timebefore everything is back online to 6 minutes in total for the program to run. END OF program! If there is way to make the code tighter and more efficient please let me know. Thanks Rob UPDATE: Turns out that for some reason, having all the 4 keypadlinc keys in the one scene do not turn on the led of each keypadlinc. I even tried to add them all as controllers and it still would not turn on all the leds. Its strange to me, since I can turn on a on/off switch having two keypadlinc as controllers and both led's on each keypadlinc get turned on. Maybe the reason is because the links are written to a device not the keypadlinc? Edited October 6, 2015 by rlanza1054
SCKoman Posted October 6, 2015 Posted October 6, 2015 The Program Action is a Set Scene Then Set Scene 'kplbuttonCresponder' On - turns button C On Set Scene 'kplbuttonCresponder' Off - turns button C Off Is there a way to do a "blink until ACKnowledge" ? I have the LED blinking every 2 seconds per the set scene (from above hint). But as soon as the USER pushes the button, I'd like it to stop blinking. I have two different programs: 1 that does the 'blinking' and 1 that calls this blink program by a RUN(Then). When the condition (ie button push) occurs, then I'd like the calling program to run the ELSE of the called blink program and it stops and leaves the led on solid. That specific button does not need to be a controller of anything else. The button does not need to do anything else except to be an acknowledge. While I am concerned about the additional Insteon traffic every 2 sec, I'll settle for this for now. Too bad there's no 'local' to device function to do that (?) >>> What I'm having difficulty doing is how to implement into code the 'button' push that performs the ACK and stops the blinking. Any ideas? Thanks so much, I'm stuck because I'm missing some piece of info.
stusviews Posted October 6, 2015 Posted October 6, 2015 Rob, To REM out a line of code Repeat 0 times statement to be REMed out Repeat 1 times
stusviews Posted October 6, 2015 Posted October 6, 2015 SCKoman, Copy and paste your programs here (select the program, right click).
LeeG Posted October 6, 2015 Posted October 6, 2015 SCKoman Posting the Programs as Stu suggests is best. There is nothing that allows for testing of an ACK. A Program can test for both On and Off commands from button press and run the Else. If Control 'buttonx' is switched On Or Control 'buttonx' is switched Off Then Run Program 'xxxxxx' (Else Path)
SCKoman Posted October 6, 2015 Posted October 6, 2015 Thanks, will follow through as you both suggest. To CLARIFY: What I mean by the ACK is that a user (eg Wife) has to acknowledge that alert by pushing the button that is blinking. Other than that, in this case I don't need the button to do anything. Just stop itself from blinking.
SCKoman Posted October 6, 2015 Posted October 6, 2015 OK, here's two of the programs ... I think I have it mostly working. I hope the xml / html paste formatting works ok here. SWGateOPENackwait basically watches for the button push, if the Gate Triggerlinc is ON (gate open). <?xml version="1.0" ?><triggers><d2d><trigger><id>693</id><name>SWGateOPENackwait</name><parent>685</parent><if><and /><device><node>25 AB 2D 1</node><op>!=</op><control>DON</control></device><or /><device><node>25 AB 2D 1</node><op>=</op><control>DOF</control></device><or /><device><node>1B 5E 11 6</node><op>=</op><control>DOF</control></device><or /><device><node>1B 5E 11 6</node><op>=</op><control>DON</control></device></if><then><wait><seconds>6</seconds></wait><runelse>692</runelse><notify content="186">6</notify><notify content="186">2</notify><wait><seconds>2</seconds></wait></then><else><wait><seconds>6</seconds></wait><notify content="41">6</notify><repeat><every><minutes>30</minutes></every></repeat><runthen>692</runthen><notify content="187">2</notify><notify content="187">6</notify></else><comment></comment></trigger></d2d></triggers> Here is the Blink program ... SWGateOPENBlink <?xml version="1.0" ?><triggers><d2d><trigger><id>692</id><name>SWGateOPENBlink</name><parent>685</parent><if></if><then><repeat><for><times>150</times></for></repeat><device><group>4742</group><control>DON</control></device><wait><seconds>2</seconds></wait><device><group>4742</group><control>DOF</control><action>0</action></device><wait><seconds>2</seconds></wait><device><group>4742</group><control>DON</control></device><wait><seconds>2</seconds></wait><device><group>4742</group><control>DOF</control><action>0</action></device><wait><seconds>2</seconds></wait><device><group>4742</group><control>DON</control></device><wait><seconds>2</seconds></wait><device><group>4742</group><control>DOF</control><action>0</action></device><wait><seconds>2</seconds></wait></then><else><device><group>4742</group><control>DON</control></device><wait><seconds>2</seconds></wait></else><comment>10/05/2015 - Blinks LED every 2 sec for 30 minutes </comment></trigger></d2d></triggers>
rlanza1054 Posted October 7, 2015 Author Posted October 7, 2015 Rob, To REM out a line of code Repeat 0 times statement to be REMed out Repeat 1 times Wow! Your the man! Thanks! I discovered some other problem, but I want to finish reading the rest of the posts first! Had to run to the dentist yesterday, where they pulled my tooth, my whole side of my face blew up. It got infected! Rob
rlanza1054 Posted October 7, 2015 Author Posted October 7, 2015 (edited) OK, here's two of the programs ... I think I have it mostly working. I hope the xml / html paste formatting works ok here. SWGateOPENackwait basically watches for the button push, if the Gate Triggerlinc is ON (gate open). <?xml version="1.0" ?><triggers><d2d><trigger><id>693</id><name>SWGateOPENackwait</name><parent>685</parent><if><and /><device><node>25 AB 2D 1</node><op>!=</op><control>DON</control></device><or /><device><node>25 AB 2D 1</node><op>=</op><control>DOF</control></device><or /><device><node>1B 5E 11 6</node><op>=</op><control>DOF</control></device><or /><device><node>1B 5E 11 6</node><op>=</op><control>DON</control></device></if><then><wait><seconds>6</seconds></wait><runelse>692</runelse><notify content="186">6</notify><notify content="186">2</notify><wait><seconds>2</seconds></wait></then><else><wait><seconds>6</seconds></wait><notify content="41">6</notify><repeat><every><minutes>30</minutes></every></repeat><runthen>692</runthen><notify content="187">2</notify><notify content="187">6</notify></else><comment></comment></trigger></d2d></triggers> Here is the Blink program ... SWGateOPENBlink <?xml version="1.0" ?><triggers><d2d><trigger><id>692</id><name>SWGateOPENBlink</name><parent>685</parent><if></if><then><repeat><for><times>150</times></for></repeat><device><group>4742</group><control>DON</control></device><wait><seconds>2</seconds></wait><device><group>4742</group><control>DOF</control><action>0</action></device><wait><seconds>2</seconds></wait><device><group>4742</group><control>DON</control></device><wait><seconds>2</seconds></wait><device><group>4742</group><control>DOF</control><action>0</action></device><wait><seconds>2</seconds></wait><device><group>4742</group><control>DON</control></device><wait><seconds>2</seconds></wait><device><group>4742</group><control>DOF</control><action>0</action></device><wait><seconds>2</seconds></wait></then><else><device><group>4742</group><control>DON</control></device><wait><seconds>2</seconds></wait></else><comment>10/05/2015 - Blinks LED every 2 sec for 30 minutes </comment></trigger></d2d></triggers> SCKoman, The paste came in with all the html code, here is how I get the program pasted into these forum messages without all that stuff; In the ISY admin console, go to your program and select it, then right click (not sure if your using a mac) and select at the bottom of the drop down menu: 'COPY TO CLIPBOARD', then just paste it into the message your composing. It comes in without all the html code wrapped into it. Rob Edited October 7, 2015 by rlanza1054
rlanza1054 Posted October 7, 2015 Author Posted October 7, 2015 Rob, To REM out a line of code Repeat 0 times statement to be REMed out Repeat 1 times Stusviews, I discovered after making all these crazy changes that one of my Keypadlinc's was out of whack. It wasn't responding to anything I did, so I kept changing the program thinking I did something wrong. I started to look at the other Keypadlincs and they were working. So when I realized that it was the device and not what I was writing, I re-wrote the whole thing all over again, much simpler. To fix that Keypadlinc, instead of doing a factory reset in the device which would be more work, I just did a 'restore device'. That seems to have fixed the problem. Its funny because with all the problems I've had over the past 4 months getting everything installed and setup, it seems that this particular Keypadlinc is always at the center of my issues. Its quite possible that its a defective unit. I wonder how long the warranty is on the Keypadlinc, maybe I should ask for a replacement now. I was about to show you this long crazy program I did. Which did work! But after fixing the Keypadlinc, I got the program very tight and ended up breaking it into two programs. I still need to test it out to see if it works the way I want. But now that you told me how to REM something out, it will be easier to test it. Modem/Router Reboot Key1 - [iD 0030][Parent 0001][Not Enabled] If ( Control 'Live Couch Keypad - A / Live Router Keypad - F' is switched On ) Or ( Control 'Junk Keypad - A / Junk Router Keypad - F' is switched On ) Or ( Control 'Bedl-L Night Table Keypad A / Bed-L Router Keypad - F' is switched On ) Or ( Control 'Bed-R Night Table Keypad A / Bed-R Router Keypad F' is switched On ) Then Set 'Junk Router Switch On-Off' Off Wait 1 second Set 'Foyer Outlet Bot On-Off' Off Wait 1 second Run Program 'Modem/Router Reboot Key2' (Then Path) Wait 3 minutes Set 'Foyer Outlet Bot On-Off' On Wait 3 minutes Set 'Junk Router Switch On-Off' On Stop program 'Modem/Router Reboot Key2' Set Scene 'Reset Modem-Router' Fast Off Else - No Actions - (To add one, press 'Action') Modem/Router Reboot Key2 - [iD 002F][Parent 0001][Not Enabled] If - No Conditions - (To add one, press 'Schedule' or 'Condition') Then Repeat 6 times Set Scene 'Reset Modem-Router' Fast On Wait 5 seconds Set Scene 'Reset Modem-Router' Fast Off Wait 5 seconds Set Scene 'Reset Modem-Router' Fast On Wait 5 seconds Set Scene 'Reset Modem-Router' Fast Off Wait 5 seconds Set Scene 'Reset Modem-Router' Fast On Wait 5 seconds Set Scene 'Reset Modem-Router' Fast Off Wait 5 seconds Set Scene 'Reset Modem-Router' Fast On Wait 5 seconds Set Scene 'Reset Modem-Router' Fast Off Wait 5 seconds Set Scene 'Reset Modem-Router' Fast On Wait 5 seconds Set Scene 'Reset Modem-Router' Fast Off Wait 5 seconds Set Scene 'Reset Modem-Router' Fast On Wait 5 seconds Set Scene 'Reset Modem-Router' Fast Off Wait 5 seconds Set Scene 'Reset Modem-Router' Fast On Wait 5 seconds Set Scene 'Reset Modem-Router' Fast Off Else - No Actions - (To add one, press 'Action') This program is supposed to reboot both my cable modem and my router, both are physically located in different rooms. It is a way to activate manually via a particular key on a Keypadlinc. (Note: I have an automated program that does this function every night at 6am). I do realized that if I increase the amount repeats, I could remove most of the turn ons and turn offs, I just was trying to get it to repeat for as long as it took to finish up doing the rebooting in the first program. Its about 6 minutes or so. When I test it out, I can see what happens and adjust the second program (which is what is flashing the LED's on the 4 Keypadlincs! I'm not worried about traffic, because these two programs will never be used that much. I just wanted to give myself an easier way of doing the reboots manually. Rob
stusviews Posted October 7, 2015 Posted October 7, 2015 Modem/Router Reboot Key2 - [iD 002F][Parent 0001][Not Enabled] If - No Conditions - (To add one, press 'Schedule' or 'Condition') Then Repeat 6 times Set Scene 'Reset Modem-Router' Fast On Wait 5 seconds Set Scene 'Reset Modem-Router' Fast Off . . . I'm not worried about traffic, because these two programs will never be used that much. I just wanted to give myself an easier way of doing the reboots manually. Add a controller (e.g., KPL button) to the If section. That will not affect your ability to call the Then section from a program.
rlanza1054 Posted October 8, 2015 Author Posted October 8, 2015 (edited) Add a controller (e.g., KPL button) to the If section. That will not affect your ability to call the Then section from a program. Program 1, its labeled 'Modem/Router Reboot Key1' has the Keypadlinc button, if I add it to this program all that would happening is the flashing or blinking of the LED. Program 1 called this program to run with a 'RUN THEN' command. And also what is in program 1 is a 'STOP Program' command which will halt this program (program 2) from causing the LED to continue blinking. Still haven't found the time to run the test, but I got the REM stuff added because of you. That way I'm not turning off my cable modem and router needlessly. Rob UPDATE: After mulling over your suggestion a day later, your right I could add the IF for the Keypadlinc key control in the second program. I could add the complete reboot sequence in one program, that was the way I had it originally. So I could test with the IF in program 2 and then just call in Program 1. Either way should work fine. I never had a chance to test it out, instead I kept hitting the key by accident; wondering why it was flashing because I thought I DISABLED both programs. I had modified program 1 with the REM function you told me how to do, and ENABLED program 1. So my modem and router never turned off which is good, because it meant the REM function was working. It is working since it kept blinking because of accidentally hitting key as I was removing the key and replacing it with a different colored diffuser and new custom label. I'm still trying to figure out how to light up a key led when the isy encounters an error? Not sure it can be done. Rob Edited October 11, 2015 by rlanza1054
Recommended Posts