ph_getinsteonlevelrt PowerHome formula function
Description
Retrieves the current status (level) of an Insteon device and retrieve the actual current status. This function may have a slight delay while the device is queried.
Syntax
ph_getinsteonlevelrt ( id )
Argument |
Description |
id |
String. The ID of the Insteon device whose status/level you wish to retrieve. |
Return value
Double. Returns the current level of the specified Insteon device. 0 means that the Insteon device is off. 1 to 255 means that the device is on and indicates the current Insteon level.
Examples
The following examples demonstrate typical syntax/usage for this function.
• ph_getinsteonlevelrt ("UP BED HEAT")
• ph_getinsteonlevelrt ("[TEMP1]") {Where TEMP1 contains the Device ID.}
• if(ph_getinsteonlevelrt ("UP BED HEAT")>0,"OUT","nextLINE")
{The above example used in the Formula Field of a Goto Label Command sets the next execution line to be "OUT" if bed heat >0, else the "nextLine"}
HINT: if a label is not defined then the Goto Label command just goes to the next line, so a fake undefined lable of "nextLine" is both descriptive and functional.