To begin with, we will analyze a simple rule - when the temperature is exceeded, turn off the heater. The temperature is obtained from the 1-Wire sensor, the heater is connected to the Relay 1 of external WB-MRM2 relay module.
<syntaxhighlight lang="ecmascript">