My Heating rules are driving me insane. They work sometimes but not others. Hoping someone can spot the mistakes.
rule"Heating timer - Morning ON"
when
Time cron “0 0 5 ? * MON-FRI” //Monday to Friday at 5am
then
if (Relay2.state == OFF) {sendCommand(Relay2, ON)} //Right Boiler
if (Relay3.state == OFF) {sendCommand(Relay3, ON)} //Underfloor Heating Pump
if (Relay4.state == OFF) {sendCommand(Relay4, ON)} //Radiator Heating Pump
if (Relay16.state == OFF) {sendCommand(Relay16, ON)} //Willow Room towel rail
end
rule"Heating timer - Morning OFF"
when
Time cron “0 0 8 ? * MON-FRI” //Monday to Friday at 8am
then
if (Relay2.state == ON) {sendCommand(Relay2, OFF)} //Right Boiler
if (Relay3.state == ON) {sendCommand(Relay3, OFF)} //Underfloor Heating Pump
if (Relay4.state == ON) {sendCommand(Relay4, OFF)} //Radiator Heating Pump
if (Relay16.state == ON) {sendCommand(Relay16, OFF)} //Willow Room towel rail
end
rule"Heating timer - Evening ON"
when
Time cron “0 0 17 * * ?” //Every day at 5pm
then
if (Relay2.state == OFF) {sendCommand(Relay1, ON)} //Left Boiler
if (Relay3.state == OFF) {sendCommand(Relay3, ON)} //Underfloor Heating Pump
end
rule"Heating timer - Evening OFF"
when
Time cron “0 30 21 * * ?” //Every day at 9.30pm
then
if (Relay2.state == ON) {sendCommand(Relay1, OFF)} //Left Boiler
if (Relay3.state == ON) {sendCommand(Relay3, OFF)} //Underfloor Heating Pump
end
rule"Heating timer - Weekend Morning ON"
when
Time cron “0 0 5 ? * SAT,SUN” //Weekend at 5am
then
if (Relay2.state == OFF) {sendCommand(Relay2, ON)} //Right Boiler
if (Relay3.state == OFF) {sendCommand(Relay3, ON)} //Underfloor Heating Pump
if (Relay4.state == OFF) {sendCommand(Relay4, ON)} //Raditor Heating Pump
if (Relay16.state == OFF) {sendCommand(Relay16, ON)} //Willow Room towel rail
end
rule"Heating timer - Weekend Morning OFF"
when
Time cron “0 0 11 ? * SAT,SUN” //Weekend at 11am
then
if (Relay2.state == ON) {sendCommand(Relay2, OFF)} //Right Boiler
if (Relay3.state == ON) {sendCommand(Relay3, OFF)} //Underfloor Heating Pump
if (Relay4.state == ON) {sendCommand(Relay4, OFF)} //Radiator Heating Pump
if (Relay9.state == ON) {sendCommand(Relay9, OFF)} //Oak Room towel rail
if (Relay16.state == ON) {sendCommand(Relay16, OFF)} //Willow Room towel rail
end