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.

Cycle through multiple programs on one KPL button?

Featured Replies

Posted

I have an HDMI matrix switch that I am controlling via rs232 with a global cache itach. I have created the network resources and programs to switch between four different HDMI inputs on the matrix switch.

There are four programs, one for each input. Is it possible to set up a single KPL button to cycle through the programs? Each button press would run the next program, allowing me to cycle through the inputs on the HDMI switch.

 

I have tested all of the programs manually from the ISY admin console and they work great. I just can't figure out how to do this with a single KPL button. It would also be very nice to have this on a single remotelinc button if possible. Any help would be greatly appreciated.

 

Thanks

 

Daniel

Create a state variable to track the current mode init it to 0 current state 0. For this we will call it matrix mode

Set one button to be always on (of off if you prefer to backlit)

Write a program that increments the variable

 

if CONTROL keypadbutton X is ON

then

matrixmode += 1

 

Write a limit program that ensures we 'roll over' when the limit goes to high:

 

if maxtrixmode > 3

then

matrixmode = 0

init matrixmode to matrixmode

else

init matrixmode to matrixmode

 

(this ensures the variable is init'd to the current state no matter what)

 

Write one program for each level:

 

if matrixmode is 0

then

networkresource 1

 

if matrixmode is 1

then networkresource 2

 

etc

 

That should do it for you.

 

Best,

Bill

  • Author

Thanks for the fast response. Correct me if I'm reading it wrong, but at first glance it looks like this requires the ability to know which input the switch is on. The switch doesn't have the ability to be queried and doesn't reply in any way when an input is switched. It is receive only.

 

Will this work without knowing the actual state of the hdmi switch?

 

Daniel

Well it would be 'blind' meaning the system would remember where you were last and press and just go to the 'next' mode and cycle to the first one when you reached the limit.

You could refine it a little an drop one program

 

Not sure I understand your last question. These programs will run 3 network resources sequentially with each sequential push of the KPL button.

 

 

  
IF
$matrixmode is <3   

THEN
set $matrixmode += 1
init $matrixmode to $matrixmode

ELSE
set $matrixmode = 0
init $matrixmode to 0

Write one program for each level:

  
IF 
KPL button is switched on
and $matrixmode = 0

THEN 
networkresource 1
run first program "if"

ELSE
- - 

  
IF 
KPL Button is switched on
and $matrixmode is 1

THEN
networkresource 2
run first program if

ELSE
- - 

 

Etc.

So this is just a coding style comment but the reason I rely on the state variables is so I don't have to put the trigger button into each program. This allows me to change just one program if I decide I want a different button or additional button to drive the programs.

So this is just a coding style comment but the reason I rely on the state variables is so I don't have to put the trigger button into each program. This allows me to change just one program if I decide I want a different button or additional button to drive the programs.

 

 

Makes sense. You can also use ISY's Find and Replace function also, assuming you have the programs all next to each other, if you start with the first one you just hit the "replace in selected" button then find and it will jump to the next where you hit "replace" again and so forth till you get to the last one.

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.