# Management of 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/management-variables/ . ## IPS_CreateVariable Source: https://www.symcon.de/en/service/documentation/command-reference/management-variables/ips-createvariable/ `int IPS_CreateVariable(int $VariableType)` creates a new variable **Parameters** - `$VariableType` (int) | Value | Description | | ----- | -------------------------------------- | | 0 | creates a variable of type __boolean__ | | 1 | creates a variable of type __Integer__ | | 2 | creates a variable of type __float__ | | 3 | creates a variable of type __string__ | **Returns** (int): ID of the newly created variable | Value | Description | | ----- | -------------------------------------- | | 0 | creates a variable of type __boolean__ | | 1 | creates a variable of type __Integer__ | | 2 | creates a variable of type __float__ | | 3 | creates a variable of type __string__ | **Example** ```php // Create a float variable $VarID_room temperature = IPS_CreateVariable(2); ``` ## IPS_DeleteVariable Source: https://www.symcon.de/en/service/documentation/command-reference/management-variables/ips-deletevariable/ `bool IPS_DeleteVariable(int $VariableID)` deletes a variable **Parameters** - `$VariableID` (int): ID of the variable **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. ID of the variable **Example** ```php // Delete the variable 47788 IPS_DeleteVariable(47788); ``` ## IPS_GetVariable Source: https://www.symcon.de/en/service/documentation/command-reference/management-variables/ips-getvariable/ `array IPS_GetVariable(int $VariableID)` retuns extensive information about a variable **Parameters** - `$VariableID` (int): ID of the variable **Returns** (array): The following information is available as key => value pairs: | Index | Type | Description | | ------------------------------------------ | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | __VariableAction__ | integer | ID of the instance that is notified about desired changes to the variable. 0 for none or deactivated connection | | __VariableChanged__ | float | Unix timestamp of the most recent variable change | | __VariableCustomAction__ | integer | ID of the script that starts on desired changes to the variable from the visualization. If an existing default action is disabled, the non-existent ScriptID 1 is given. (Since version 2.5 # 2300) | | __VariableCustomPresentation__ (since 8.0) | array | User-defined presentation. Empty array if no presentation is specified. | | __VariableCustomProfile__ | string | Name of the user defined profile. Empty if no profile is specified | | __VariableID__ | integer | ID of the variable | | __VariableIsLocked__ | boolean | Indicates if the variable is above the variable limit and thus cannot be written (Available since Version 2.3) | | __VariableProfile__ | string | Name of the system profile. Empty if no profile is specified | | __VariablePresentation__ (since 8.0) | array | System presentation. Empty array if no presentation is specified. | | __VariableType__ (since 4.0) | integer | Type of the variable (0: Boolean, 1: Integer, 2: Float, 3: String) | | __VariableUpdated__ | float | Unix timestamp of the most recent variable update | | __VariableValue__ (until 3.4) | array | see table Variable Value (replaced by VariableType and [GetValue](access-variables.md)) | _Table: Variable value_ | Index | Type | Description | | ---------------- | -------- | ------------------------------------------------------------------ | | __ValueType__ | integer | Type of the variable (0: Boolean, 1: Integer, 2: Float, 3: String) | | __ValueBoolean__ | boolean | Value of the variable depending on __ValueType__ | | __ValueInteger__ | integer | Value of the variable depending on __ValueType__ | | __ValueFloat__ | float | Value of the variable depending on __ValueType__ | | __ValueString__ | string   | Value of the variable depending on __ValueType__ | ID of the variable **Example** ```php // Since version 4.0 print_r(IPS_GetVariable(40770)); /* Examplary output: Array ( [VariableChanged] => 1246039629 [VariableCustomAction] => 0 [VariableCustomProfile] => BoolProfile [VariableID] => 40770 [VariableIsLocked] => [VariableProfile] => ~Switch [VariableType] => 0 [VariableUpdated] => 1246039629 ) */ print_r(IPS_GetVariableCompatibility(40770)); /* Examplary output: Array ( [VariableChanged] => 1246039629 [VariableCustomAction] => 0 [VariableCustomProfile] => BoolProfile [VariableID] => 40770 [VariableIsLocked] => [VariableProfile] => ~Switch [VariableUpdated] => 1246039629 [VariableValue] => Array ( [ValueArray] => Array ( ) [ValueBoolean] => 1 [ValueFloat] => 0 [ValueIndex] => Array ( [IndexInt] => 0 [IndexStr] => [IndexType] => 0 ) [ValueInteger] => 0 [ValueString] => [ValueType] => 0 ) ) */ // Until version 3.4 print_r(IPS_GetVariable(40770)); /* Exemplary output: Array ( [VariableChanged] => 1246039629 [VariableCustomAction] => 0 [VariableCustomProfile] => BoolProfile [VariableID] => 40770 [VariableIsLocked] => [VariableProfile] => ~Switch [VariableUpdated] => 1246039629 [VariableValue] => Array ( [ValueArray] => Array ( ) [ValueBoolean] => 1 [ValueFloat] => 0 [ValueIndex] => Array ( [IndexInt] => 0 [IndexStr] => [IndexType] => 0 ) [ValueInteger] => 0 [ValueString] => [ValueType] => 0 ) ) */ ``` ## IPS_GetVariableEventList Source: https://www.symcon.de/en/service/documentation/command-reference/management-variables/ips-getvariableeventlist/ `array IPS_GetVariableEventList(int $VariableID)` returns a list of all events that are associated to a variable **Parameters** - `$VariableID` (int): ID of the variable **Returns** (array): List of IDs of all events associated to the variable ID of the variable **Example** ```php $events = IPS_GetVariableEventList(12345); print_r($events); // determines all events of the current script ``` ## IPS_GetVariableIDByName Source: https://www.symcon.de/en/service/documentation/command-reference/management-variables/ips-getvariableidbyname/ `int IPS_GetVariableIDByName(string $VariableName, int $ParentID)` returns the ID of a variable by its name **Parameters** - `$VariableName` (string): Name of the variable - `$ParentID` (int): Object whose children are searched **Returns** (int): ID of the found variable, otherwise __FALSE__ Object whose children are searched **Example** ```php $VarID = @IPS_GetVariableIDByName("Rain fall", $ParentID); if ($VarID === false) echo "Variable not found!"; else echo "The Variable ID is: ". $VarID; ``` ## IPS_GetVariableList Source: https://www.symcon.de/en/service/documentation/command-reference/management-variables/ips-getvariablelist/ `array IPS_GetVariableList()` returns a list of all existing variables **Returns** (array): A list of all IDs of the variables This function determines the IDs of all registered IPS variables in IP Symcon. The IDs are listed in an array. If no variable exists, the array is empty. **Example** ```php $allVariables = IPS_GetVariableList(); print_r($allVariables); /* returns, e.g.: Array ( [0] => 37659 [1] => 18326 etc. ... */ ``` ## IPS_GetVariablePresentation Source: https://www.symcon.de/en/service/documentation/command-reference/management-variables/ips-getvariablepresentation/ `array IPS_GetVariablePresentation(int $VariablenID)` _Requires Symcon >= 8.1_ Returns all parameters of the currently used presentation **Parameters** - `$VariablenID` (int): VariableID of the variable whose representation is to be output **Returns** (array): An array with all parameters of the current variable presentation VariableID of the variable whose representation is to be output **Example** ```text print_r(IPS_GetVariablePresentation(12345)); /* Example Array ( [DIGITS] => 0 [CUSTOM_GRADIENT] => [] [ICON] => temperature-half [DECIMAL_SEPARATOR] => Client [GRADIENT_TYPE] => 1 [MAX] => 25 [PRESENTATION] => {6B9CAEEC-5958-C223-30F7-BD36569FC57A} [INTERVALS] => [] [INTERVALS_ACTIVE] => [MIN] => 15 [PERCENTAGE] => [PREFIX] => [STEP_SIZE] => 1 [SUFFIX] => °C [THOUSANDS_SEPARATOR] => [USAGE_TYPE] => 0 ) */ ``` ## IPS_SetVariableCustomAction Source: https://www.symcon.de/en/service/documentation/command-reference/management-variables/ips-setvariablecustomaction/ `bool IPS_SetVariableCustomAction(int $VariableID, int $ScriptID)` set a user defined action script for a variable **Parameters** - `$VariableID` (int): ID of the variable - `$ScriptID` (int): ID of the script that should be used as variable action. The nonexistent ScriptID 1 can be given to disable the default action. If a valid ScriptID is specified, it is used instead of the default action **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. ID of the script that should be used as variable action. The nonexistent ScriptID 1 can be given to disable the default action. If a valid ScriptID is specified, it is used instead of the default action **Example** ```php IPS_SetVariableCustomAction(12345, 44431); ``` ## IPS_SetVariableCustomPresentation Source: https://www.symcon.de/en/service/documentation/command-reference/management-variables/ips-setvariablecustompresentation/ `bool IPS_SetVariableCustomPresentation(int $VariableID, array $Presentation)` _Requires Symcon >= 8.0_ assigns a user-defined presentation to the variable **Parameters** - `$VariableID` (int): ID of the variable to which the presentation is to be assigned - `$Presentation` (array): The configuration of the presentation. Details can be found in the section [Presentations](../developer/sdk-tools/sdk-php.md). **Returns** (bool): If the command could be executed successfully, the result is __TRUE__, otherwise __FALSE__. The configuration of the presentation. Details can be found in the section [Presentations](../developer/sdk-tools/sdk-php.md). **Example** ```text // Sets the presentation of a variable to Slider with a minimum, maximum and suffix IPS_SetVariableCustomPresentation(12345, ['PRESENTATION' => VARIABLE_PRESENTATION_SLIDER, 'MIN' => 0, 'MAX' => 100, 'SUFFIX' => ' %']); // Sets the presentation of a variable to Enumeration with icons and colors. IPS_SetVariableCustomPresentation(12345, [ 'PRESENTATION' => VARIABLE_PRESENTATION_ENUMERATION, 'DISPLAY' => 1 /* Icon */, 'OPTIONS' => json_encode([ ['Value' => 1, 'Caption' => 'Automatic', 'IconActive' => true, 'IconValue' => 'circle-a'], ['Value' => 2, 'Caption' => 'Eco', 'IconActive' => true, 'IconValue' => 'circle-e', 'Color' => 40448], ['Value' => 3, 'Caption' => 'Manual', 'IconActive' => true, 'IconValue' => 'circle-m'], ]) ]); ``` ## IPS_SetVariableCustomProfile Source: https://www.symcon.de/en/service/documentation/command-reference/management-variables/ips-setvariablecustomprofile/ `bool IPS_SetVariableCustomProfile(int $VariableID, string $ProfileName)` _Requires Symcon >= 3.0_ sets a user defined profile for a variable **Parameters** - `$VariableID` (int): ID of the variable - `$ProfileName` (string): Name of the profile. Available profiles can be queried via [IPS_GetVariableProfileList](management-variables.md). If an empty string is used, the custom profile is disabled. **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. Name of the profile. Available profiles can be queried via [IPS_GetVariableProfileList](management-variables.md). If an empty string is used, the custom profile is disabled. **Example** ```php IPS_SetVariableCustomProfile(12345, "~Switch"); ``` ## IPS_VariableExists Source: https://www.symcon.de/en/service/documentation/command-reference/management-variables/ips-variableexists/ `bool IPS_VariableExists(int $VariableID)` checks if a variable exists **Parameters** - `$VariableID` (int): ID of the variable **Returns** (bool): If the variable exists, __TRUE__ is returned, otherwise __FALSE__. ID of the variable **Example** ```php if (IPS_VariableExists(44788)) echo "Variable already exists!"; ``` ## Variable Presentation Source: https://www.symcon.de/en/service/documentation/command-reference/management-variables/variable-presentation/ ## IPS_GetPresentation Source: https://www.symcon.de/en/service/documentation/command-reference/management-variables/variable-presentation/ips-getpresentation/ `array IPS_GetPresentation(string $PresentationID)` _Requires Symcon >= 8.0_ provides comprehensive information about a specific representation **Parameters** - `$PresentationID` (string): The ID of the presentation, formatted as GUID **Returns** (array): The following information is available as __key => value__ pairs: | Index | Type | Description | | -------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | | __caption__ | string | The display name of the presentation. | | __chart__ | array | An array with parameters for the display of a chart (see chart table) | | __condition__ | array | A list of conditions that the parameters of the chart must fulfill. | | __conversions__ | array | A list of statements that are used to adjust parameters for different types of variables | | __form__ | array/string | The configuration form determines how the parameters can be adjusted in the variables dialog or the template manager. | | __format__ | array/string | "The formatting of values within this presentation | | __id__ | string | The ID of the presentation, formatted as GUID | | __locale__ | array | The localization of the presentation | | __presentationParameters__ | array | A list describing the default values of the parameters of this presentation | | __presentationValue__ | string | The default value which is displayed in the presentation preview. Alternatively, can also contain PHP code as a string or array that returns the value | | __restrictions__ | array | A list of restrictions that defines for which variables this presentation is available | __chart table__ Each value can either be a number or the name of the parameter whose value is to be used. | Index | Type | Description | | ------------ | -------------------- | ------------------------------- | | __min__ | integer/float/string | Parameter for the minimum value | | __max__ | integer/float/string | Parameter for the maximum value | | __stepSize__ | integer/float/string | Parameter for the step size | The ID of the presentation, formatted as GUID **Example** ```php IPS_GetPresentation('{6B9CAEEC-5958-C223-30F7-BD36569FC57A}' /* Slider */); ``` ## IPS_GetPresentationForm Source: https://www.symcon.de/en/service/documentation/command-reference/management-variables/variable-presentation/ips-getpresentationform/ `string IPS_GetPresentationForm(string $PresentationID, int $VariableType, array $Parameters)` _Requires Symcon >= 8.0_ returns the configuration form of a representation for a variable type **Parameters** - `$PresentationID` (string): The ID of the presentation, formatted as GUID - `$VariableType` (int): The type of variable whose form is to be returned - `$Parameters` (array): The parameter list to be used for the form **Returns** (string): The form of the described presentation as a JSON-encoded string. The parameter list to be used for the form **Example** ```text IPS_GetPresentationForm('{6B9CAEEC-5958-C223-30F7-BD36569FC57A}' /* Slider */, 1 /* Integer */, []); ``` ## IPS_GetPresentations Source: https://www.symcon.de/en/service/documentation/command-reference/management-variables/variable-presentation/ips-getpresentations/ `string IPS_GetPresentations()` _Requires Symcon >= 8.0_ provides all presentations of the system **Returns** (string): A JSON-encoded list of all available presentations. The fields of the individual presentations are described in more detail [here](management-variables.md). Returns a JSON-encoded list of all available presentations. **Example** ```text // All presentations as array $presentations = json_decode(IPS_GetPresentations(), true); ``` ## IPS_PresentationExists Source: https://www.symcon.de/en/service/documentation/command-reference/management-variables/variable-presentation/ips-presentationexists/ `bool IPS_PresentationExists(string $PresentationID)` _Requires Symcon >= 8.0_ Checks whether a specific presentation exists **Parameters** - `$PresentationID` (string): The ID of the presentation to be checked, formatted as GUID **Returns** (bool): If the presentation exists in the system, **TRUE** is returned, otherwise **FALSE**. The ID of the presentation to be checked, formatted as GUID **Example** ```text if (IPS_PresentationExists('{60AE6B26-B3E2-BDB1-A3A1-BE232940664B}' /* Slider */)) { echo 'Presentation already exists!'; } ``` ## Management of Templates Source: https://www.symcon.de/en/service/documentation/command-reference/management-variables/variable-presentation/management-of-templates/ ## IPS_CreateTemplate Source: https://www.symcon.de/en/service/documentation/command-reference/management-variables/variable-presentation/management-of-templates/ips-createtemplate/ `string IPS_CreateTemplate(string $PresentationID)` _Requires Symcon >= 8.0_ creates a new template for a specific display **Parameters** - `$PresentationID` (string): The ID of the presentation, formatted as GUID, for which a new template is to be created **Returns** (string): The ID of the newly created template formatted as GUID The ID of the presentation, formatted as GUID, for which a new template is to be created **Example** ```php $vorlage = IPS_CreateTemplate('{6B9CAEEC-5958-C223-30F7-BD36569FC57A}' /* Slider */); ``` ## IPS_DeleteTemplate Source: https://www.symcon.de/en/service/documentation/command-reference/management-variables/variable-presentation/management-of-templates/ips-deletetemplate/ `bool IPS_DeleteTemplate(string $TemplateID)` _Requires Symcon >= 8.0_ Deletes a template **Parameters** - `$TemplateID` (string): The ID of the template to be deleted, formatted as GUID **Returns** (bool): If the command could be executed successfully, it returns **TRUE**, otherwise **FALSE**. The ID of the template to be deleted, formatted as GUID **Example** ```text // Deletes the template with the id {8422E41F-00AA-33F7-E8A4-BB516EC0056B} IPS_DeleteTemplate('{8422E41F-00AA-33F7-E8A4-BB516EC0056B}'); ``` ## IPS_GetTemplate Source: https://www.symcon.de/en/service/documentation/command-reference/management-variables/variable-presentation/management-of-templates/ips-gettemplate/ `array IPS_GetTemplate(string $TemplateID)` _Requires Symcon >= 8.0_ provides comprehensive information about a template **Parameters** - `$TemplateID` (string): The ID of the template, formatted as GUID **Returns** (array): The following information is available as **key=>value** pairs: | Index | Type | Description | | -------------- | ------ | --------------------------------------------------------- | | TemplateID | string | The ID of the template | | PresentationID | string | The ID of the presentation to which this template belongs | | DisplayName | string | The display name of the template | | Values | array | An array with the values of the template | | ReadOnly | bool | Whether the template can be changed | The ID of the template, formatted as GUID **Example** ```text // Returns information about the room temperature template print_r(IPS_GetTemplate('{868B087E-A38D-2155-EBE0-157AFBBF9E8C}' /* Raumptemperatur */); /* Beispielausgabe: Array ( [TemplateID] => {868B087E-A38D-2155-EBE0-157AFBBF9E8C} [PresentationID] => {6B9CAEEC-5958-C223-30F7-BD36569FC57A} [DisplayName] => Room Temperature [Values] => Array ( [MIN] => 15 [DIGITS] => 1 [CUSTOM_GRADIENT] => [] [DECIMAL_SEPARATOR] => Client [GRADIENT_TYPE] => 1 [MAX] => 25 [INTERVALS] => [] [INTERVALS_ACTIVE] => [PERCENTAGE] => [PREFIX] => [STEP_SIZE] => 0.5 [SUFFIX] => °C [THOUSANDS_SEPARATOR] => [USAGE_TYPE] => 0 ) [IsReadOnly] => 1 ) */ ``` ## IPS_GetTemplateList Source: https://www.symcon.de/en/service/documentation/command-reference/management-variables/variable-presentation/management-of-templates/ips-gettemplatelist/ `array IPS_GetTemplateList()` _Requires Symcon >= 8.0_ provides all available templates **Returns** (array): A list of the IDs of all available templates The function returns the IDs of all available templates in an array. The function [IPS_GetTemplate](management-variables.md) can be used for more information about the individual templates. **Example** ```text print_r(IPS_GetTemplateList()); ``` ## IPS_GetTemplateListByPresentation Source: https://www.symcon.de/en/service/documentation/command-reference/management-variables/variable-presentation/management-of-templates/ips-gettemplatelistbypresentation/ `array IPS_GetTemplateListByPresentation(string $PresentationID)` _Requires Symcon >= 8.0_ provides a list of the templates of a representation **Parameters** - `$PresentationID` (string): The ID of the presentation whose templates are to be listed **Returns** (array): An array of the IDs of a presentation The ID of the presentation whose templates are to be listed **Example** ```text print_r(IPS_GetTemplateListByPresentation('{6B9CAEEC-5958-C223-30F7-BD36569FC57A}' /* Slider */)); ``` ## IPS_SetTemplateName Source: https://www.symcon.de/en/service/documentation/command-reference/management-variables/variable-presentation/management-of-templates/ips-settemplatename/ `bool IPS_SetTemplateName(string $TemplateID, string $Name)` _Requires Symcon >= 8.0_ sets the name of a template **Parameters** - `$TemplateID` (string): The ID of the template whose name is to be customized - `$Name` (string): The value to which the name of the template should be set **Returns** (bool): If the command could be executed successfully, it returns **TRUE** as the result, otherwise **FALSE**. The value to which the name of the template should be set **Example** ```text IPS_SetTemplateName('{3C257416-99FE-0386-D8D3-20437FF62CEB}' , 'New Template'); ``` ## IPS_SetTemplateValues Source: https://www.symcon.de/en/service/documentation/command-reference/management-variables/variable-presentation/management-of-templates/ips-settemplatevalues/ `bool IPS_SetTemplateValues(string $TemplateID, array $Values)` _Requires Symcon >= 8.0_ sets the values of a template **Parameters** - `$TemplateID` (string): The ID of the template whose values are to be adjusted - `$Values` (array): An array to which the values of the template are to be set **Returns** (bool): If the command could be executed successfully, it returns **TRUE**, otherwise **FALSE**. An array to which the values of the template are to be set **Example** ```php IPS_SetTemplateValues('{E35A875A-E9BC-4C6D-A550-F4DA423BCF18}', ['PROFILE' => '~Intensity.100']); ``` ## IPS_TemplateExists Source: https://www.symcon.de/en/service/documentation/command-reference/management-variables/variable-presentation/management-of-templates/ips-templateexists/ `bool IPS_TemplateExists(string $TemplateID)` _Requires Symcon >= 8.0_ Checks whether a template exists **Parameters** - `$TemplateID` (string): ID of the template to be checked formatted as GUID **Returns** (bool): If a template with the **TemplateGUID** exists, TRUE is returned, otherwise FALSE. ID of the template to be checked formatted as GUID **Example** ```php if (IPS_TemplateExists('{868B087E-A38D-2155-EBE0-157AFBBF9E8C}' /* room temperature */)) { echo 'Template already exists!'; } ``` ## Variable Profiles Source: https://www.symcon.de/en/service/documentation/command-reference/management-variables/variable-profiles/ ## IPS_CreateVariableProfile Source: https://www.symcon.de/en/service/documentation/command-reference/management-variables/variable-profiles/ips-createvariableprofile/ `bool IPS_CreateVariableProfile(string $ProfileName, int $VariableType)` creates a variable profile **Parameters** - `$ProfileName` (string): Name of the profile. Legal characters are A-Z, a-z, period (.), comma (,), and underscore (_) - `$VariableType` (int) | Value | Description | | ----- | -------------------------------------------------- | | 0 | creates a variable profile of the type __Boolean__ | | 1 | creates a variable profile of the type __Integer__ | | 2 | creates a variable profile of the type __Float__ | | 3 | creates a variable profile of the type __String__ | **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. | Value | Description | | ----- | -------------------------------------------------- | | 0 | creates a variable profile of the type __Boolean__ | | 1 | creates a variable profile of the type __Integer__ | | 2 | creates a variable profile of the type __Float__ | | 3 | creates a variable profile of the type __String__ | **Example** ```php //Create a profile for Boolean variables IPS_CreateVariableProfile("Switch", 0); //... further configuration of the profile is done here ``` ## IPS_DeleteVariableProfile Source: https://www.symcon.de/en/service/documentation/command-reference/management-variables/variable-profiles/ips-deletevariableprofile/ `bool IPS_DeleteVariableProfile(string $ProfileName)` deletes a variable profile **Parameters** - `$ProfileName` (string): Name of profile **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. Name of profile **Example** ```php //Deleting the profile switch IPS_DeleteVariableProfile("Switch"); ``` ## IPS_GetVariableProfile Source: https://www.symcon.de/en/service/documentation/command-reference/management-variables/variable-profiles/ips-getvariableprofile/ `array IPS_GetVariableProfile(string $ProfileName)` returns extensive information about a variable profile **Parameters** - `$ProfileName` (string): Name of the profile **Returns** (array): The following information is available as key => value pairs: | Index | Type | Description | | ---------------- | ------- | ------------------------------------------------------------------------- | | __Associations__ | array | Array with value, name, icon pairs (see Associations Table) | | __Icon__ | string | Icon of the variable profile | | __IsReadOnly__ | boolean | TRUE if the profile is a system created profile, which can not be changed | | __MaxValue__ | float | The minimum value used for the visualization | | __MinValue__ | float | The maximum value used for the visualization | | __StepSize__ | float | Step size for the visualization, 0 when the association table is used | | __Digits__ | integer | Number of decimal places | | __Prefix__ | array | Prefix for the visualization | | __Suffix__ | integer | Suffix for the visualization | | __ProfileName__ | string | Name of the profile. (~ = System profile) | | __ProfileType__ | integer | Type of profile (0: Boolean, 1: Integer, 2: Float, 3: String) | _Associations Table_ | Index | Type | Description | | --------- | ------- | ------------------------------------------------------------------------------------- | | __Value__ | float | Value that is associated with the given name, icon, and color | | __Name__ | string | Name of the specified value | | __Icon__ | string | Icon of the specified value | | __Color__ | integer | Color value in HTML format, e.g., 0x0000FF for blue. Special case: -1 for transparent | Name of the profile **Example** ```php print_r( IPS_GetVariableProfile("~WindDirection") ); /* returns e.g.: Array ( [Associations] => Array ( ) [Digits] => 1 [Icon] => WindDirection [IsReadOnly] => 1 [MaxValue] => 360 [MinValue] => 0 [Prefix] => [ProfileName] => ~WindDirection [ProfileType] => 2 [StepSize] => 60 [Suffix] => ° ) */ ``` ## IPS_GetVariableProfileList Source: https://www.symcon.de/en/service/documentation/command-reference/management-variables/variable-profiles/ips-getvariableprofilelist/ `array IPS_GetVariableProfileList()` returns a list of all existing variable profiles **Returns** (array): List of names of all variables profiles This function lists the name of all existing variable profiles and returns them as an array. **Example** ```php $Profile = IPS_GetVariableProfileList(); print_r($Profile); /* returns e.g.: Array ( [0] => ~Temperature [1] => ~Humidity [2] => ~AirPressure etc. ... */ ``` ## IPS_GetVariableProfileListByType Source: https://www.symcon.de/en/service/documentation/command-reference/management-variables/variable-profiles/ips-getvariableprofilelistbytype/ `array IPS_GetVariableProfileListByType(int $VariablenTyp)` returns a list of all existing variable profiles of a specific type **Parameters** - `$VariablenTyp` (int) | Value | Description | | ----- | ------------------------------- | | 0 | Search for the type __Boolean__ | | 1 | Search for the type __Integer__ | | 2 | Search for the type __Float__ | | 3 | Search for the type __String__ | **Returns** (array): List of names of all variables profiles | Value | Description | | ----- | ------------------------------- | | 0 | Search for the type __Boolean__ | | 1 | Search for the type __Integer__ | | 2 | Search for the type __Float__ | | 3 | Search for the type __String__ | **Example** ```php $Profile = IPS_GetVariableProfileListByType(0); print_r($Profile); /* returns e.g.: Array ( [0] => ~Switch [1] => ~Alert [2] => ~Alert.Reversed etc. ... */ ``` ## IPS_SetVariableProfileAssociation Source: https://www.symcon.de/en/service/documentation/command-reference/management-variables/variable-profiles/ips-setvariableprofileassociation/ `bool IPS_SetVariableProfileAssociation(string $ProfileName, mixed $Value, string $Name, string $Icon, int $Color)` modifies the association table of a variable profile **Parameters** - `$ProfileName` (string): Name of the profile. Available profiles can be queried via [IPS_GetVariableProfileList](management-variables.md) - `$Value` (mixed): The value that should be associated to the name, icon, and color - `$Name` (string): Name of the specified value - `$Icon` (string): Icon of the specified value - `$Color` (int): Color value in HTML format, e.g., 0x0000FF for blue. Special case: -1 for transparent **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. Color value in HTML format, e.g., 0x0000FF for blue. Special case: -1 for transparent **Example** ```php //Creating the value 1 in the white color IPS_SetVariableProfileAssociation("Temperature", 1, "Value 1", "Speaker", 0xFFFFFF); //Create Value for "sum" in the yellow color IPS_SetVariableProfileAssociation("Season", "sum", "Summer", "Sun", 0xFFFF00); //Delete value 1 IPS_SetVariableProfileAssociation("Temperature", 1, "", "", -1); ``` ## IPS_SetVariableProfileDigits Source: https://www.symcon.de/en/service/documentation/command-reference/management-variables/variable-profiles/ips-setvariableprofiledigits/ `bool IPS_SetVariableProfileDigits(string $ProfileName, int $Digits)` sets the digits of a variable profile **Parameters** - `$ProfileName` (string): Name of the profile. Available profiles can be queried via [IPS_GetVariableProfileList](management-variables.md) - `$Digits` (int): Number of decimal places displayed in the visualization **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. Number of decimal places displayed in the visualization **Example** ```php IPS_SetVariableProfileDigits("Temperature", 1); ``` ## IPS_SetVariableProfileIcon Source: https://www.symcon.de/en/service/documentation/command-reference/management-variables/variable-profiles/ips-setvariableprofileicon/ `bool IPS_SetVariableProfileIcon(string $ProfileName, string $Icon)` sets the icon for a variable profile **Parameters** - `$ProfileName` (string): Name of the profile. Available profiles can be queried via [IPS_GetVariableProfileList](management-variables.md) - `$Icon` (string): Icon **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. Icon **Example** ```php IPS_SetVariableProfileIcon("Temperature", "Temperature"); ``` ## IPS_SetVariableProfileText Source: https://www.symcon.de/en/service/documentation/command-reference/management-variables/variable-profiles/ips-setvariableprofiletext/ `bool IPS_SetVariableProfileText(string $ProfileName, string $Prefix, string $Suffix)` sets prefix and suffix for a variable profile **Parameters** - `$ProfileName` (string): Name of the profile. Available profiles can be queried via [IPS_GetVariableProfileList](management-variables.md) - `$Prefix` (string): Prefix of the value - `$Suffix` (string): Suffix of the value **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. Suffix of the value **Example** ```php IPS_SetVariableProfileText("Switch", "", "%"); ``` ## IPS_SetVariableProfileValues Source: https://www.symcon.de/en/service/documentation/command-reference/management-variables/variable-profiles/ips-setvariableprofilevalues/ `bool IPS_SetVariableProfileValues(string $ProfileName, float $MinValue, float $MaxValue, float $StepSize)` sets the minimal value, maximal value, and stepsize of a variable profile **Parameters** - `$ProfileName` (string): Name of the profile. Available profiles can be queried via [IPS_GetVariableProfileList](management-variables.md). - `$MinValue` (float): Minimum value used for the visualization. This soft limitation does not affect the variable value. - `$MaxValue` (float): Maximum value used for the visualization. This soft limitation does not affect the variable value. - `$StepSize` (float): Step size used for the visualization to create the setpoint change bar. A step size of __0__ activates the association list. **Returns** (bool): If the command succeeds, it returns __TRUE__, otherwise __FALSE__. Step size used for the visualization to create the setpoint change bar. A step size of __0__ activates the association list. **Example** ```php IPS_SetVariableProfileValues("Temperature", -10, 40, 0.5); ``` ## IPS_VariableProfileExists Source: https://www.symcon.de/en/service/documentation/command-reference/management-variables/variable-profiles/ips-variableprofileexists/ `bool IPS_VariableProfileExists(string $ProfileName)` checks if a variable profile exists **Parameters** - `$ProfileName` (string): Name of the variable profile **Returns** (bool): If the variable profile with the name __ProfileName__ exists, __TRUE__ is returned, otherwise __FALSE__. Name of the variable profile **Example** ```php if (IPS_VariableProfileExists("Temperature")) echo "Profile already exists!"; ```