UCI Controller [BETA]
UCI Controller is a User Control Interface (UCI) design feature that is an alternative method of building UCIs. The traditional method involves copying controls from design components into a UCI, which thus ties that UCI to the design. UCI Controller, however, allows you to build a UCI from a list of template control types (Toggle, Knob, etc.), link one or more controls to components in the design, and then write a dedicated Lua script for the UCI. The UCI, and its script, can then be easily copied, re-used, and modified as desired.
Note: This is a BETA feature. Though it is functional, it is not feature complete.
-
Select a UCI name from the User Control Interfaces section of the left-side pane. (To learn how to create a UCI, see UCI Design.)
-
Click the Toolbox tab. You'll see a list of control types:
-
Drag a control type into the UCI.
-
In the right-side Properties pane, assign a unique Control Name that can optionally be referenced in a UCI Script.
-
Configure the rest of the control's properties as you would with any other control.
-
Add more controls as desired.
Link a UCI control to a component control in your design, and then easily re-link (or un-link) the control later if the UCI's use case changes. You can thus build an entire UCI and link its controls to components without ever having to wire anything in the design itself.
-
With your UCI selected, click the Layers tab.
-
For the control you wish to link, click the Link icon. For example, here is a UCI control configured as a toggle:
-
Select the component and control from that component to link to the UCI control. For example, here we have linked the toggle control to the Mute button of a Gain component:
Tip: If you later wish to link the UCI control to another component control, just click the Link icon again and select a different control for linking.
The UCI Script tab contains a familiar interface for authoring Lua code specific to the selected UCI. This makes it easy to duplicate a UCI and update the new one (i.e., modify the script) with different parameters. One use case, for example, is having multiple UCIs with differing Layer and Shared Layer visibility settings.
Note: A Q-SYS Scripting Engine feature license is not required for building and running scripts contained within the UCI Script tab. Some Lua methods are not supported – see Unsupported Lua methods for details.
Note: When referencing the Uci Lua methods in your UCI script, it is unnecessary to define the UCI_Name
variable because the script is local to the UCI and its name.
Examples
Here is a simple UCI script that sets layer visibility.
timer0 = Timer.New()
timer0.EventHandler = function()
Uci.SetLayerVisibility('Page 1', 'Layer 1', false, 'fade')
Timer.CallAfter(function()
Uci.SetLayerVisibility('Page 1', 'Layer 1', true, 'fade')
Uci.SetLayerVisibility('Page 1', 'Layer 2', false, 'left')
Timer.CallAfter(function()
Uci.SetLayerVisibility('Page 1', 'Layer 2', true, 'left')
Uci.SetLayerVisibility('Page 1', 'Layer 3', false, 'right')
Timer.CallAfter(function()
Uci.SetLayerVisibility('Page 1', 'Layer 3', true, 'right')
Uci.SetLayerVisibility('Page 1', 'Layer 4', false, 'top')
Timer.CallAfter(function()
Uci.SetLayerVisibility('Page 1', 'Layer 4', true, 'top')
Uci.SetLayerVisibility('Page 1', 'Layer 5', false, 'bottom')
Timer.CallAfter(function()
Uci.SetLayerVisibility('Page 1', 'Layer 5', true, '')
end,1)
end,2)
end,2)
end,2)
end,2)
end
timer0:Start(10)
This line instructs the a Shared Layer in a UCI to become hidden with a fade transition.
Uci.SetSharedLayerVisibility('Interface 1', 'Shared Layer 1', false, 'fade')
Unsupported Lua methods
Some Lua methods are not supported in UCI scripts, including methods from the following libraries. If you use these methods in the UCI Script tab, you will see this error in the Debug Output window: "This feature is unavailable in UCI Controller."
Note: These Lua methods are not supported in the UCI Scripts tab even if a Q-SYS Scripting Engine feature license is installed on the Q-SYS Core processor.
-
HttpClient
-
TcpSocket
-
UdpSocket
-
Email
-
Bonjour
-
Ssh
-
snmp
-
Ping
-
Snapshot
-
Midi
-
dir
-
Notifications
-
Curl