ph_ctlrsq PowerHome formula function
Description
Adds an item to a PowerHome controllers internal send queue using the internal communication routines.
Syntax
ph_ctlrsq ( as_ctlrid, ai_command, as_parm1, ai_parm2, al_parm3 )
ph_ctlrsq ( as_ctlrid, ai_command, as_parm1, ai_parm2, al_parm3, as_parm4, ai_parm5, al_parm6 )
Argument Description
as_ctlrid String . The ID of the controller to queue the command to
ai_command Integer. The type of command to queue. Common queued commands are 10 for IR play, 20 for X10 send, 30 for send Insteon direct, 31 for send Insteon group, 32 for send Insteon group cleanup, 1201 for Set digital out, and 8001 for Set analog out 
as_parm1 String . Parameter 1
ai_parm2 Integer . Parameter 2
al_parm3 Long . Parameter 3
as_parm4 String (Optional). Parameter 4. If this parameter is omitted, an empty string "" will be used internally
ai_parm5 Integer (Optional). Parameter 5. If this parameter is omitted, a value of -1 will be used internally
al_parm6 Long (Optional). Parameter 6. If this parameter is omitted, a value of -1 will be used internally
Return value
Returns 0 if the function succeeds. Returns -1 if the controller does not exist or isn't active.
Usage
This function exposes the very base level of PowerHome controller communications and is provided to achieve the maximum level of control. Most actions can be achieved using the higher level PowerHome functions such as ph_x10, ph_ir, and ph_insteon.

Most queued controller commands can be accomplished using just parameter 1 thru 3 so the shorter syntax of the function can be used. For commands that require more than just 3 parameters, the longer syntax version must be used

Examples
The following examples demonstrate typical syntax/usage for this function.
• ph_ctlrsq("X10CTLRID",20,"C",102,0) - Returns 0 if successful. This example queues a request to send an X10 "On" command to housecode C