Value Presentation
Require: Symcon >= 8.0
Parameter
Information about the visual properties and meanings of the parameters can be found in the Object Presentation.
| Name |
Type |
Parameter |
Description |
| PRESENTATION |
String |
The ID of the presentation |
VARIABLE_PRESENTATION_VALUE_PRESENTATION {3319437D-7CDE-699D-750A-3C6A3841FA75} |
| ICON |
String |
Default Icon |
Icons |
| COLOR |
Integer |
Default Color |
|
| PREFIX |
String |
Prefix |
|
| SUFFIX |
String |
Suffix |
|
Float and Integer
| Name |
Type |
Parameter |
Description |
| USAGE_TYPE |
Integer |
Variable Usage |
0: None of these, 1: Temperature |
| PERCENTAGE |
Boolean |
Display Type |
true: Percentage, false: Absolute |
| MIN |
Integer/Float |
Minimum Value |
|
| MAX |
Integer/Float |
Maximum Value |
|
| THOUSANDS_SEPARATOR |
String |
Thousands Separator |
Client: Default from Client, otherwise directly the value |
| DIGITS |
Integer |
Digits |
|
| DECIMAL_SEPARATOR |
String |
Decimal Separator |
Client: Default from Client, otherwise directly the value |
| INTERVALS_ACTIVE |
Boolean |
Use updated parameters for specific intervals |
|
| INTERVALS |
String |
Intervals |
JSON-encoded list of objects, the exact parameters are described under Intervals |
Intervals
| Name |
Type |
Parameter |
Description |
| IntervalMinValue |
Integer/Float |
Interval Start |
|
| IntervalMaxValue |
Integer/Float |
Interval End |
|
| ConstantActive |
Boolean |
Display |
false: Formatted Value, true: Constant |
| ConstantValue |
String |
Constant |
|
| ConversionFactor |
Integer/Float |
Conversion Factor |
|
| PrefixActive |
Boolean |
Overwrite Prefix |
|
| PrefixValue |
String |
Prefix |
|
| SuffixActive |
Boolean |
Overwrite Suffix |
|
| SuffixValue |
String |
Suffix |
|
| DigitsActive |
Boolean |
Overwrite Digits |
|
| DigitsValue |
Integer |
Digits |
|
| IconActive |
Boolean |
Overwrite Icon |
|
| IconValue |
String |
Icon |
|
| ColorActive |
Boolean |
Overwrite Color |
|
| ColorValue |
Integer |
Color |
|
Boolean and String
| Name |
Type |
Parameter |
Description |
| MULTILINE |
Boolean |
Multiline |
|
| OPTIONS |
String |
Options |
JSON-encoded list of objects, the exact parameters are described under Options described |
Options
| Name |
Type |
Parameter |
Description |
| Value |
Boolean/String |
Value |
Depends on the type of the variable |
| Caption |
String |
Caption |
|
| IconActive |
Boolean |
Overwrite Icon |
|
| IconValue |
String |
Icon |
Icons |
| ColorActive |
Boolean |
Overwrite Color |
|
| ColorValue |
Integer |
Color |
|
Templates
// Registers a variable with a temperature template.
$this->RegisterVariableFloat('Temperature', 'Room temperature', [
'PRESENTATION' => VARIABLE_PRESENTATION_VALUE_PRESENTATION,
'TEMPLATE' => VARIABLE_TEMPLATE_VALUE_PRESENTATION_ROOM_TEMPERATURE,
]);
The templates are grouped by use case. The templates under States are for variables of type Boolean, all others for variables of type Integer and Float.
Climate
| Name |
Constant |
Value |
| Room Temperature |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_ROOM_TEMPERATURE |
{90AF8F8F-183F-BBFD-E078-35FAB6DCFE4F} |
| Outside Temperature |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_OUTSIDE_TEMPERATURE |
{EF547792-2022-434E-B892-E38F1DC8C19A} |
| Temperature (Fahrenheit) |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_TEMPERATURE_FAHRENHEIT |
{194A0A49-73D7-4513-83AB-3C2F2604D20D} |
| Temperature Difference |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_TEMPERATURE_DIFFERENCE |
{087C21DB-409E-4BFA-AB4F-2407143D40D2} |
| Humidity |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_HUMIDITY |
{2E7A89A0-357D-43B0-8603-0D637950C814} |
| CO₂ |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_CO2 |
{75C4DCF6-79BA-49E8-9E07-C14F3B237A40} |
| CO₂ (Color) |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_CO2_COLOR |
{05FE3AF1-A8C0-4314-BED9-6F1308BCDC00} |
| Particulate Matter |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_PARTICULATE_MATTER |
{95A5B99A-9227-4ED9-AD51-989998609BA7} |
Weather
| Name |
Constant |
Value |
| Illumination |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_ILLUMINATION |
{18D580EF-DD37-40B3-8323-E90C52043E2D} |
| Wind Speed |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_WIND_SPEED |
{D3E514E9-92A9-425E-8F1E-C837DFB086AC} |
| Wind Speed (km/h) |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_WIND_SPEED_KMH |
{D29BF6AA-9ECA-44D9-8910-FE5366A80C66} |
| Wind Direction |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_WIND_DIRECTION |
{FB50A80C-A0F1-4A9E-9524-689F4CD0832E} |
| Air Pressure |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_AIR_PRESSURE |
{30F233AD-B694-4B76-8E1A-8B289646341C} |
| Rainfall |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_RAINFALL |
{B87BFCA4-0B30-4E3D-B3FF-4585C845C9A5} |
| Solar Radiation |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_SOLAR_RADIATION |
{4B0B5196-C0F3-4DEC-9225-06E5C7BC7A21} |
| UV Index |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_UV_INDEX |
{6E437614-CCC9-4AFE-8628-C3915F68670E} |
| UV Index (Color) |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_UV_INDEX_COLOR |
{85A51031-C698-42D2-85EB-6697D1FB2018} |
Electricity
| Name |
Constant |
Value |
| Power |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_POWER |
{2FED3D39-073D-6037-901B-2586A1AB5569} |
| Energy |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_ENERGY |
{C899FCFA-063E-897E-9DA4-28ADD278EED5} |
| Voltage |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_VOLTAGE |
{0C18F36A-6C1A-4323-9BEA-ED954FB83957} |
| Current |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_CURRENT |
{CB99BC01-5E3F-4A1A-935B-80F736EBCB43} |
| Frequency |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_FREQUENCY |
{EE40F51E-BE5A-4898-9412-E843E346CA70} |
| Power Factor |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_POWER_FACTOR |
{CCE8B319-608A-4C34-893C-C6684061D15F} |
| Apparent Power |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_APPARENT_POWER |
{6B8CAF49-1334-402E-82F1-EA339FF284E7} |
| Reactive Power |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_REACTIVE_POWER |
{3C43F297-628E-4B2E-8CFA-8FE52DB02B72} |
| Apparent Energy |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_APPARENT_ENERGY |
{74682D66-4BB0-4ECC-9C02-62D0E86AFCDE} |
| Reactive Energy |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_REACTIVE_ENERGY |
{8CBC9094-0EBD-4ED6-A844-AE7CF673BE8F} |
Consumption
| Name |
Constant |
Value |
| Gas Consumption |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_GAS_CONSUMPTION |
{025CC52D-6E77-4401-ACFC-B35F7B86B36C} |
| Water Consumption |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_WATER_CONSUMPTION |
{DF552848-F876-4C69-A30C-3DD8BFDB4053} |
| Flow Rate |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_FLOW_RATE |
{4524E746-70DA-46EC-BD17-00E8B01FC890} |
| Air Flow |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_AIR_FLOW |
{C96AEEF6-9140-4361-9631-01A728C3E52A} |
General
| Name |
Constant |
Value |
| Battery |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_BATTERY |
{7BD38CF5-07F2-5B5B-8F7F-15398B823BFC} |
| Battery (Color) |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_BATTERY_COLOR |
{C90EF36A-165E-D0B0-032C-F468F483D42B} |
| Percent |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_PERCENT |
{509D7723-BDD0-40F9-B3EC-9F7DC597DF1A} |
| Angle |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_ANGLE |
{6ECD46A1-E0AA-468F-8B02-492F48566345} |
| Operating Hours |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_OPERATING_HOURS |
{A2F11B70-E676-4F39-B6D1-89D9CE839B34} |
| Signal Strength |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_SIGNAL_STRENGTH |
{3AC2A6EF-992D-468E-B4E9-7FB715D6EFBC} |
| pH Value |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_PH_VALUE |
{61456608-6BDF-4362-9683-DF1ADA34D057} |
States
| Name |
Constant |
Value |
| Window |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_WINDOW |
{A51A0A4B-97CC-4699-BFB6-5EF4B47B6664} |
| Door |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_DOOR |
{A206855F-E320-4E11-8D7B-4F360B2AAC4C} |
| Presence |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_PRESENCE |
{1FCEF479-CD74-46D0-A31D-CA0C15D67387} |
| Motion |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_MOTION |
{E31FCBD0-5B44-4F1B-AC93-18334C975F8D} |
| Alarm |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_ALARM |
{900149ED-F292-4514-961B-D0E5392A16FD} |
| Fault |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_FAULT |
{D0D65868-9915-4EDE-B660-F376516615D8} |
| Rain |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_RAIN |
{E613947C-8ABE-47DB-B8A9-83C0331FA326} |
| Water Leak |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_WATER_LEAK |
{A44FE03C-98E1-40A4-965C-C5BF435E9862} |
| Day/Night |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_DAY_NIGHT |
{58B35AA1-EFCE-465E-8E0E-D01E7A2B37BF} |
| Heating/Cooling |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_HEATING_COOLING |
{D832720C-18E8-43F2-BEB4-C4A334174A00} |
| Door Lock |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_DOOR_LOCK |
{963D1B04-3BDA-4F9D-9AD8-05349086BC12} |
| Battery Low |
VARIABLE_TEMPLATE_VALUE_PRESENTATION_BATTERY_LOW |
{E1A39C20-528A-4461-9714-5DDA040D7C49} |
Examples
// When registering a variable for PHP modules
// An alert variable with an icon and background color
$this->RegisterVariableBoolean('Alarm', 'Alarm', [
'PRESENTATION' => VARIABLE_PRESENTATION_VALUE_PRESENTATION,
'OPTIONS' => json_encode([
['Value' => false, 'Caption' => 'OK', 'IconActive' => true, 'IconValue' => 'siren'],
['Value' => true, 'Caption' => 'Alarm', 'IconActive' => true, 'IconValue' => 'siren-on', 'ColorValue' => 16711680, 'ColorActive' => true],
])
]);
// Power in watts, with values above 1000 displayed in kilowatts
$this->RegisterVariableInteger('Power', 'Power', [
'PRESENTATION' => VARIABLE_PRESENTATION_VALUE_PRESENTATION,
'ICON' => 'bolt',
'SUFFIX' => ' W',
'INTERVALS_ACTIVE' => true,
'INTERVALS' => json_encode([
[
'IntervalMinValue' => 1000,
'IntervalMaxValue' => 999999,
'ConversionFactor' => 1000,
'SuffixActive' => true,
'SuffixValue' => ' kW',
'DigitsActive' => true,
'DigitsValue' => 2,
'ConstantActive' => false,
'PrefixActive' => false,
]
])
]);
// For existing variables via script
// Only icons are displayed. One option is highlighted in color.
IPS_SetVariableCustomPresentation(12345, [
'PRESENTATION' => VARIABLE_PRESENTATION_VALUE_PRESENTATION,
'OPTIONS' => json_encode([
['Value' => false, 'Caption' => 'OK', 'IconActive' => true, 'IconValue' => 'siren'],
['Value' => true, 'Caption' => 'Alarm', 'IconActive' => true, 'IconValue' => 'siren-on', 'ColorValue' => 16711680, 'ColorActive' => true],
])
]);
// Power in watts, with values above 1000 displayed in kilowatts
IPS_SetVariableCustomPresentation(12345, [
'PRESENTATION' => VARIABLE_PRESENTATION_VALUE_PRESENTATION,
'ICON' => 'bolt',
'SUFFIX' => ' W',
'INTERVALS_ACTIVE' => true,
'INTERVALS' => json_encode([
[
'IntervalMinValue' => 1000,
'IntervalMaxValue' => 999999,
'ConversionFactor' => 1000,
'SuffixActive' => true,
'SuffixValue' => ' kW',
'DigitsActive' => true,
'DigitsValue' => 2,
'ConstantActive' => false,
'PrefixActive' => false,
]
])
]);