ph_x10setstat PowerHome formula function
Description
Directly updates the PowerHome stored X10 status tables.
Syntax
ph_x10setstat ( n, s, n, d, d )
Argument Description
n The X10 command you wish to use as the update command. Valid values are the standard X10 commands 0 thru 15.
s The housecode of the unit you wish to update. Valid values are ‘A’ thru ‘P’ for standard X10 modules and ‘Q’ thru ‘Z’ for virtual X10 modules.
n The unitcode of the unit you wish to update. Valid values are 1 thru 16 for standard X10 modules and 1 – 99 for virtual X10 modules. Use a value of 0 if the specific command does not require a unitcode such as command 0 (All units off) and command 1 (All lights on).
d The percent change in level for commands 4 (dim) and 5 (brighten). Valid values are 0 thru 100. Also the command byte in decimal for command 7 (extended code). Valid values would be 0 thru 255 however only values 48 thru 58 have any effect in PowerHome. Also the preset dim value for command 10 (preset dim 1) and command 11 (preset dim 2). Valid values with these commands would be 1 thru 16. Use a 0 if this value is not needed for the particular command you are using.
d The data byte in decimal for command 7 (extended code). Valid values are 0 thru 255 however only certain values will have an effect in PowerHome. Please refer to the X10 document for extended commands for an explanation of the various command and data bytes available for extended commands.
Return value
Integer. Returns a 0. It is important to note that the ph_x10setstat function only simulates the sending of commands using the specified parameters. The actual X10 tables will only be updated based upon the defined X10 modules and the X10 module types. If you use ph_x10setstat to simulate a extended command being sent to a module whose type does not support extended commands, then no change will appear in the X10 status tables. Also, this command does not cause any triggers to fire.