ph_insteongroup PowerHome formula function
Description
Sends commands to an Insteon PLC group using the group ID.
Syntax
ph_insteongroup ( id, cmd1, cmd2 )
Argument Description
id String. The ID of PLC Insteon Group.
cmd1 Integer. The command 1 to send to the group.
cmd2 Integer. The command 2 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.
Usage
Use this funciton to send Insteon commands to a PLC group. Valid commands are 17 for on, 18 for fast on, 19 for off, 20 for fast off, 21 to brighten, 22 to dim, 23 to Start Manual Change, and 24 to Stop Manual Change. You can also use the enumerated values: ion, ifaston, ioff, ifastoff, ibright, idim for commands 17 thru 22 respectively. Set cmd2 to 0 for all cmd1 values except 23 (Start Manual Change). For a cmd1 value of 23, set cmd2 to 1 for brighten and cmd2 to 0 for dim. 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. Add 1000 to the standard Insteon commands to always force a group cleanup regardless of the controller setting. Add 2000 to the standard Insteon commands to never send a group cleanup regardless of the controller setting.
Examples
The following examples demonstrate typical syntax/usage for this function.
• ph_insteongroup("ROOM OFF", ifastoff, 0)
• ph_insteongroup("ROOM ON", ion, 0)
• ph_insteongroup("ROOM ON", 23, 1)
• ph_insteongroup("[TEMP1]", 17, 0)