Trigger từ keypad điều khiển

Using a 3rd Party Lighting Controller Keypad to Control Services

State Trigger Programming Guide - Application Note

Document Date:

December 2014

Document Supports:

da Vinci 7.0.1

Overview

The following document provides an example for programming third party lighting controller keypad buttons to control volume up and down. Lutron lighting controllers are a common use case for this, but other third party lighting controllers use the same procedure. To control services using a Savant lighting system, see Keypad Manager: RacePoint Blueprint Programming Guide.

There will be four (4) triggers created for each service.

  • VolumeUp: Press and release for incrementing the volume up by one (1).

  • VolumeDown: Press and release for incrementing the volume down by one (1).

  • VolumeUpRamp: Press and hold to ramp the volume up while the button is being held.

  • VolumeDownRamp: Press and hold to ramp the volume down while the button is being held.

Example: Controlling Volume for a Service

In this example we will create a trigger to control the volume of a service including the ability to ramp the volume up or down. After following this example, control of other services can be configured by creating more triggers.

Determining Button State

The example in this document, will use the available states for a particular lighting system. While all lighting systems contain states that can be used, the name in the example may be different or the state may not exist. System Monitor can be used to determine the states that are available.

  1. Open the Savant Application Manager (SAM).

  2. Select and activate the release that matches the one running on the system host.

  3. Select System Monitor in the right menu.

  4. In the open System Monitor window, double click on a host in the list.

  5. Select System State in the left menu.

  6. Scroll through the list of states and locate the state for the lighting controller.

  7. Locate the state for button presses and record the names.

  8. If creating a trigger to ramp the volume (press and hold), write down the state value for a CurrentButtonState or equivalent name.

Creating a Press and Release Trigger (Volume Step)

Use these steps to create triggers to increase and decrease the volume of a service with a press and release of a keypad button. The volume of the service will be raised or lowered by a single step each time the button is pressed.

Triggers are created in the State Trigger dialog located in the Tools > Review menu within Blueprint. For more information on the use of this dialog, see State Trigger Overview: State Trigger Programming Guide.

  1. Create a trigger with the name MediaVolumeUp. Replace Media with the service being used for this trigger. Example: CDVolumeUp

  2. Add the state of the keypad button to the if (rules)

  3. In the SRS upper list, navigate to: Component > Lighting Controller

  4. In the SRS lower list, select IsButtonPressed in the States. Replace IsButtonPressed with the state name that was recorded during the Determining Button State process.

  5. In the Identifier panel, double click Value for Button Number and enter the appropriate value.

  6. In the Identifier panel, double click Value for Station Number and enter the appropriate value.

  1. Drag the state into the if (rules) list.

  1. Set Test Condition to is true.

  2. Add the Volume Up service to the Then actions list.

  3. In the SRS upper list, navigate to: Service > [Component to Control]

  4. In the SRS lower list, select VolumeUp in the in the States tab and drag it into the Then action list.

  5. Repeat steps 1 to 3 to create a MediaVolumeDown trigger.

  6. Click Save to save the trigger and close the State Triggers dialog.

Creating a Press and Hold Trigger (Volume Ramping)

Use these steps to create triggers to raise and lower the volume of a service with a press and hold of a keypad button. The volume of the service will ramp up or down for as long as the button is held.

  1. Create a trigger with the name MediaVolumeUpRamp. Replace Media with the service being used for this trigger. Example: CDVolumeUpRamp

  2. Add the state of the keypad button to the if (rules)

  3. In the SRS upper list, navigate to: Component > Lighting Controller

  4. In the SRS lower list, select CurrentButtonState in the States. Replace CurrentButtonState with the state name that was discovered during the Determining Button State process.

  5. In the Identifier panel, double click Value for Button Number and enter the appropriate value.

  6. In the Identifier panel, double click Value for Station Number and enter the appropriate value.

  1. Drag the state into the if (rules) list.

  1. Set Test Condition to Is Equal and Value to HELD. Replace HELD with the state value for the current button state that was recorded during the Determining Button State process.

  2. Add the Volume Up service to the Then actions.

  3. In the SRS upper list, navigate to: Service > [Component to Control]

  4. In the SRS lower list, select VolumeUp in the States.

  5. In order to have the volume ramp, monitoring of the CurrentButtonState needs to be repeated until the button is no longer pressed. Set Run the Following Actions to Repeat every/until false and a repeat time in the every: field. The time for the repeat will vary from system to system. Start with .2 and increase or decrease as needed.

  1. Repeat steps 1 to 3 to create a MediaVolumeDownRamp trigger.

  2. Click Save to save the trigger and close the State Triggers dialog.