Please can some help. I love the software, and I understand items and sitemaps but I’m lost on rules (and not even thinking about persistence and logs yet!).
Long story short we were using eq3 max cube and a few thermostats and wall thermostats, turning the boiler on manually. My dad has spent some time in hospital, and now needs to stay with us, bedridden, so I needed a way for the boiler to turn itself on and off (which Max doesnt yet support).
I have bought a zwave boiler switch and had it wired in, all working - along with controller.
I’ve tried to set up two rules (I dont understand groups, I’m sure thats the way to go but as everything is in a different room, including on sitemaps, cant work it out).
Anyway, my rules do sort of work. I have this for the turning on of the boiler, which compares the target temp against actual, and if lower it turns the boiler on. Please do say if there is something im not doing.
rule “Boiler On - Dads Bedroom”
when
Item DSBWTSmaxSetTemp changed or
Item DSBWTSmaxActual received update
then
if ((DSBWTSmaxActual.state < (DSBWTSmaxSetTemp.state) as DecimalType))
if (MainBoiler.state == ON) sendCommand(MainBoiler, OFF)
end
rule “Boiler On - Bedroom”
when
Item DSKWTSmaxSetTemp changed or
Item DSKWTSmaxActual received update
then
if ((DSKWTSmaxActual.state < (DSKWTSmaxSetTemp.state) as DecimalType))
if (MainBoiler.state == OFF) sendCommand(MainBoiler, ON)
end
rule “Boiler On - Kitchem”
when
Item KITWTSmaxSetTemp changed or
Item KITWTSmaxActual received update
then
if ((KITWTSmaxActual.state < (KITWTSmaxSetTemp.state) as DecimalType))
if (MainBoiler.state == OFF) sendCommand(MainBoiler, ON)
end
rule “Boiler On - Living Room”
when
Item LVRWTSmaxSetTemp changed or
Item LVRWTSmaxActual received update
then
if ((LVRWTSmaxActual.state < (LVRWTSmaxSetTemp.state) as DecimalType))
if (MainBoiler.state == OFF) sendCommand(MainBoiler, ON)
end
My off rule is the issue. I can’t seem to work out an ‘and’ command, as I only want to turn the boiler off it all 4 are at temperature, where as if i use the same rule as above in reverse, it will turn it off as soon as one is.
rule “Boiler Off - Room Check”
when
Item DSBWTSmaxSetTemp changed or
Item DSBWTSmaxActual received update or
Time cron "0 0/5 * 1/1 * ? *"
then
if
((LVRWTSmaxActual.state > (LVRWTSmaxSetTemp.state) as DecimalType))
if (MainBoiler.state == ON) sendCommand(MainBoiler, OFF)
end
I have no idea what to do, please help…
Scott