System Variables
System variables are system
defined storage areas. They are different from global variables in that
they are predefined and the user has no ability to create new ones or
delete existing ones. System variables can be accessed similiarly to Global Variables.
All system variables make their value available for reading and a large number
of them can also be updated by the user. System variables are only stored
within RAM and when PowerHome is shutdown they lose their values. The
System Variables that are modifiable by the user have virtually no limit
to the amount of data that may be stored within them (a little more than 4
gigabytes). Example system variables include X10 status, Sunrise,
Sunset, local variables, temporary variables, and the Previous Incoming
X10 buffer.
Key takeaways:
System variables are system defined. They can neither be created or deleted
System variables only exist within RAM. They are NOT stored in the database. Their values are lost and reset when PowerHome terminates
All System variables can have the values read. Some can have their values updated.
System variables that can be modified:
LOCAL1...LOCAL10 - General user defined storage with limited scope
TEMP1...TEMP10 - General user defined storage with limited scope but more scope than LOCAL vars
GLOBAL1...GLOBAL100 - General user defined storage available globally within PowerHome (not be confused with Global Variables)
INPUTRET - Stores the value to be passed back when an Input Box is closed
TIMEOUT - Stores the default timeout value for Message Box and Input Box commands
RAW - Stores the raw value of an Analog I/O device or Zwave device. Only has context within the Raw to Calc and Calc to Raw formulas
DATA - Same as the RAW System variable
CALC - Stores the calculated value of an Analog I/O device or Zwave device. Only has context within the Raw to Calc and Calc to Raw formulas
ORIGRAW - Stores the original raw value of an Analog I/O device or Zwave device before the value is updated by either PowerHome or the user.. Only has context within the Raw to Calc and Calc to Raw formulas
FORECOLOR - Stores the foreground color for an Analog I/O device or Zwave device. Only has context within the Raw to Calc and Calc to Raw formulas
BACKCOLOR - Stores the background color for an Analog I/O device or Zwave device. Only has context within the Raw to Calc and Calc to Raw formulas
EMAILNAME - A legacy SV and rarely used. Stores the email address to send email to using the PowerHome macro "Send Email" command
EMAILSUBJECT - A legacy SV and rarely used. Stores the email subject for the PowerHome macro "Send Email" command
DIALUPUSER - A legacy SV and rarely used. Stores the username for a dialup connection
DIALUPPASSWORD - A legacy SV and rarely used. Stores the password for a dialup connection
System variables that are Read Only:
SQLROWS1...SQLROWS20 - Contains the number of rows in a SQL Retrieval area
X10P1...X10P20 - Stores the most recent incoming X10 commands. X10P1 is the most recent and X10P20 is the oldest
X10P1TIME...X10P20TIME - Stores the time received of the matching incoming X10 command
SUNRISE - Stores the time that the sun rises for the current day and currently defined location
SUNSET - Stores the time that the sun will set for the current day and current location
DAWN - Stores the time for the start of civil twilight for the current day and current location
DUSK - Stores that time for the end of civil twilight for the current day and current location
MBRET - Stores the chosen value for the last displayed Message Box command.
PHDIR - Contains the filepath to the PowerHome directory
PHWEBDIR - Contains the filepath to the PowerHome Web directory
WINDIR - Contains the filepath to the Windows directory
SYS32DIR - Contains the filepath to the Windows System32 directory
MACRO - Contains the ID of the currently running macro. Only has context within formulas that are directly or indirectly executed from a macro
MACROLINE - Contains the current line of the currently running macro. Like the MACRO SV, only has context when accessed from within a macro
SUBMACROCNT - Contains the number of sub macro calls from the current macro. Only has context within a macro
PARENTMACRO - Contains the ID of the macro that called the current macro. Only has context within a macro
ROOTMACRO - Contains the top level root macro of the list of macros that called the current macro. Only has context within a macro
SUBMACROPATH - Contains the traversal path of sub macro calls. Only has context within a macro
TRIGGER - Contains the ID of the current trigger. Only has context within formulas that executed from a trigger
TIMEDEVENT - Contains the ID of the current Timed Event. Only has context within a formula executed from a timed event
FORMULA - Contains the ID of the current Formula. Only has context within a predefined formula
ANALOG - Contains the ID of the Analog I/O device. Only has context when accessed from the Raw to Calc and Calc to Raw formulas
ZWAVE - Contains the ID of the Zwave device. Only has context when accessed from the Raw to Calc and Calc to Raw formulas
CCTAB - Contains the ID of the Control Center tab from which a formula was initiated
CCBTN - Contains the ID of the Control Center object from which a formula was initiated
CCOBJ - Same as CCBTN
CCBTNX - Contains the X coordinate of a Control Center object that initiated a formula
CCOBJX - Same as CCBTNX
CCBTNY - Contains the Y coordinate of a Control Center object that initiated a formula
CCOBJY - Same as CCBTNY
X10STATA1...X10STATP16 - Stores the status for the specified X10 house and unit code
X10LEVELA1...X10LEVELP16 - Stores the level for the specified X10 house and unit code
DIALUPIP - A legacy SV that is typically no longer used. Stores the IP assigned to a dialup connection
SYSTEMRET - A legacy SV that is no longer used