Problem with my rules not calling for heat - Horstmann HRT4-ZW and ASR-ZW

Hi Openhab, sorry to just sign up with a question straight away but im having trouble getting my script working. I have a Horstmann HRT4-ZW thermostat and ASR-ZW boiler switch which are not paired to each other, but are both connected to my openhab setup.

Everything is working correctly, but I cannot get the following rule to send the signal to the ASR-ZW to call for heat:

rule "fire up boiler"
when   
    Item HeatCall_Thermostat changed to "Demanding heat"
then   
    logInfo("heating.rules", "Thermostat calling for heat - Boiler firing up")
    sendCommand(Boiler_Thermo, 1)
end

Please let me know if you spot anything wrong, any help greatly appreciated :slight_smile:

Hi James,

I would suggest you to link both devices with association group 2 named “Binary Switch Set” on the thermostat. In case of OpenHAB problem, the thermostat/boiler will continue to work. You can make such association with habmin or without (see documentation).
And you will still be able to swith on the boiler.

Can you provide us your item definition for thermostat and boiler ?

Here are my items :

Switch Pump "Circulateur" <heating> { zwave="2:command=SWITCH_BINARY,refresh_interval=30"} Number Thermostat_SetPoint "Température [%d °C]" <temperature> { zwave="3:0:command=THERMOSTAT_SETPOINT,setpoint_type=1" } Number Thermostat_Mode "Mode [%d]" { zwave="3:0:command=THERMOSTAT_MODE" } Number Thermostat_Level "Température [%.1f °C]" <temperature> { zwave="3:0:command=SENSOR_MULTILEVEL,sensor_type=1" } Number Thermostat_Battery "Batterie thermostat [%d %%]" <energy> (ZW_Battery) { zwave="3:0:command=BATTERY" }

To manually swith on boiler, a command like sendCommand(Pump, ON) should work.

Regards

Please show us the item definition - at least for HeatCall_Thermostat and Boiler_Thermo

Thanks for the pointers so far, these are the item definations for the thermostat and the switch:

/* Horstmann HRT4-ZW Thermostat - set wake up interval to 900 seconds */
Number	Battery_Sensor_Thermostat	"Thermostat Battery: [%d %%]"	<battery> (GF_Lounge,Battery)	        {zwave="17:command=battery"}
Number	Temp_Desired_Thermostat	"Thermostat Desired Temp: [%.1f C]" <temperature>     (GF_Lounge,MyOpenHAB)	{zwave="17:command=thermostat_setpoint, setpoint_type=1, setpoint_scale=0"}
Number	Temp_Sensor_Thermostat	"Thermostat Measured Temp: [%.1f C]" <temperature>	    (GF_Lounge,Sensors,MyOpenHAB)	{zwave="17:command=sensor_multilevel, sensor_type=1"}
Number	HeatCall_Thermostat	"Thermostat Status [MAP(thermostat.map):%d]"	<fire>	(GF_Lounge,Sensors)	{zwave="17:command=switch_binary"}

/* Horstmann ASR-ZW Boiler Switch */
Switch	Boiler_Sensor	"Boiler Switch"	<fire>	(GF_Hall,Switches)	{zwave="16:command=switch_binary"}
Number	Boiler_Thermo	"Boiler Status [MAP(heat.map):%d]"	<fire>	(GF_Hall,Sensors)	    {zwave="16:command=thermostat_mode,refresh_interval=600"}

My thermostat.map is:
1=Demanding heat
0=Temperature reached
-=Unknown

My other rules for sending the on and off for the boiler work at different time schedules by sending Boiler_Sensor ON/OFF, it’s just this heat demand business I cant get my head arround :slight_smile:

These are my current complete heating rules for managing the thermostat’s heat demand, please let me know if you spot where I am going wrong :slight_smile: thank you

rule "fire up boiler"
when   
    Item HeatCall_Thermostat changed to "Demanding heat"
then   
    logInfo("heating.rules", "Thermostat calling for heat - Boiler firing up")
    sendCommand(Boiler_Thermo, 1)
end

rule "standby boiler"
when   
    Item HeatCall_Thermostat changed to "Temperature reached"
then   
    sendCommand(Boiler_Thermo, 0)
    logInfo("heating.rules", "Thermostat temperature reached - Boiler standby")
end

Once you associate both together you’ll find they work with out need for any additional rules in OH. I have two thermostats and boiler control, all working great together. Presently I have no rules in place, but will be looking to create some form of logic over the next few months as I get to grips with OH. I can manually switch on the heating from the OH app and also adjust the heating setpoint. All while away from home via my.openhab.org.

for Rule Triggers you have to use the real states, not the mapped ones, so try

Item HeatCall_Thermostat changed to 1

respectively

Item HeatCall_Thermostat changed to 0

You even could setup only one rule for this:

rule "boiler"
when   
    Item HeatCall_Thermostat changed
then   
    if (HeatCall_Thermostat.state == 1) {
        logInfo("heating.rules", "Thermostat calling for heat - Boiler firing up")
        Boiler_Thermo.sendCommand(1)
    }
    else if (HeatCall_Thermostat.state == 0) {
        Boiler_Thermo.sendCommand(0)
        logInfo("heating.rules", "Thermostat temperature reached - Boiler standby")
    }
end
1 Like

PERFECT! Thank you very much Udo, all running smoothly!!! I was going to modify it to add a timer so that the boiler is not cycling too many times per hour, but the HRT4-Z4 has built in jumper switches to manage the calls to 6 cycles per hour (flick the pin 7 down on the back, leave all the other pins)

Thanks very much for your help :slight_smile: