ph_ctlrcmd1 PowerHome formula function
Description
Sends a raw command to a PowerHome controller using the internal communication structure.
Syntax
ph_ctlrcmd1 ( ctlr, command, parm1, parm2, parm3, parm4, local )
Argument |
Description |
ctlr
|
String. The ID of the controller to send the command to.
|
command
|
Integer. The command to send to the controller.
|
parm1
|
Integer. Parameter 1 for the command.
|
parm2
|
Long. Parameter 2 for the command.
|
parm3
|
String. Parameter 3 for the command.
|
parm4
|
String. Parameter 4 for the command.
|
local
|
Integer. The start of the LOCAL variable block in which the return data will be returned. Use 0 to discard the return values.
|
Return value
Integer. Returns 0 if successful. Returns - 1 if the controller ID does not exist.
The 4 return values will be contained within LOCAL variables if the local parameter is > 0. The return values will be returned in 4 consecutive LOCAL variables. If the local parameter is 4, then ret1 will be in [LOCAL4], ret2 will be in [LOCAL5], ret3 will be in [LOCAL6], and ret4 will be in [LOCAL7]. If not enough LOCAL variables exist, the upper return values will be discarded.
Usage
This function is nearly identical to ph_ctlrcmd except that the return values are in LOCAL variables instead of having to parse the return string. Use this command to send raw commands to PowerHome controllers.