ph_insteongroupcu PowerHome formula function
Description
Sends group cleanup commands to a device within an Insteon PLC group.
Syntax
ph_insteongroupcu ( id, deviceid, cmd1 )
Argument Description
id String. The ID of the PLC Insteon Group.
deviceid String. The ID of the device within the PLC group you are controlling.
cmd1 Integer. The command 1 to send to the group.
Return value
Integer. Returns a 0 if successful. -1 is returned if the controller is not available, -2 is returned if the controller does not support Insteon, -100 is returned if the group ID cannot be found, -101 if the device ID cannot be found.
Usage
Use this funciton to send Insteon group cleanup commands to a device within a PLC group. This function differs from the ph_insteongroup command by sending group cleanup commands (direct commands to a specific device) rather than group broadcast commands (commands to all members of a group) like the ph_insteongroup function. Using this function in association with Insteon Explorer>PLC/PLM Groups you can achieve a very fine degree of control over your Insteon devices by creating groups with specific on levels and ramprates amongst all your devices, even if you never intend to send a group command (so that all devices respond together). and then just control one, or more, specific devices.

Using the groupcu commands with individual devices, you can achieve, for instance, a variable ramprate for only that specific device. This method is also used to control the light status on individual KPL keypad buttons. For instance, to turn on the a KPL's button 3 light where that button has been assigned group number 103 in the Insteon Explorer PLC/PLM Groups tab, the following could be used: ph_insteongroupcu("BUT3","DOOR_OPEN",ifaston)

See also ".FAQs-KPL Linking.Button.Ctrl Groups" for additional help information.

Valid commands are 17 for on, 18 for fast on, 19 for off, 20 for fast off, 21 to brighten, and 22 to dim. You can also use the enumerated values: ion, ifaston, ioff, ifastoff, ibright, idim. Set cmd2 to 0 for all cmd1 values. Using a cmd1 value of 17 will cause the group to turn on to their individual group values using their individual ramprates. An 18 command (ifaston) causes all devices in the group to go full on ignoring the ramprate.
Examples
The following examples demonstrate typical syntax/usage for this function.
ph_insteongroupcu("KPL-B6","DWN SCONCE KPL",18)