# Attic Fan logic

I'm trying to write some logic to control my attic ventilation fan. There are summer things I need to eval in the summer, and different things in the winter. I need to group AND statements and OR statements, and if I create a regular rule, I don't see the option to create sub-rules. Do I have to use a Triggered rule to get this?

And, if so, what would the trigger be? This control I'm trying to do is strictly based on conditions.

In a regular rule, list all conditions to be considered and then in the define section you can do all of the sub-rule stuff.

Ah, my mistake. I added a condition first instead of a sub-rule, and the sub-rule option disappeared.

Here's what I have. Works so far in the summer. Here's the basic logic:

If the thermostat mode is NOT set to heat, then it indicates that I want the house cool(er). If the attic temp goes 5 degrees higher than outside, then the fan goes on to ventilate the attic.

If the thermostat mode is set to heat, then turn on the fan when the outside temp is below freezing and the attic temp is above freezing. I did a 1 degree overlap there. The idea here is that it will prevent snow from melting on the roof and then freezing when it gets to the edge, to prevent or reduce ice dams.

Here's mine. I use the following checks:

• Are the windows open?
• Is the weather colder outside by 6 degrees?
• Is the temp in the bedrooms above 69? (this turns it off during the night)
• Are the French Door Panels open? (If they are then all the air goes straight down the hall and is useless).
• Am I home?

1 Like

Why does it matter if you are home or doors are open?

I suspect that the purpose of your fan and mine are different. Mine simply keeps the temp in the attic as close to the outside temperature as possible. There is no air exchange with the interior of the house.

The one scenario I purposely did not cover is where it's above freezing and the heat is still on. In this case, I WANT my attic to get as hot as possible to help with heat retention.

I made a slight change. I looked at my logs and the fan was short cycling for like 2-3 mins at a time with what I have in there. I changed the false condition to this:

This will make it run for at least 10 mins at a time. I did the calculation, and if I run the fan for 24/7, it will cost me \$159 a year. And, this is what I've been doing since my old mysensors temp sensor died a couple of years back that monitored attic temp. My new attic sensor is just a cheap Aqara zigbee temp sensor zip tied to a 98 cent wood yard stick from home depot, and I opened the attic hatch, shoved it up along the edge of it, and closed the hatch. It's probably not the ideal location since it's not at the peak of the attic, but it's better than what I had before.

You should also realize that if your temp sensor goes offline or the battery dies with the last temperature reported being high...the fan will run forever. Or if it dies low, the fan will never run... just something to consider.

Good point. I'm waiting on a few more of those temp sensors for monitoring freezer and fridge temps. Once I get those, I'm going to create a single rule to monitor temps and I'll put a high temp condition for the attic in one of those.

Additionally, I'll create another rule that alerts when the batteries in any of these devices are getting low. I know this won't catch everything since batteries can be flaky sometimes (especially in extreme environments). But it's better than nothing.

I'm more concerned about the fan NOT running than having it run all the time.

• Are the French Door Panels open? (If they are then all the air goes straight down the hall and is useless)."

I use the fan for two purposes. One is to cool the attic. The other is to draw cooler air from the outside into the house. If those doors are open, then the cooler air doesn't have any path through the house.

Yes we are using them for two different purposes. I only posted my app to give you some ideas.

Ah, makes sense then. My attic is completely cut off from the living space. Here in MN, attic fans are strictly used for attic ventilation, and not for whole house fan type of purposes.

My attic is foamed and sealed around all chases, ceiling fixtures. There are vents under the soffits that bring in outside air to the attic, and vents near the peak to vent hot air. The fan is installed where one of the peak vents would be. It had a temp controller on it, but I removed it and hard wires it to a switch so I could add some better logic to it.