Whole House Fan (Switch)

Maybe this will help:

I have written my own version of this. Mine doesn’t use the thermostat to set the cooling mode. (so you don’t need to have one.)
The options on mine are:

  • Devices to turn on (multiple choice)
  • Inside thermometer
  • Outside thermometer (Use your own or the accuweather device)
  • Inside minimum temp (When to start considering turning the fan on.)
  • Temperature Delta (how much warmer inside than outside to start the fan)
  • Always run temperature (Run the fan regardless of outside temp)
  • Override off hours shutdown if over the always run temp
  • Optional start and end times. (in case you don’t want to have it on at night)

This was not a fork, but written as my first program to learn the language and API.

If there is any interest, I can release it.

I am interested.

Here is the code I am using.

/**
 *  Fan Control
 *
 *  Copyright 2016 Glenn Brockett
 *
 *  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 *  in compliance with the License. You may obtain a copy of the License at:
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
 *  on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
 *  for the specific language governing permissions and limitations under the License.
 *
 *
 *	Things I want to do:
 *		Add option for using thermostat settings for setting and if in cooling mode.
 *			Optional Themostat device, if defined, will use both setpoint and if in cooling mode.
 *
 */
definition(
    name: "Fan Control",
    namespace: "ac7ss",
    author: "Glenn Brockett",
    description: "Turn on fan when outside temperature is lower than inside.",
    category: "Green Living",
    iconUrl: "https://iconalone.com/sites/default/files/styles/frontx48x48/public/Fan.svg_0.png",
    iconX2Url: "http://downloadicons.net/sites/default/files/fan-icon-46129.png",
    iconX3Url: "http://downloadicons.net/sites/default/files/fan-icon-46129.png",
    oauth: true)


preferences {
	section("Device(s) under control:") {
    	input "ThisSwitch","capability.switch", title: "Switched Device", required: true, multiple: true
	}
    section("Temperature sensors:") {
    	input "InsideTemp", "capability.temperatureMeasurement", title: "Inside Thermometer", required: true
       	input "OutsideTemp", "capability.temperatureMeasurement", title: "Outside Thermometer", required: true
    }
    section ("Temperature settings:") {
    	input "Delta", "number", title: "Temperature Delta", required: true
    	input "MinimumTemp", "number", title: "Inside Minimum Temp", required: true
        input "MaxTemp", "number", title: "Always Run If Hotter Than", required: true
        input "Override", "bool", default: true, title: "Override off time setting on always run setting?"
    }
    section ("Time Constraints") {
    	input "TimeOff","time", title: "Turn off at:", required: false
        input "TimeOn","time", title: "Start program at:", required: true
    }
}

def installed() {
	log.debug "Installed with settings: ${settings}"
	initialize()
}

def updated() {
	log.debug "Updated with settings: ${settings}"

	unsubscribe()
	initialize()
}

def initialize() {
	state.fanRunning = false;
    if ("on"==ThisSwitch.currentswitch){
    	state.fanRunning = true;
    }
	state.runtime = true
	if (TimeOff) {
		schedule(TimeOff, "stopCallback")
    }
   	schedule(TimeOn, "startCallback")
    
	subscribe(InsideTemp, "temperature", myHandler);
    subscribe(OutsideTemp, "temperature", myHandler);
    subscribe(ThisSwitch, "currentswitch", myHandler);
}

// TODO: implement event handlers

def stopCallback() {
	state.runtime = false;
    state.fanRunning = false;
    ThisSwitch.off();
}

def startCallback() {
	state.runtime = true;
    state.fanRunning = false;
}

def myHandler(evt) {
	def Inside=settings.InsideTemp.currentValue('temperature')
    def Outside=settings.OutsideTemp.currentValue('temperature')
    log.debug "Variables: $Inside $Outside $Delta $MinimumTemp $state.fanRunning"
    if (state.runtime) {
	    if(Inside > MinimumTemp && ((Inside > (Outside+Delta))||(Inside > MaxTemp)) && !state.fanRunning ) {
    		log.debug "Turn on"
        	ThisSwitch.on();
		    state.fanRunning=true;    
	    } else if ((Inside < MinimumTemp || (Inside < Outside && Inside < MaxTemp)) && state.fanRunning) {
    		log.debug "Turn off"
    	    ThisSwitch.off();
        	state.fanRunning = false;
    	}
    }else if (!state.runtime) {
    	if(Inside > MaxTemp) {
    		log.debug "Offtime Turn on"
        	ThisSwitch.on();
		    state.fanRunning=true;            	
        }else if (Inside < MaxTemp){
	    	log.debug "Offtime Turn off"
    		ThisSwitch.off();
        	state.fanRunning = false;
        }
    }
}

