Hi,
As i just moved recently from HC2 to HC3 i found myself with a heating problem. I have Danfoss Room Sensors and Danfoss LC-13 valves. They are supported in HC3, but i could not modify the temperature from the Danfoss Room Sensor. Even more, at this moment the HC3 climate interface does not allow for manual mode set via the GUI.
So i wrote a bit of LUA code that will read the set temperature and set time interval from the Danfoss Room Sensor, will set the climate panel in Manual mode and sync all the TRV's.
Hope it can help someone
local fromID = 739 -- Danfoss RS senzor
local toID = {721} -- Danfoss LC13 TRV
local IdPanel = 1 --Birou
fibaro.sleep(11*1000)
local dev = api.get("/devices/"..fromID)
local devname = dev.name
local settemp = dev.properties.heatingThermostatSetpoint
local setduration = dev.properties.schedules[1].schedules[1].duration.value
local panel = api.get("/panels/climate/" .. IdPanel)
panel.mode = "Manual"
panel.properties.handSetPointHeating = tonumber(settemp)
panel.properties.handTimestamp = os.time() + (60*60*setduration)
api.put("/panels/climate/"..IdPanel, panel)
fibaro.debug("Scene38","Danfoss TRV Synced With Danfoss RS.", "Climate Panel ", panel.name, "Set to Manual Mode for ", setduration, " Hours, Temperature ", settemp, "Degrees." )
The LUA trigger should be the Danfoss Room Sensor ID:
{
conditions = { {
id = 739,
isTrigger = true,
operator = "!=",
property = "heatingThermostatSetpoint",
type = "device",
value = 5
} },
operator = "all"
}
Enjoy