Skip to main content
Skip table of contents

Replacement Variables

Documentation on using replacement variables in HS4Touch. See Date & Time Variables for detailed information on date and time replacement variables.

Overview

Replacement variables allow you to display and or use content that is dynamic in HS4. This feature is not to be confused with the new variable feature that is described in the properties section. Replacement variables can be used in the text property of an element, the RSS feed properties and the script action.

Syntax

Replacement variables are inserted into text with [] like: "[$BATTERY]" 

Replacement Variables

VariableValue
$BATTERYBattery level of client
$LOCATION1Current location label
$LOCATION2Current location 2 label
$LONGITUDELongitude value as set in HomeSeer
$LATTITUDELattitude value as set in HomeSeer
$WEATHERAPIKEYThe weather key as set in HomeSeer
$ELEMENTReturns the text of a label or trackbar element, format is $ELEMENT=SCREEN_NAME->ELEMENT_NAME
$RSSReplace with RSS item, format is $RSS=URL->TABLE->ITEM->ROW
$REGEXREPLACEUses regular expression to replace text in an input string, format is $REGEXREPLACE=INPUT_STRING->PATTERN->REPLACEMENT_STRING
$REGEXMATCHMatch the input string using a regular expression, format is $REGEXMATCH=INPUT_STRING->(PATTERN)
$DATETIME

If no parameter returns the date and time in the default system format, otherwise formats the time as specified. Format is $DATETIME=FORMAT

$TIMEIf no parameter returns the time in the default system format, otherwise formats the time as specified. Format is $DATETIME=FORMAT | See Date & Time Variables for more information
$DATEIf no parameter returns the date in the default system format, otherwise formats the time as specified. Format is $DATETIME=FORMAT | See Date & Time Variables for more information
$SCRIPTSends and runs a script in HomeSeer and returns the result, format is $SCRIPT=SCRIPT_TEXT
The script text is normally the name of script file, but it could also start with an & and be an immediate script statement
$LASTCHANGENew for HS4Touch. This returns the date/time the device last changed. Format is $LASTCHANGE=DEVICE_REF_NUMBER
Any variable nameNew for HS4Touch. A variable name in the format #NAME will be replaced with the value of the variable. See the Element Properties section for information about variables.
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.