Dehumidify by lowering temp

rsw686

Active Member
I want to drop the temp 2 degrees if the humidity is higher than the setpoint. The code below partially works. The issue is every 15 minutes when HVAC DEHUM is turned on for 30 minutes the WHEN HVAC DEHUM ON line runs again so the temp continually lowers by 2 degrees. Is there an easy fix to just reset the 30 minute timer without triggering the WHEN ON event?
 


38.    EVERY 15 MINUTES

        AND IF Main Level HUMIDITY IS GREATER THAN Main Level DEHUMIDIFY SETPOINT

        OR

        AND IF Upstairs HUMIDITY IS GREATER THAN Upstairs DEHUMIDIFY SETPOINT

            THEN HVAC DEHUM ON FOR 30 MINUTES

39.    WHEN HVAC DEHUM ON

            THEN ALL THERMOSTATS LOWER COOL SETPOINT 2

40.    WHEN HVAC DEHUM OFF

            THEN ALL THERMOSTATS RAISE COOL SETPOINT 2
 
 
I don't think so, but there are a couple of ways to crack this egg.
 
One way would be to create a second flag that is something like "Cool Setback", that you turn on in block 39 to show you have already enacted the setback.  Change block 39 with an "AND" condition so that it only runs when the "Cool Setback" is off.  Then turn the "Cool Setback" flag off in block 40.
 
This would mean that only the first time does the setback actually happen, and every 15 minutes you ping the flag, but since the Cool Setback flag is already set, you don't lower the setback down again.
 
So you could end up with:
 
 
38.    EVERY 15 MINUTES
 
        AND IF Main Level HUMIDITY IS GREATER THAN Main Level DEHUMIDIFY SETPOINT
 
        OR
 
        AND IF Upstairs HUMIDITY IS GREATER THAN Upstairs DEHUMIDIFY SETPOINT
 
            THEN HVAC DEHUM ON FOR 30 MINUTES
 
39.    WHEN HVAC DEHUM ON
 
        AND IF Cool Setback IS OFF
 
            THEN Cool Setback ON
 
            THEN ALL THERMOSTATS LOWER COOL SETPOINT 2
 
40.    WHEN HVAC DEHUM OFF
 
            THEN Cool Setback OFF
 
            THEN ALL THERMOSTATS RAISE COOL SETPOINT 2
 
I've had this problem as well and fixed it with a second flag as suggested, BUT I really think this is a bug that HAI needs to address.  If a variable is ON and you set it ON again, its still ON so should NOT trigger again.  If I really want to do something repeatedly, it is easy enought to put the action you want to repeat with the initiall test, you know the thing that really changed, not with the variable that didn't change. HAI please fix this.
 
Thanks the second flag worked. It would be nice if HAI changed the behavior. I ended up with the following thinking I might use the cool setback somewhere else. With the way HAI program logic works I could burn through flags and lines to accomplished even the simplest takes.
 

38.    EVERY 15 MINUTES
        AND IF Main Level HUMIDITY IS GREATER THAN Main Level DEHUMIDIFY SETPOINT
        OR
        AND IF Upstairs HUMIDITY IS GREATER THAN Upstairs DEHUMIDIFY SETPOINT
            THEN HVAC Dehumidify ON FOR 30 MINUTES
39.    WHEN HVAC Dehumidify ON
        AND IF HVAC Cool Setback OFF
            THEN HVAC Cool Setback ON
40.    WHEN HVAC Dehumidify OFF
        AND IF HVAC Cool Setback ON
            THEN HVAC Cool Setback OFF
41.    WHEN HVAC Cool Setback ON
            THEN ALL THERMOSTATS LOWER COOL SETPOINT 2
42.    WHEN HVAC Cool Setback OFF
            THEN ALL THERMOSTATS LOWER COOL SETPOINT 2
 
When I change temps I'm setting both to 0 which I've read will not trigger the OFF event.
 

Code:
31.    WHEN HVAC Away
            THEN Main Level HEAT SETPOINT 62
            THEN Upstairs HEAT SETPOINT 62
            THEN Main Level COOL SETPOINT 73
            THEN Upstairs COOL SETPOINT 76
            THEN SET HVAC Dehumidify TO 0
            THEN SET HVAC Cool Setback TO 0
 
I think the simplest solution would be something like this:
 

38. EVERY 15 MINUTES
AND IF Main Level HUMIDITY IS GREATER THAN Main Level DEHUMIDIFY SETPOINT
AND IF HVAC DEHUM OFF
OR
AND IF Upstairs HUMIDITY IS GREATER THAN Upstairs DEHUMIDIFY SETPOINT
AND IF HVAC DEHUM OFF
THEN HVAC DEHUM ON FOR 30 MINUTES


Basically, only turn it On if it is OFF...
 
In general if you are turning something ON/OFF then you don't need an additional flag, just check the see if the thing you are going to change is already in the desired state.
 
As far as triggering another ON event when something is already ON, this is by design, not a bug.  It allows things like restarting a countdown in the middle.
 
Speaking of restarting in the middle, since you recheck the humidity every 15 minutes, you probably don't need the "ON OF 30 MINUTES", you could probably just turn it ON and use another block to turn it off.
 

39. EVERY 15 MINUTES
AND IF Main Level HUMIDITY IS LESS THAN Main Level DEHUMIDIFY SETPOINT
AND IF HVAC DEHUM ON
OR
AND IF Upstairs HUMIDITY IS LESS THAN Upstairs DEHUMIDIFY SETPOINT
AND IF HVAC DEHUM ON
THEN HVAC DEHUM OFF

This would give you the extra 2 degrees until the humidity was within the desired range.
 
Just a suggestion.
 
I hope this helps.
 
Back
Top