Jump to content
View in the app

A better way to browse. Learn more.

Universal Devices Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How To Make Timed Button Press Program

Featured Replies

Posted

Greetings-

 

Another user a while back spoke about making a program (or series of programs) where a button has to be pressed multiple times within a certain period of time in order for the program to activate (or deactivate) a certain device.

 

Below is an example of what I am trying to accomplish (it is also what the other user mentioned):

 

Press a keypad button ("Keypad Button") three times in succession to turn on a light.

If more than 5 seconds elapses between presses,

then the sequence resets and you have to start over.

I use something like this for my garage door open programming: it prevents the door from opening if you happen to hit the KPL button by accident. You can also have a little fun with this idea, for example, turning the aux buttons of a KPL into a combination lock.

 

Please help! I did not completely understand the other users post and I am hoping someone here can give me a hand. I am learning more and more everyday about the ISY and its interface and it is really amazing. If only it had the voice of Majel Roddenberry.

This will give you a starting point. Integer variable PressCount is required. Program TimedPress counts the number of times KeypadLinc button B is pressed with less than 5 seconds between each button press. KeypadLinc button B is set for non-toggle On mode so each press generates an On command. When button B pressed 3 times with less than 5 seconds between each press Program TimedPress3 is invoked. Scene TimedPressTooLong has KeypadLinc button B as a Responder. If more than 5 seconds passes the Integer variable PressCount is reset to 0 so count starts again and button B is turned Off.

 

Program TimedPress

If
       Control 'KeypadLinc 8 Dim V40 / KeypadLinc 8 Dim V40 - B' is switched On
   And $PressCount < 2

Then
       $PressCount += 1
       Wait  5 seconds
       $PressCount  = 0
       Set Scene 'SceneTimedPressTooLong' Off

Else
       $PressCount  = 0
       Run Program 'TimedPress3' (If)

Program TimedPress3

If
  - No Conditions - (To add one, press 'Schedule' or 'Condition')

Then
       Send X10 'H5/On (3)'

Else
  - No Actions - (To add one, press 'Action')

  • Author

Wow. I'm really impressed and really appreciative. How simple and clean. I had 6 programs and 3 variables to try and make it work. You made it really simple and I like the logic. Wow again. Thank you so much! If you are ever in South Florida I owe you a drink (or two or 3)!

 

-Paul

You are very welcome. You may want to consider turning the KeypadLinc button Off from the second Program after performing whatever it is with the 3 button press. The same Scene the first Program used to turn the button Off if 5 seconds exceeded can be used in the second Program.

Guest
This topic is now closed to further replies.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.