therodog Posted September 25, 2011 Share Posted September 25, 2011 I recently installed kwikset locks, and I want 1 button on a couple of my 6 button keypads to be RED when all the doors are locked, that way I can tell if the house is all locked up at a glance. But if any one of the doors is unlocked, I don't want the light to be red, I want it to be it's normal color.How would I go about programming this? Thanks in advance, it's really p*ssing me off that I can't figure it out. Link to comment Share on other sites More sharing options...
nikon Posted September 25, 2011 Share Posted September 25, 2011 You can create a boolean variable called "doors locked" where if all doors are locked the variable is true and where all doors are not locked it is set to false.On the door lock, when the "locked" variable changes on each door lock create some logic that checks the state of each. If all doors are locked, then program the boolean variable to be set to true and of course the other way, if all doors are not locked then set the boolean variable to false.When the boolean variable "doors locked" state changes if the variable state = true then change the current color on the button LED to red for locked. If = False then change the current color on LED to green. I like using red in this case as I have a security systems that when armed (secured is red and green is disarmed or open.Hopefully this helps you along. I can think of 3 different ways to do it, this is probably the shortest way.If you have any issues with this let me know and I will try to explain it better. Link to comment Share on other sites More sharing options...
BlueWater84 Posted March 8, 2012 Share Posted March 8, 2012 I'm trying to do this same thing in my house and want to make sure I code it efficiently. How did you end up programming yours? I'm just trying to figure out the shortest way to check each door lock's state in order to set my variable tied to the keypad. Link to comment Share on other sites More sharing options...
Ramorous Posted March 8, 2012 Share Posted March 8, 2012 I have a Yale TS and mapped the button press to lock the locks as well. But overall it's simple logic. Create a new macro named "Doors Locked". At the start of the macro, set the LEDs to Blue. Then go through and check if a door is unlocked, then change the LEDs to Red. Within the locks, execute the macro whenever it is locked/unlocked. Link to comment Share on other sites More sharing options...
Godzilla Posted March 9, 2012 Share Posted March 9, 2012 was an easy way for me to do this before i understood variablesthen do the opposite for locked.. Link to comment Share on other sites More sharing options...
Ramorous Posted March 9, 2012 Share Posted March 9, 2012 was an easy way for me to do this before i understood variablesthen do the opposite for locked..That will work with only 1 lock though, if you have multiple you need to use variables or macros. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.