Previous Topic

Next Topic

Book Contents

Book Index

Group Command

The Group Command is a command that executes a collection of other commands simultaneously.

It is similar to the scene command.

Required Bundles

To be able to create and manage automation components, you need the following bundles from the bundles folder active in the OSGi framework:

Overview

A Group Command executes a collection of other commands. All commands are executed together at the same time.

Managing Groups

Via Java API

After creating an instance of the command as described in Managing Commands you can configure it by using the following methods:

After configuring your command, call the save method. The Command Provider will save it in Config Tree.

You can also create and configure the command via the Web Console:

Via ConfigTree

All commands are stored in Config Tree, which allows you to import/export or add/edit commands by modifying XML files. Refer to Configuring HAM via Config Tree.

The following snippet contains a group command which contains two Log Commands: LogCommand1 and LogCommand2.

<config name="GroupCommand">
  <property key="id_gen" value="2" type="long"/>
  <config name="GroupCommand1">
    <config name="1">
      <property key="enabled" value="true" type="boolean"/>
      <property key="command_type" value="LogCommand" type="string"/>
      <property key="command_id" value="LogCommand2" type="string"/>
    </config>
    <config name="0">
      <property key="enabled" value="true" type="boolean"/>
      <property key="command_type" value="LogCommand" type="string"/>
      <property key="command_id" value="LogCommand1" type="string"/>
    </config>
  </config>
</config>