Programming with commands

A Command for a Control4 system is a “do” statement. Commands are actions that tell a device what to do.

Example: The example in this section shows you how to program a keypad button to turn on the sprinkler system. This example assumes the keypad and sprinkler system are already set up.

To program a keypad button to toggle sprinklers on and off:

  1. Start Composer Pro and connect to a Director.
  1. Click Programming.
  2. In the Device Events pane project tree, select the keypad.
  3. In the keypad Events pane, select the button that you want to program—Zone 1. This automatically identifies the Press event for programming the button on the keypad. The event appears at the top of the Script pane.
  1. In the Actions pane, select the device--Sprinkler Zone 1.
  2. In the device's Actions tab, select Toggle the Sprinkler Zone 1. The command you chose is displayed in the Sprinkler System Actions pane with a green arrow.
  3. Note: The title of this pane varies depending on the device you select.

  1. Click the green arrow, and drag it to the Script pane (center pane).
  1. To test, click Execute in the Script pane to turn on the sprinklers.
  2. Click Execute again to turn off the sprinklers.
  3. Results: The top button of the keypad now toggles the sprinklers on and off.