# Accessing Variables > Symcon documentation · English · generated on 2026-09-26 > Index: https://www.symcon.de/en/llms.txt Source: https://www.symcon.de/en/service/documentation/command-reference/access-variables/ ## GetValue Source: https://www.symcon.de/en/service/documentation/command-reference/access-variables/getvalue/ `mixed GetValue(int $VariableID)` returns the value of an IP-Symcon variable, independent of its type **Parameters** - `$VariableID` (int): ID of the variable **Returns** (mixed): Value of the specified variable in the type of the specified variable ID of the variable **Example** ```php $Window_open = GetValue(47788); // Boolean-Variable: true or false $current_project = GetValue(46250); // String-Variable: e.g. "Rain sensing" ``` ## GetValueBoolean Source: https://www.symcon.de/en/service/documentation/command-reference/access-variables/getvalueboolean/ `bool GetValueBoolean(int $VariableID)` returns the value of an IP-Symcon variable of the type Boolean **Parameters** - `$VariableID` (int): ID of the variable **Returns** (bool): Value of the specified variable ID of the variable **Example** ```php $Window_open = GetValueBoolean(47788); // Boolean variable: true or false ``` ## GetValueFloat Source: https://www.symcon.de/en/service/documentation/command-reference/access-variables/getvaluefloat/ `float GetValueFloat(int $VariableID)` returns the value of an IP-Symcon variable of the type Float **Parameters** - `$VariableID` (int): ID of the variable **Returns** (float): Value of the specified variable ID of the variable **Example** ```php $current_Temperature = GetValueFloat(47788); ``` ## GetValueFormatted Source: https://www.symcon.de/en/service/documentation/command-reference/access-variables/getvalueformatted/ `string GetValueFormatted(int $VariableID)` returns the value of an IP-Symcon variable and formats it according to its profile **Parameters** - `$VariableID` (int): ID of the variable **Returns** (string): Value of the specified variable, formatted accordingly to profile ID of the variable **Example** ```php echo GetValueFormatted(47788); //Profile = ~Switch //Returns: On or Off echo GetValueFormatted(46250); //Profile = ~Temperature //Returns: 17,5°C ``` ## GetValueFormattedEx Source: https://www.symcon.de/en/service/documentation/command-reference/access-variables/getvalueformattedex/ `string GetValueFormattedEx(int $VariableID, mixed $value)` _Requires Symcon >= 5.5_ returns a value formatted based on the profile of a variable **Parameters** - `$VariableID` (int): ID of the variable - `$value` (mixed): Value to be formatted **Returns** (string): Value formatted to match the profile of the variable Value to be formatted **Example** ```php echo GetValueFormattedEx(12345, true); //Profil = ~Switch //Results in: On echo GetValueFormattedEx(23456, 17.5); //Profile = ~ Temperature //Results in: 17.5 ° C ``` ## GetValueInteger Source: https://www.symcon.de/en/service/documentation/command-reference/access-variables/getvalueinteger/ `int GetValueInteger(int $VariableID)` returns the value of an IP-Symcon variable of the type Integer **Parameters** - `$VariableID` (int): ID of the variable **Returns** (int): Value of the specified variable ID of the variable **Example** ```php $Number_persons = GetValueInteger(47788); ``` ## GetValueString Source: https://www.symcon.de/en/service/documentation/command-reference/access-variables/getvaluestring/ `string GetValueString(int $VariableID)` returns the value of an IP-Symcon variable of the type String **Parameters** - `$VariableID` (int): ID of the variable **Returns** (string): Value of the specified variable ID of the variable **Example** ```php $current_project = GetValueString(47788); ``` ## HasAction Source: https://www.symcon.de/en/service/documentation/command-reference/access-variables/hasaction/ `bool HasAction(int $VariableID)` _Requires Symcon >= 5.3_ checks whether an action is defined **Parameters** - `$VariableID` (int): ID of the variable **Returns** (bool): __TRUE__, if the the variable has an action, otherwise __FALSE__ ID of the variable **Example** ```php // Checks whether the variable with the ID 12356 has an action. HasAction(12345); ``` ## RequestAction Source: https://www.symcon.de/en/service/documentation/command-reference/access-variables/requestaction/ `bool RequestAction(int $VariableID, mixed $Value)` _Requires Symcon >= 5.0_ execute the variable action of an IP-Symcon variable **Parameters** - `$VariableID` (int): ID of the variable - `$Value` (mixed): Value for the action **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. Value for the action **Example** ```php // Switch Boolean variable 29117 to "true" RequestAction(29117, true); // Switch Integer Variable 46250 to 18 RequestAction(46250, 18); ``` ## RequestActionEx Source: https://www.symcon.de/en/service/documentation/command-reference/access-variables/requestactionex/ `bool RequestActionEx(int $VariableID, mixed $Value, string $Sender)` _Requires Symcon >= 5.0_ execute the action of an IP-Symcon variable with individual sender **Parameters** - `$VariableID` (int): ID of the variable - `$Value` (mixed): Value for the action - `$Sender` (string): Name of the sender **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. Name of the sender **Example** ```php // Switch on Boolean variable with Sender AlarmSystem RequestActionEx(12345, true, "AlarmSystem"); // Set integer variable with Sender TemperatureAirConditioning RequestActionEx(23456, 18, "TemperatureAirConditioning"); ``` ## SetValue Source: https://www.symcon.de/en/service/documentation/command-reference/access-variables/setvalue/ `bool SetValue(int $VariableID, mixed $Value)` set the value of an IP-Symcon variable independent of its type **Parameters** - `$VariableID` (int): ID of the variable - `$Value` (mixed): New value of the variable **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. New value of the variable **Example** ```php SetValue(29117, true); // Boolean Variable: Set flag for school holidays SetValue(46250, $current_project); // String Variable: e.g. "Rain sensing" ``` ## SetValueBoolean Source: https://www.symcon.de/en/service/documentation/command-reference/access-variables/setvalueboolean/ `bool SetValueBoolean(int $VariableID, bool $Value)` set the value of an IP-Symcon Variable with the type Boolean **Parameters** - `$VariableID` (int): ID of the variable - `$Value` (bool): TRUE/FALSE **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. TRUE/FALSE **Example** ```php SetValueBoolean(47788, true); // Switch on alarm system ``` ## SetValueFloat Source: https://www.symcon.de/en/service/documentation/command-reference/access-variables/setvaluefloat/ `bool SetValueFloat(int $VariableID, float $Value)` set the value of an IP-Symcon variable with the type Float **Parameters** - `$VariableID` (int): ID of the variable - `$Value` (float): 64Bit floating point **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. 64Bit floating point **Example** ```php SetValueFloat(47788, $current_Temperature); ``` ## SetValueInteger Source: https://www.symcon.de/en/service/documentation/command-reference/access-variables/setvalueinteger/ `bool SetValueInteger(int $VariableID, int $Value)` set the value of an IP-Symcon variable with the type Boolean **Parameters** - `$VariableID` (int): ID of the variable - `$Value` (int): -2,147,483,648 .. 2,147,483,647 **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. -2,147,483,648 .. 2,147,483,647 **Example** ```php SetValueInteger(47788, $Number_persons); ``` ## SetValueString Source: https://www.symcon.de/en/service/documentation/command-reference/access-variables/setvaluestring/ `bool SetValueString(int $VariableID, string $Value)` set the value of an IP-Symcon variable with the type String **Parameters** - `$VariableID` (int): ID of the variable - `$Value` (string): Text **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. Text **Example** ```php SetValueString(47788, $current_project); ```