eggzlot Posted July 3, 2019 Share Posted July 3, 2019 Hi Everyone - question on programming using multiple presses to achieve a desired result. The card access FOB has 5 buttons. What if I wanted to program a 3-4 button sequential press to accomplish a task. For instance, if button 2, 3, 4 and 5 are pressed in that order, the blinds in the bedroom will open. I dont want someone to pick up the fob and hit a button and poof the blinds open, so to “hide” that function I want them to press 2, 3, 4 and 5 in sequential order. I was thinking true/false variables since that is the extent of my programming skills . If Button 2 is pressed, Variable A is true. If button 3 is pressed AND variable A is true, Variable B is true. IF Button 3 is pressed and Variable B is true, Variable C is true. If Button 4 is pressed and Variable C is true, open the blinds.... would this work? Would the variable states change fast enough to catch up with someone pressing those buttons fairly quick? Is there a better way to achieve the desired results? Quote Link to comment Share on other sites More sharing options...
knowitall Posted July 3, 2019 Share Posted July 3, 2019 Do you want to use a key fob just cus you have it? Or because it’s portable? String variable might be less work to program Probably be much cleaner and easier to get the tabletop kit for the configurable keypad. Or a dot in there with the voice driver and tell the b*tch to open the blinds! Quote Link to comment Share on other sites More sharing options...
eggzlot Posted July 3, 2019 Author Share Posted July 3, 2019 10 minutes ago, knowitall said: Do you want to use a key fob just cus you have it? Or because it’s portable? String variable might be less work to program Probably be much cleaner and easier to get the tabletop kit for the configurable keypad. Or a dot in there with the voice driver and tell the b*tch to open the blinds! Got card access already. Curtains was just a generic task. Will likely do something with garage doors opening, lights/music to turn on etc how do string intervals work? I read the remedial C4 docs and it was talking about text for a string variable. No concept how that would work Quote Link to comment Share on other sites More sharing options...
Crustyloafer Posted July 3, 2019 Share Posted July 3, 2019 You could probably do this with just timers. For a 3 button sequence: When button A is pressed, start Timer 1. When button B is pressed, IF Timer 1 is still running - start Timer 2. When button C is pressed, IF Timer 2 is still running - Open Bedroom Blinds Quote Link to comment Share on other sites More sharing options...
eggzlot Posted July 3, 2019 Author Share Posted July 3, 2019 4 hours ago, Crustyloafer said: You could probably do this with just timers. For a 3 button sequence: When button A is pressed, start Timer 1. When button B is pressed, IF Timer 1 is still running - start Timer 2. When button C is pressed, IF Timer 2 is still running - Open Bedroom Blinds Thanks. Same concept of using the true/false variable. Any benefit to a timer or a variable? Quote Link to comment Share on other sites More sharing options...
Crustyloafer Posted July 3, 2019 Share Posted July 3, 2019 Benefit of timer is correct sequence needs to be pressed within a time limit, whereas with just variables the correct sequence could be done with any time gap between press making it slightly more likely to happen by accident. eggzlot 1 Quote Link to comment Share on other sites More sharing options...
eggzlot Posted July 3, 2019 Author Share Posted July 3, 2019 1 hour ago, Crustyloafer said: Benefit of timer is correct sequence needs to be pressed within a time limit, whereas with just variables the correct sequence could be done with any time gap between press making it slightly more likely to happen by accident. thanks - resetting the timer puts it back to the original duration but also stops it from running? if i set a timer for 30 seconds, and it gets down to 20 seconds and i put in a reset command, it goes back to 30 seconds but does not keep counting down, correct? Quote Link to comment Share on other sites More sharing options...
Crustyloafer Posted July 3, 2019 Share Posted July 3, 2019 17 minutes ago, eggzlot said: thanks - resetting the timer puts it back to the original duration but also stops it from running? if i set a timer for 30 seconds, and it gets down to 20 seconds and i put in a reset command, it goes back to 30 seconds but does not keep counting down, correct? Quote Link to comment Share on other sites More sharing options...
eggzlot Posted July 3, 2019 Author Share Posted July 3, 2019 thanks! so reset will start it back at 30 seconds but will keep counting down. so i need a stop/reset? or i could just do a stop and program a stop to reset as well? Quote Link to comment Share on other sites More sharing options...
Crustyloafer Posted July 3, 2019 Share Posted July 3, 2019 Bear in mind this is for the new Timer Agent in OS3, the OS3 Agent isn't as flexible. Quote Link to comment Share on other sites More sharing options...
eggzlot Posted July 3, 2019 Author Share Posted July 3, 2019 Just now, Crustyloafer said: Bear in mind this is for the new Timer Agent in OS3, the OS3 Agent isn't as flexible. oh ok, I am still behind on OS 2. what is the best way to stop the timer and get it back to its original duration in a stop state? Quote Link to comment Share on other sites More sharing options...
eggzlot Posted July 3, 2019 Author Share Posted July 3, 2019 I just found this table - so I would have to do a "stop" command but how do you get the timer back to its original state (30 seconds) without starting again? Command Executed is... And Timer is ... Then Event Effect on Timer Start Running None Restarts Reset Stop and Start Restarts Stop Stop Stops Start Not Running Start Starts Reset Start Starts Stop Stop Stops Quote Link to comment Share on other sites More sharing options...
Crustyloafer Posted July 3, 2019 Share Posted July 3, 2019 https://www.control4.com/documentation/Composer_HE_User_Guide/Programming_with_the_Timer_Agent.htm Quote Link to comment Share on other sites More sharing options...
Crustyloafer Posted July 3, 2019 Share Posted July 3, 2019 There is no need for it to go back to original state when you stop it, as it will start at the original timer duration whenever you start it again. Quote Link to comment Share on other sites More sharing options...
eggzlot Posted July 3, 2019 Author Share Posted July 3, 2019 yep that is where I Pulled up that chart I cut/pasted above I'll just go with Stop based on this old thread it should work: Quote Link to comment Share on other sites More sharing options...
Crustyloafer Posted July 3, 2019 Share Posted July 3, 2019 Personally I would probably just use the Reset command instead of Start as that way you can be sure the timer is starting from its original duration. Quote Link to comment Share on other sites More sharing options...
Crustyloafer Posted July 3, 2019 Share Posted July 3, 2019 Timer not running:START starts the timer from 0, triggering any programming for STARTSTOP stops the timer triggering any programming for STOPRESET starts the timer from 0, triggering any programming for STARTTimer running:START resets the timer to 0, start the timer but triggers NO programming eventsSTOP stops the timer triggering any programming for STOPRESET starts the timer from 0, triggering any programming for START AND STOP Quote Link to comment Share on other sites More sharing options...
eggzlot Posted July 3, 2019 Author Share Posted July 3, 2019 Just now, Crustyloafer said: Timer not running:START starts the timer from 0, triggering any programming for STARTSTOP stops the timer triggering any programming for STOPRESET starts the timer from 0, triggering any programming for STARTTimer running:START resets the timer to 0, start the timer but triggers NO programming eventsSTOP stops the timer triggering any programming for STOPRESET starts the timer from 0, triggering any programming for START AND STOP thanks I have it as stop for now. I'll test to see if i run this cycle 2-3x that it will reset after i stop and it starts again. we'll see. ill mess with it and watch what happens in Composer HE msgreenf 1 Quote Link to comment Share on other sites More sharing options...
eggzlot Posted July 16, 2019 Author Share Posted July 16, 2019 On 7/3/2019 at 12:38 PM, Crustyloafer said: Timer not running:START starts the timer from 0, triggering any programming for STARTSTOP stops the timer triggering any programming for STOPRESET starts the timer from 0, triggering any programming for STARTTimer running:START resets the timer to 0, start the timer but triggers NO programming eventsSTOP stops the timer triggering any programming for STOPRESET starts the timer from 0, triggering any programming for START AND STOP I have my programming below - for security reasons I blanked out which button on the FOB etc is involved Given this programming, I'd say about 75% of the time the lights/alarm/door unlock but maybe 25-30% of the time the garage door opens. Needless to say, it should be 100%. I am only doing this on my wife's remote and every time I've been in the car/used the remote the inside door, lights and alarm all went off, but the garage door was hit or miss at best, so I got a feeling it may be higher on the 75% that the other things work but I know first hand that pesky garage door is well below the 50% threshold of working. Quote Link to comment Share on other sites More sharing options...
Matt Lowe Posted July 17, 2019 Share Posted July 17, 2019 my 2 cents at this. i would do a timer and a string variable. reset timer on first button add a number or letter to the string like 1 or the number corresponding to the button. next button change the variable to both numbers in that the order is the variable is equal to the first number. so itll end up 12 etc until you get to the last button if variable is equal to 1234 etc execute programming Quote Link to comment Share on other sites More sharing options...
Crustyloafer Posted July 17, 2019 Share Posted July 17, 2019 7 hours ago, eggzlot said: I have my programming below - for security reasons I blanked out which button on the FOB etc is involved Given this programming, I'd say about 75% of the time the lights/alarm/door unlock but maybe 25-30% of the time the garage door opens. Needless to say, it should be 100%. I am only doing this on my wife's remote and every time I've been in the car/used the remote the inside door, lights and alarm all went off, but the garage door was hit or miss at best, so I got a feeling it may be higher on the 75% that the other things work but I know first hand that pesky garage door is well below the 50% threshold of working. The reason it works intermittently is probably because you have used a second IF command after the first one, when in fact you should have used an ELSE command. With your programming, if the button press sequence is done correctly then it actually checks if the timer is running twice, once at the start and then it runs the sequence including opening the garage door and then a second time after that sequence has completed. Depending on how long your timers are for, there is a possibility that if the final timer is still running and the last button is pressed correctly that same timer will have expired by the end of the sequence and so when it gets to the second IF command and it checks if the timer is NOT running then that also is true and so it then sends the toggle command to the garage door not long after it has just told it to open. If you use and ELSE command instead of the second IF command it will only ever check the status of the timer once, if it is running it will perform the sequence and then skip past anything nested under the ELSE command, if the timer has expired it will skip straight to whatever is nested under the ELSE command. Quote Link to comment Share on other sites More sharing options...
Crustyloafer Posted July 17, 2019 Share Posted July 17, 2019 Like this. Quote Link to comment Share on other sites More sharing options...
eggzlot Posted July 17, 2019 Author Share Posted July 17, 2019 5 hours ago, Crustyloafer said: The reason it works intermittently is probably because you have used a second IF command after the first one, when in fact you should have used an ELSE command. With your programming, if the button press sequence is done correctly then it actually checks if the timer is running twice, once at the start and then it runs the sequence including opening the garage door and then a second time after that sequence has completed. Depending on how long your timers are for, there is a possibility that if the final timer is still running and the last button is pressed correctly that same timer will have expired by the end of the sequence and so when it gets to the second IF command and it checks if the timer is NOT running then that also is true and so it then sends the toggle command to the garage door not long after it has just told it to open. If you use and ELSE command instead of the second IF command it will only ever check the status of the timer once, if it is running it will perform the sequence and then skip past anything nested under the ELSE command, if the timer has expired it will skip straight to whatever is nested under the ELSE command. the timers are 10 seconds each. its just pressing 3 buttons, does not take 10 seconds at all Is that "Else" something in OS 3? I have not seen it before, I am on 2.10.4 and playing around in HE I did not see how to do that. What I figured out though is that regardless if the timer is running, I want that garage door to open. if the timer is running, then do the alarm/door lock/lights, etc. Would this do the trick ya think? I can put a 250mm pause between the toggle and the IF statement? Quote Link to comment Share on other sites More sharing options...
Crustyloafer Posted July 17, 2019 Share Posted July 17, 2019 Just put a stop command at the end of your first sequence that does the alarm/door lock/lights, etc., that way if that sequence is run then it will stop at end and not try to toggle the garage door again. Only if it skips past doing the alarm/door lock/lights, etc sequence will it carry out the second IF statement and toggle the garage door. PS: Why do you want to toggle the door, would it not be better to have a button for open and another for close? Quote Link to comment Share on other sites More sharing options...
Crustyloafer Posted July 17, 2019 Share Posted July 17, 2019 The Else function came in around 2.10.5 or 6, but is just an alternative to using stop commands at the end of each IF statement so they don't do everything in the programming window. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.