Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Bug Reports
 PowerHome Messageboard : PowerHome Bug Reports
Subject Topic: Documentation Confusion?? Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
smarty
Super User
Super User
Avatar

Joined: May 21 2006
Location: United States
Online Status: Offline
Posts: 722
Posted: May 09 2016 at 19:41 | IP Logged Quote smarty

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 View smarty's Profile Search for other posts by smarty
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4399
Posted: May 09 2016 at 21:12 | IP Logged Quote dhoward

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 View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4399
Posted: May 09 2016 at 22:20 | IP Logged Quote dhoward

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 View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum