ph_insteonrawgroupcu PowerHome formula function
Description
Sends group cleanup commands to a device within an Insteon PLC group.
Syntax
ph_insteonrawgroupcu ( id, group, address, cmd1 )
Argument Description
id String. The ID of the controller to use.
group Integer. The PLC group number.
address String. The address of the device within the group to control.
cmd1 Integer. The command 1 to send to the device.
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.
Usage
Use this funciton to send Insteon group cleanup commands to a device within a PLC group. This function differs from the ph_insteonrawgroup 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_insteonrawgroup function. Using this function, you can achieve a very fine degree of control over your Insteon devices by creating a groups with specific on levels and ramprates amongst all your devices and never intending to send a group command (so that all devices respond together) and then just send group cleanup commands to individual devices to achieve a variable ramprate.

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.