The Vera Community forums have moved!

Advanced => Programming => Scene Scripting => Topic started by: proempiet on September 16, 2013, 03:52:28 pm

Title: HRT4-ZW thermostat luup code heaton
Post by: proempiet on September 16, 2013, 03:52:28 pm
I would like to get the HeatOn signal from my HRT4-ZW thermostat.

I got this code to check the heaton on and if it is on switch on a dimable light to 10%

local HVAC_Mode = luup.variable_get("urn:upnp-org:serviceId:HVAC_UserOperatingMode1","ModeStatus",57)

if (HVAC_Mode=="HeatOn")
then
   luup.call_action("urn:upnp-org:serviceId:Dimming1",  "SetLoadLevelTarget", {newLoadlevelTarget = "10"}, 49)
else
   luup.call_action("urn:upnp-org:serviceId:Dimming1",  "SetLoadLevelTarget", {newLoadlevelTarget = "0"}, 49)
end

But this code allways put the light to 0% if the thermostat is on so this code does not work.

The code does work if I put in the device Id of the actuator but I want the Heaton from the thermostat!!

I want to program my own luup to switch on the actuator and the floorheating pump a the same time. But the floorheating pump should never run between 22:00 and 7:00 hours because it is to noisy and near my bedroom.
Title: Re: HRT4-ZW thermostat luup code heaton
Post by: parkerc on September 19, 2013, 03:07:28 pm
The code does work if I put in the device Id of the actuator but I want the Heaton from the thermostat!!

Why?

is the ModeStatus variables listed in the thermostat, I have one and can't see it listed ?
Title: Re: HRT4-ZW thermostat luup code heaton
Post by: RexBeckett on September 19, 2013, 05:29:25 pm
As @parkerc has observed, the HRT4-ZW thermostat device doesn't have a ModeStatus variable. If you really want to break the direct association between the HRT4-ZW and the relay, you will need to compare the thermostat's CurrentTemperature and CurrentSetpoint values in your Luup code.

If you have the ASR-ZW relay, you should be aware that the HRT4-ZW resends the Z-Wave commands every 30 minutes. If the command is not received, the ASR-ZW will turn off as a safety precaution. If you chose to replace the HRT4-ZW association with your own code you will need to provide the watchdog function yourself.