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
Variable | Value |
---|---|
$BATTERY | Battery level of client |
$LOCATION1 | Current location label |
$LOCATION2 | Current location 2 label |
$LONGITUDE | Longitude value as set in HomeSeer |
$LATTITUDE | Lattitude value as set in HomeSeer |
$WEATHERAPIKEY | The weather key as set in HomeSeer |
$ELEMENT | Returns the text of a label or trackbar element, format is $ELEMENT=SCREEN_NAME->ELEMENT_NAME |
$RSS | Replace with RSS item, format is $RSS=URL->TABLE->ITEM->ROW |
$REGEXREPLACE | Uses regular expression to replace text in an input string, format is $REGEXREPLACE=INPUT_STRING->PATTERN->REPLACEMENT_STRING |
$REGEXMATCH | Match 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 |
$TIME | If 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 |
$DATE | If 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 |
$SCRIPT | Sends 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 |
$LASTCHANGE | New for HS4Touch. This returns the date/time the device last changed. Format is $LASTCHANGE=DEVICE_REF_NUMBER |
Any variable name | New 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. |