Author |
|
smarty Super User
Joined: May 21 2006 Location: United States
Online Status: Offline Posts: 728
|
Posted: May 09 2016 at 19:41 | IP Logged
|
|
|
From the latest help file:
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, 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. 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, 128)
• ph_insteongroup("ROOM ON", ion, 0.5*255)
• ph_insteongroup("[TEMP1]", 17, 200)
See the bolded sentence...it doesn't seem to make sense with the immediate above examples...
__________________ Elk - Insteon - BlueIris - DMC1 - PowerHome - XLobby - HA_Bridge w/Dots - Brultech
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: May 09 2016 at 21:12 | IP Logged
|
|
|
Steve,
Definitely need to do some cleanup on that help entry.
The examples look like they are actually for the
ph_insteon command. I'll also need to take a look into
the function to see what times the cmd2 value would be
something other than 0. If the cmd2 value is always 0,
why have a cmd2 value at all.
Will post my findings soon.
Dave.
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: May 09 2016 at 22:20 | IP Logged
|
|
|
Steve,
Examples are definitely wrong. In nearly all cases, the CMD2 value will be 0. The exception is with a CMD1 value of 0x17 (decimal 23), the "Light Start Manual Change"
command. Set the CMD2 value to 1 to increase the group's brightness. Set the CMD2 value to 0 to decrease the group brightness.
Dave.
|
Back to Top |
|
|
|
|