I thought this would be a good place to ask since so many posters here have whole house fans. What switch is everyone using, and what are the specs on the fan it controls? I have a 1/3hp 6amp motor on mine and want to make sure I get a switch that can handle the load. Thanks!

I haven’t installed a whole house fan yet, but I had the builder rough out an opening when the house was built 2 years ago, and I’ve done quite a bit of research on this.

There’s no easy solution for automating a whole house fan beyond on/off. For on/off, any of the regular z-wave switches will do the job (GE, Zooz, etc.) but the hi/lo switch will need to stay.

See this discussion for more.

This is exacrtly when I’m doing for mine. The attic fan itself is set on high, and I use a GE fan controller to control it. Cheers!

Mine is LITERALLY a box fan on a plug in switch set in the vent opening in my attic.

Hello Glenn,
This is exactly what I’m looking for. However, I’m a ST Noob…can you point me to a FAQ that explains how to incorporate this software into my system? I can’t find it published in the Smartthings Mobile App. I’m guessing go to the developer site\ My SmartApps\Import ???

Thanks!
David

Thanks @ac7ss. I installed a Leviton DZ15S to control my whole house fan and your Fan Control Smartapp worked perfectly. Now I need to shop for a good outdoor temp sensor.

How is it possible to open the double hang windows before the fan comes on ? The incoming air draft will shut off the pilot light for the heater.Has anyone worked with linear actuators ?

I can not answer the linear actuator question. But it is critical that you have a source of fresh air any time the whole house fan is run. Or the air flow through your gas water heater can be reversed and pull carbon monoxide into the living space. The fan control smartapp also knows about my ecobee3 thermostat states. And it should not run when it is in away mode. However I have not tested that yet. When I am home during the summer a window will be open since I do not have AC.

I would just cut and paste the code in the IDE.

Brian, I see the “window check” version of “Whole House Fan” is in Marketplace now. Where do I find that code to review/study/learn? Your Github version does not have the Window check; latest version there is Nov. 2014. Or, maybe I just don’t know how to Navigate Gitub. Pls help.

At some point I moved my SmartApps to a new repo (probably for better IDE integration). Link is below.

So I am a little new to this so some direction would be helpful.

I have a whole house fan, on a push button timer switch (1hr, 2hr, 4hr, 8hr), and a low high toggle switch.
I could swap the timer switch to an on off switch to turn it on and off, if there was a way to specify a time for how long I want the fan to run that would be a bonus.

Does that sound like the easiest solution for a beginner? I read above about virtual switches and thermostat integration(I have an Ecobee), but it’s still a little unclear to me at this point.

Thanks!

Yes, you can definitely do this with smart apps to tell the switch when to turn on and off. Depending on the smart app that you use, you can even include conditions and restrictions.

You could probably start off by using the built-in Smartlighting app but for more flexibility, you could use Core or the newer Webcore. However, that will require knowing how to install custom code.

Find out more here
http://thingsthataresmart.wiki/index.php?title=Using_Custom_Code

WebCore

Thanks. Switches are on there way. I just loaded webcore and now have to get used to setting up the conditions.

I tried a sample one when my ring detects motion to send a push notification to me. The log said it ran fine, but I never got the notification. Learning by trial and error I guess.

I changed it to Send SMS message instead of push notification and it is now sending an SMS to me when motion is detected at the front door. Just a quick test.

1 Like

A thought…

It turns on via a float. If you turn it off with the switch, the float is disabled. Bff careful how you set this up as it may lead to a flood issue.

I’d recommend using WebCoRE to monitor the power and if it stays on to long, to notify you.