AgentAR9 Posted February 25, 2015 Posted February 25, 2015 I have some KPL buttons set up to light up if a window or door is open using Insteon open/close sensors. The button lights up when it is open and goes off whenever it is closed. It's basically just a notification. I have also experimented with using one of the same buttons to activate/deactivate a scene, totally independent of the open/close sensor. Kind of like giving the same button two separate functions. My question is, is there a way to not have the led function when pressing the button to activate/deactivate the scene, but have the led function for the open/close sensor notification? The dual function set up works fine except that when I press the button to activate the scene, the led is on even if the open/close sensor is closed. Thanks
EricK Posted February 25, 2015 Posted February 25, 2015 A couple of ways. Create a scene "Kpl button" and add the Kpl button to the scene as a responder only. Write a program: If control Kpl button is on Then wait 2seconds Set scene "Kpl button" off. The purpose of the wait is to allow traffic from the Kpl button to clear. Or You can set the button to non toggle off mode. Although depending upon your keypad, this may not work. Write a program: If control Kpl button is off. Then do whatever you want the button to do. (Set a scene on or off) If the non toggle off is working properly then when you press it it should flash then turn off on its own.
lilyoyo1 Posted February 25, 2015 Posted February 25, 2015 (edited) I do my buttons the first way that Eric mentions. One of my buttons show if the cameras are turned on. I can also use that button to reset my router. Edited February 25, 2015 by richaree
EricK Posted February 25, 2015 Posted February 25, 2015 I had written a post, that didn't post. One more thought. If the button is on to show the sensor status and you press the button to do what you want, then the button will turn off an not reflect the status of the sensor. If the button is already off then no problem. I am having trouble writing a program for this given that the sensor is a battery device. I think this could easily be done with a state variable for the sensor.
Xathros Posted February 26, 2015 Posted February 26, 2015 (edited) I had written a post, that didn't post. One more thought. If the button is on to show the sensor status and you press the button to do what you want, then the button will turn off an not reflect the status of the sensor. If the button is already off then no problem. I am having trouble writing a program for this given that the sensor is a battery device. I think this could easily be done with a state variable for the sensor. EricK- I see 2 programs for this using an integer rather than state variable: If Control 'Door Sensor' is Switched On Or Control 'Door Sensor' is Not Switched Off Then $i.DoorSensor = 1 Else $i.DoorSensor = 0 If ( Control 'KPL_Button' is switched On or Control 'KPL_Button' is switched Off ) And $i.DoorSensor = 1 Then Wait 2 seconds Set Scene 'KPL_Button' On Else Wait 2 Seconds Set Scene 'KPL_Button' Off -Xathros Edited February 26, 2015 by Xathros
user181 Posted March 2, 2015 Posted March 2, 2015 (edited) Xathros, If I understand the above correctly, does this mean that no matter if a person presses the button, its light will always follow the sensor's state? Thanks! Edited March 2, 2015 by user181
Xathros Posted March 2, 2015 Posted March 2, 2015 (edited) Xathros, If I understand the above correctly, does this mean that no matter if a person presses the button, its light will always follow the sensor's state? Thanks! Exactly What that does is any time the button is pushed, it checks the sensor state (variable value) and sets the button LED accordingly. Sensor on, LED on, sensor off, LED off. The program is triggers when the button is turned on or off and uses the value of the integer variable to decide the LED state. The variable is managed by the first program. NOTE: The variable in this case is an integer variable AND the button LED is also responder in a scene controlled by the sensor. Make sense? -Xathros Edited March 2, 2015 by Xathros
user181 Posted March 2, 2015 Posted March 2, 2015 Yes, that seems to make sense. Thank you for the information!
user181 Posted March 5, 2015 Posted March 5, 2015 Xathros, I implemented your code above and it works perfectly. I will be using it for monitoring my garage door status, which seems to be what a lot of people here do. I'd like to assign two separate KPL button LEDs for the status -- one open and one for closed, so that I can tell at a glance what the position of the door is. I know this can simply be inferred from one light being on or off, but I'd prefer having two indicators if at all possible. I also am only using the system to monitor the status, and not wiring the I/O Linc relay to the opener at all. I tried to extend the programs you listed above by creating a new scene for when the door is closed, but I discovered that I can't add a controller to more than 1 scene. I also tried writing a new program to directly control another KPL button, but that didn't seem to work. Do you have any thoughts on how to implement what I'm trying to do? I prefer a method which uses logic that looks at the input contact status to then turn the light on or off, but is it possible to program the KPL itself so that a given pair of button lights would "flip flop" when one was triggered on/off? Thanks!
LeeG Posted March 5, 2015 Posted March 5, 2015 A KPL button can be a Responder in many Scenes. SceneXOnYOff KPLbuttonX Responder On Level 100% KPLbuttonY Responder On Level 0% SceneYOnXOff KPLbuttonX Responder On Level 0% KPLbuttonY Responder On Level 100%
user181 Posted March 5, 2015 Posted March 5, 2015 Can a scene have just a responder, with nothing else?
Xathros Posted March 5, 2015 Posted March 5, 2015 (edited) Can a scene have just a responder, with nothing else? Yep. Sure can. Here is how I would do this: (LeeG started down this road above) 2 Scenes: GarageOpen and GarageClosed. GarageOpen has 2 KPL Buttons (G & H) as responders only. Button H has it's OnLevel set to 0% Button G has It's OnLevel Set to 100% GarageClosed has 2 KPL Buttons (G & H) as responders only. Button H has it's OnLevel set to 100% Button G has It's OnLevel Set to 0% Then a program to deal with them: If Status 'GarageDoor IOLinc Sensor' is On Then Set Scene 'GarageOpen' On Else Set Scene 'GarageClosed' On Depending on the type of mag switch used, you may need to swap the contents of Then and Else above. Or swap your definition of G & H ): Added value here: You can use the True/False value of the above program in other programs that may need to know the status of the garage door. Hope that works for you. -Xathros Edited March 5, 2015 by Xathros
Recommended Posts