LUA: Danfoss RS – Thermostat

LUA: Danfoss RS – Thermostat

LUA script for Fibaro HC2

Beacause winter is almost here we have prepared a simple LUA script for you that allows to utilize the full functinality of the Danfoss Z-Wave room sensor.

The Danfoss Z-Wave room sensor, besides measuring the temperature and reporting for the Z-Wave control unit, allows to manually set the temperature or to set the temperature using the Z-Wave control unit.

This scene allows to synchronize the temperature from the wall thermostat (Z-Wave room sensor) into one or more Z-Wave radiator stations.

LUA Script

danfoss rs

In this script you must change the following:

Line 3 / Line 8 – ID of your Danfoss Z-Wave room sensor (thermostat)

Line 9 / Line 15 – ID of your Z-Wave thermostatic head, e.g. Danfoss Living Connect

%% properties
1400 value
%% events
%% globals
local fromID = 1400
local toID = 1397
local time = 120
fibaro:debug('Prebieha synchronizacia teplot.')
local temp_wish = fibaro:getValue(fromID, "value")
fibaro:call(toID, "setTargetLevel", temp_wish)
fibaro:call(1397, "setTime", tonumber(os.time()) + time*60)
fibaro:debug('Teplota ' ..temp_wish.. '°C nastavena.')

There are not many settings in this script. The most important point is the setting of the correct thermostat ID in line 3 of the script. This point starts the scene, detects if the the temperature in the thermostat has been changed either manually or using a controller.

Besides this, the local variables "fromID" and "toID" must include the respective ID. "FromID" is the ID of the device from which you can read out the temperature (thermostat), and "toID" is the ID of the device in which you must set the temperature.

It is also necessary to enter the time - how long the heating thermostat must keep the temperature. This is done by using the "time" variable. The pre-defined value is 120 minutes. But this variable may be changed if necessary.

After you have carried out all the settings the scene is called out by a change in the thermostat and then the changed temperature is set in the thermostatic head.

Leave a CommentLeave a Reply

Blog search

Latest Comments

Recently Viewed

No products


Compare 0