Documentation
IPS_GetStatusVariableID
int IPS_GetStatusVariableID (int $InstanceID, string $VariableIdent)
Parameters
InstanceID | Instance ID |
VariableIdent | Status variable identifier. A listing can be retrieved via IPS_GetStatusVariableIdents. |
Returns
Variable ID of the variable associated with the status variable
Description
The documentation for this function is only available for reasons of compatibility and, since IP-Symcon 2.5, should no longer be used. Since version 2.5, this function is only emulated and should be replaced by the corresponding substitute functions. A replacement function is in the example (see below).
The function returns the VariableID of the variable associated with the instance's status variable InstanceID and the status variable identifier VariableIdent.
Example
//Display the status of, for example, an FS20 device without knowing the ID of the "Status" variable
echo GetValue(IPS_GetStatusVariableID(12345, "StatusVariable"));
// since version 2.6 replacement function
$InstanceID = "StatusVariable";
$VariableIdent = 12345;
$migrateIdents = Array(
"F05_StatusVar" => "Status",
"F10_TemperatureVar" => "Temperature",
"F12_Var0" => "Status0",
"F12_Var1" => "Status1",
"F1D_CounterVar1" => "Counter1",
"F1D_CounterVar2" => "Counter2",
"F20_Var0" => "Port0",
"F20_Var1" => "Port1",
"F20_Var2" => "Port2",
"F20_Var3" => "Port3",
"F26_TemperatureVar" => "Temperature",
"F26_VDDVar" => "VDD",
"F26_VADVar" => "VAD",
"F26_XSENSVar" => "XSENS",
"F28_TemperatureVar" => "Temperature",
"F29_Var0" => "Status0",
"F29_LatchVar0" => "Latch0",
"F29_Var1" => "Status1",
"F29_LatchVar1" => "Latch1",
"F29_Var2" => "Status2",
"F29_LatchVar2" => "Latch2",
"F29_Var3" => "Status3",
"F29_LatchVar3" => "Latch3",
"F29_Var4" => "Status4",
"F29_LatchVar4" => "Latch4",
"F29_Var5" => "Status5",
"F29_LatchVar5" => "Latch5",
"F29_Var6" => "Status6",
"F29_LatchVar6" => "Latch6",
"F29_Var7" => "Status7",
"F29_LatchVar7" => "Latch7",
"F2C_PositionVar" => "Position",
"F3A_Var0" => "Status0",
"F3A_Var1" => "Status1"
);
if(isset($migrateIdents[$VariableIdent]))
{
$VariableIdent = $migrateIdents[$VariableIdent];
}
$result = IPS_GetObjectIDByIdent($VariableIdent, $InstanceID);
echo $result;