EQ3 and Zwave Boiler

Hi all,
I had had OpenHab for 6 months now, but if I’m honest, other than a Boiler Turn on rule, I’m not really using it as a smart home, it’s just a GUI to be lazy… so, I’ve decided to get my arse in gear and get some proper rules programmed.

To start with I have upgrade from 2.0 to 2.1 and moved from Windows to a dedicated Ubuntu Server to run it.

I moved things across, fairly happy with how its running, however there are still some issues, and I think I’ll be begging for help an annoying number of times… sorry.

First one is the Boiler rule - you remember, the only one that I actually ever did… doesn’t work anymore!

Not sure how, but after playing around for a few hours I have managed to get the turning on one sorted again (the code is incredibly messy, but as it seems to work I dont want to waste anyones time tidying it). The off rule however isnt worked and I’ve lifted it directly from the working rule in 2.0. Can anyone spot anything obvious please?

rule “Boiler Off -Room Check”
when
Item AXBWTSmaxSetTemp changed or
Item AXBWTSmaxActual received update or
Item AXKWTSmaxSetTemp changed or
Item AXKWTSmaxActual received update or
Item KITWTSmaxSetTemp changed or
Item KITWTSmaxActual received update or
Item LVRWTSmaxSetTemp changed or
Item LVRWTSmaxActual received update or
Item SSBWTSmaxSetTemp changed or
Item SSBWTSmaxActual received update or
Time cron “0 0/5 * 1/1 * ? *”
then
if(MainBoiler.state == ON){
var turnOff = true
if(AXBWTSmaxActual.state < AXBWTSmaxSetTemp.state) turnOff = false
if(KITWTSmaxActual.state < KITWTSmaxSetTemp.state) turnOff = false
if(LVRWTSmaxActual.state < LVRWTSmaxSetTemp.state) turnOff = false
if(SSBWTSmaxActual.state < SSBWTSmaxSetTemp.state) turnOff = false
if (BoilerOveride.state ==ON) turnOff = false

    if(turnOff) MainBoiler.sendCommand(OFF)
      if((turnOff) logInfo("Boiler", "The Boiler has been turned off through the Boiler Off rule))

}
end

You’re missing a " at the end of the logInfo line.
But I suggest you do this in karaf console to find out yourself:

log:set debug org.openhab.model.script.engine
log:set debug org.openhab.model.script.rules

Should get you some meaningful debug output in /var/log/openhab2/openhab.log

Thank you, that’s really helpful… hopefully that sorts it… any idea why it would have worked under windows but not linux?

Hi, that " didnt fix it, its still not working, grr!

var turnOff = true would need to read var boolean turnOff = true, too.

But you’re not telling me you’re too lazy to debug that routine and expect someone else to do it, are you ?

Enable debug logs like I told you and you should get meaningful output to help you get going.

No… I have a fairly good grasp of the English language and my comment doesn’t translate in any language to anything even similar to “I’m too lazy”. What I said was your suggestion didn’t work, because it didn’t. I have however fixed it, not sure why but removing the line asking OpenHAB to log the action was causing the script to not work - var turnOff = true was fine and works perfectly well :slight_smile: