ph_upb PowerHome formula function
Description
Control a UPB device.
Syntax
ph_upb ( id, cmd, arg1, arg2 )
Argument |
Description |
id |
String. The ID of the UPB device to control. |
cmd |
Integer. The UPB command to perform on the device. |
arg1 |
Integer. Argument 1 for the command. |
arg2 |
Integer. Argument 2 for the command. |
Return value
Integer. Returns a 0 if successful. Returns - 100 if the ID cannot be found.
-1 is returned if the controller is not available, -2 is returned if the
controller does not support UPB.
Usage
Use this funciton to send UPB commands directly to a single device. Valid
commands are 34 for Goto (arg1 is level, arg2 is ramp), 35 for Fade Start
(arg1 is level, arg2 is ramp), 36 for Fade Stop (arg1 and arg2 ignored),
37 for Blink (arg2 is blink rate), 38 for Indicate (arg1 is level, arg2
is ramp). You
can also use the enumerated values ugoto, ufadestart, ufadestop, ublink,
and uindicate.