I have tried to make a LUUP code but gave up, is it possible to make a scene which every 15 minutes reads CurrentSetpoint of the Horstmann HRT4-ZW and sends it to the CurrentSetpoint of one or more Danfoss Living Connect thermostats ? I want to use the HRT4-ZW to control the thermostats in the room.
I think it is pretty simple if You know what You are doing but then again…
You have to create a scene with a schedule to run every 15 minutes. Then in the scene add the Luup code below. The MASTER_TSTAT is the Horstmann HRT4-ZW and the SLAVE_TSTATS is a list of the device number of the thermostats you want to update.
local MASTER_TSTAT = 20
local SLAVE_TSTATS = { 21, 22, 23 }
local currentSetpoint = luup.variable_get("urn:upnp-org:serviceId:TemperatureSetpoint1_Heat", "CurrentSetpoint", MASTER_TSTAT) or ""
if (currentSetpoint == "") then
return false
end
for _, tstat in pairs(SLAVE_TSTATS) do
luup.call_action("urn:upnp-org:serviceId:TemperatureSetpoint1_Heat", "SetCurrentSetpoint", { NewCurrentSetpoint = currentSetpoint }, tstat)
end
Worked for me (u17 Vera edge) thanks