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 = falseif(turnOff) MainBoiler.sendCommand(OFF) if((turnOff) logInfo("Boiler", "The Boiler has been turned off through the Boiler Off rule))
}
end