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
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 ?
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
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 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.
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)