I have been using this code for a few weeks now and I thought it was perfect until today.
I armed the system but realized I needed to do something else before leaving so I disarmed it. After a few minutes I realized the heater wasn't on even though it should have been. I figured out that by arming and disarming I got output 100 and output 102 in a competing loop. Output 100 was started when the system was armed and output 102 was started before 100 ended so it switched back and forth between the away temp and the home temp until one of the loops finally won.
Would it be better to make the output time very short (1 sec) to minimize the possibility of this happening or could I then end up with incorrect settings on the thermostat from communcation issues again.
I thought about checking the arming state when the output turns off but not sure if that will have any unintended consequences.
WHENEVER Output 100 STATE IS TURNED OFF
AND Cabin Home (Area 1) ARM STATE = ARMED
AND Main (Tstat 1) HEATING DESIRED TEMP IS ANY VALUE OTHER THAN Away Temp H (Cust Set 3)
THEN SET Main (Tstat 1) HEATING DESIRED TEMP TO Away Temp H (Cust Set 3)
THEN TURN Output 100 ON FOR 1 MIN
WHENEVER Output 102 STATE IS TURNED OFF
AND Cabin Home (Area 1) ARM STATE = DISARMED
AND Main (Tstat 1) HEATING DESIRED TEMP IS ANY VALUE OTHER THAN Home Temp H (Cust Set 4)
THEN SET Main (Tstat 1) HEATING DESIRED TEMP TO Home Temp H (Cust Set 4)
THEN TURN Output 102 ON FOR 1 MIN
Any help is appreciated.
I armed the system but realized I needed to do something else before leaving so I disarmed it. After a few minutes I realized the heater wasn't on even though it should have been. I figured out that by arming and disarming I got output 100 and output 102 in a competing loop. Output 100 was started when the system was armed and output 102 was started before 100 ended so it switched back and forth between the away temp and the home temp until one of the loops finally won.
Code:
WHENEVER Cabin Home (Area 1) ARM STATE BECOMES ARMED
THEN ACTIVATE Economy Mode (Task 2)
WHENEVER Economy Mode (Task 2) IS ACTIVATED
THEN SET Main (Tstat 1) HEATING DESIRED TEMP TO Away Temp H (Cust Set 3)
THEN TURN Output 100 ON FOR 1 MIN
WHENEVER Output 100 STATE IS TURNED OFF
AND Main (Tstat 1) HEATING DESIRED TEMP IS ANY VALUE OTHER THAN Away Temp H (Cust Set 3)
THEN SET Main (Tstat 1) HEATING DESIRED TEMP TO Away Temp H (Cust Set 3)
THEN TURN Output 100 ON FOR 1 MIN
WHENEVER Cabin Home (Area 1) ARM STATE BECOMES DISARMED
THEN ACTIVATE Comfort Mode (Task 3)
WHENEVER Comfort Mode (Task 3) IS ACTIVATED
THEN SET Main (Tstat 1) HEATING DESIRED TEMP TO Home Temp H (Cust Set 4)
THEN TURN Output 102 ON FOR 1 MIN
WHENEVER Output 102 STATE IS TURNED OFF
AND Main (Tstat 1) HEATING DESIRED TEMP IS ANY VALUE OTHER THAN Home Temp H (Cust Set 4)
THEN SET Main (Tstat 1) HEATING DESIRED TEMP TO Home Temp H (Cust Set 4)
THEN TURN Output 102 ON FOR 1 MIN
Would it be better to make the output time very short (1 sec) to minimize the possibility of this happening or could I then end up with incorrect settings on the thermostat from communcation issues again.
I thought about checking the arming state when the output turns off but not sure if that will have any unintended consequences.
WHENEVER Output 100 STATE IS TURNED OFF
AND Cabin Home (Area 1) ARM STATE = ARMED
AND Main (Tstat 1) HEATING DESIRED TEMP IS ANY VALUE OTHER THAN Away Temp H (Cust Set 3)
THEN SET Main (Tstat 1) HEATING DESIRED TEMP TO Away Temp H (Cust Set 3)
THEN TURN Output 100 ON FOR 1 MIN
WHENEVER Output 102 STATE IS TURNED OFF
AND Cabin Home (Area 1) ARM STATE = DISARMED
AND Main (Tstat 1) HEATING DESIRED TEMP IS ANY VALUE OTHER THAN Home Temp H (Cust Set 4)
THEN SET Main (Tstat 1) HEATING DESIRED TEMP TO Home Temp H (Cust Set 4)
THEN TURN Output 102 ON FOR 1 MIN
Any help is appreciated.