Aktualisiert – Januar 12, 2023
For the heating control, switching on when the target temperature falls below and switching off when it is reached, a request is sent to the wall thermostat regarding both value channels.
The values received back are written into a variable.
Both variable values are then compared with each other and the required action is carried out according to the result.
- Installed hardware
– Homematic 4-way relay module HM-LC-Sw4-WM
– Homematic wall thermostat HM-TC-IT-WM-W-EU
The program:

The script:
real Var_SV_IT_set;
real Var_SV_IT_actual;
var SV_IT_set;
var SV_IT_actual;
Var_SV_IT_set = dom.GetObject("BidCos-RF.MEQ1576103:2.SET_TEMPERATURE").Value();
WriteLine("Var_SV_IT_set");WriteLine(Var_SV_IT_set);
dom.GetObject("SV_IT_set").State(Var_SV_IT_set);
Var_SV_IT_actual = dom.GetObject("BidCos-RF.MEQ1576103:1.TEMPERATURE").Value();
WriteLine("Var_SV_IT_actual");WriteLine(Var_SV_IT_actual);
dom.GetObject("SV_IT_actual").State(Var_SV_IT_actual);
if (Var_SV_IT_set > Var_SV_IT_actual)
{
dom.GetObject('SV_IT').State(0);
WriteLine("Var_SV_IT_actual");WriteLine("small Var_SV_IT_set");
}
else
{
dom.GetObject('SV_IT').State(1);
WriteLine("Var_SV_IT_actual");WriteLine("greater than Var_SV_IT_set");
}
The output of the script (if the lines WriteLine(" ... ")
are not commented out):
Var_SV_IT_set
23.000000
Var_SV_IT_actual
22.300000
Var_SV_IT_actual
small Var_SV_IT_set
Here the target temperature is, for example, 23 °C. The actual temperature is 22.3 °C and is therefore smaller than the target temperature. The target temperature has not been reached and the query result is therefore “wrong”, which is why the heating is switched ON.
The line of code introduced with the sequence dom.GetObject
, followed by the device type “BidCos RF.
“ for non-IP devices
dom.GetObject("BidCos-RF.IEQ0101895:1.STATE").State(1);
transfers to the switching actuator with the specified address “IEQ0101895
“ on his channel “1.STATE
“ the status “1”, for “on”.
If the target temperature is reached, the query result becomes “true” and the heating is switched OFF, which is initiated analogously when the status changes to “0”.
In the CCU Historian (Statistics Add-On) the regulation then looks like this:

The top two curve sections show the status of the two relays, which switch the heating coils with 500 W or 1,000 W (1 = ON, 0 = OFF).
The third section represents the relay connected in parallel to the existing ALDE thermostat that switches the pump.
The fourth section shows the target temperature set on the wall thermostat with the blue curve and the measured actual temperature in the purple curve.
The inertia of the control is 0.2 °C, the switch-on accuracy is 0.1 °C.
The fifth section shows the course of the outside temperature.
The sixth section shows the continuous power consumption. The small dips represent the off/on periods of the refrigerator, the peaks represent the temporary consumption of, for example, a coffee machine or vacuum cleaner.