Cycle Furnace Fan Based on Inside/Outside Temp

New to OpenHAB, just learning and trying to figure out how to accomplish this.
I have an EcoBee3 thermostat where i have 3 sensors around the house, one being in the basement which will be utilized for this rule.

During the summer months the basement is always a good 15F or more degrees colder vs the main floor. Im thinking when the basement is much cooler than the house and the outside temperature is much warmer the inside the house to cycle the furnace fan ON to circulate the basement air with the rest of the house to cool it down.

The rule that i’m looking to do is the following (if its possible to do the math in a rule).

When
basementTempSensor is 15% cooler than kitchenTempSensor and
outsideTemperature is 25% warmer then kitchenTempSensor
Then
turn ecobee fan to ON
end

the items i have:

Number outsideTemperature “temperature [%.1f °F]” (gWeather) { ecobee="<[1234567890#weather.forecasts[0].temperature]" }

Number basementTempSensor “Temp [%.1f °F]” { ecobee="<[1234567890#remoteSensors(Basement).capability(temperature).value]" }

Number kitchenTempSensor “Temp [%.1f °F]” { ecobee="<[1234567890#remoteSensors(Kitchen).capability(temperature).value]" }

Rules can only be triggered by events, they don’t check continuously for comparisons of values. I think what you want to do here is check every 5 minutes using a Timer cron trigger and do the comparison within the rule.
Something like

when
    timer cron "0 0/5 * * ?"
then
    if (  temperatures are necessary) {
        turn fan on
   }

True, but you could trigger the rule when any of the temperature inputs change in value:

rule BasementFan
when
  Item outsideTemperature changed or
  Item basementTempSensor changed or
  Item kitchenTempSensor changed
then
  // do this
end

Of course you are also looking for what “do this” is. :smile:

Also, you might want to consider implementing a form of hysteresis to prevent the fan from switching on and off in short cycles.

…this post talks about how to actually turn the fan on and off.

I have a Nest and not an EcoBee but do basically nearly the same thing. I do it a bit more simply though.

I have a rule that runs every 30 minutes or when the target temp or the inside temp changed. If the target temp is less than the outside temp and the current temp is more than the target temp I turn on the fan. Otherwise I turn the fan off.

Adding the check comparing the outside temp and target temp keeps the fan from running in the winter when the heater should be in control instead of this make-shift air conditioner. The sleeps are to keep from hitting the Nest API too quickly which the API doesn’t seem to like.

With the Nest, if I remember correctly, even when you turn the fan on, it will only stay on for a certain period of time so the cron trigger will start the fan running again if the temp is still too hot.

I’ve not actually seen a case where the fan toggles between running and stopping largely because while running the fan does a great job keeping the house a little cooler, it is not good enough to compete against the sun so really all it accomplishes is keeping the house from growing as warm as fast rather than actually bringing down the temp.

rule "Turn on fan when it gets hot"
when
        Time cron "0 0/30 * * * ?" or
        Item N_V_NestCurrTemp changed or
        Item S_V_NestTargetTemp changed
then
    logDebug("Nest", "Getting current, target, and outdoors temp")
    Thread::sleep(5000)
    val curr = N_V_NestCurrTemp.state as DecimalType
    logDebug("Nest", "Got Nest current temp: " + curr)
    Thread::sleep(5000)
    val tgt = S_V_NestTargetTemp.state as DecimalType
    logDebug("Nest", "Got Nest target temp: " + tgt)

    val outside = Weather_Temperature.state as DecimalType
    logDebug("Nest", "Got Weather outside temp: " + outside)

    Thread::sleep(5000)
    logDebug("Nest", "Checking to see if we need to turn on fan: curr = " + curr + " tgt = " + tgt + " outside = " + outside)
    if(tgt < outside) { // only turn on the fan if the outside temp is greater than tgt
        logInfo("Nest", "Target is less than outdoors")
        if(curr > (tgt + 1) && S_C_NestFan.state != ON){
            logInfo("Nest", "The temp is " + curr + ". Turning on the fan")
            sendCommand(S_C_NestFan, ON)
        } else if(curr <= tgt && S_C_NestFan.state == ON) {
            logInfo("Nest", "The temp is " + curr + ". Turning off the fan")
            sendCommand(S_C_NestFan, OFF)
        }
    }
end

You should be able to adjust this code to how the EcoBee works the fan and use your percentages instead of the simple approach I use. I don’t have sensors on all the floors so I couldn’t use your proposed approach.

Great advice (as usual) Rich. One additional possible reason you don’t see short fan cycles with the Nest is that the Nest API only reports in whole degrees Fahrenheit, but the Ecobee API reports in tenths of degrees Fahrenheit. To me, it’s easier to see a case where if running a fan causes a tenth of a degree crossover the on/off mark, it can flip again shortly thereafter. Of course, your calculation can round the input temperatures first (or use other means) to mute any possible short cycling.

Good point. I’m sure this is but one case where the technical differences between the two devices will cause different edge cases that need to be accounted for.

And even with the Nest I can envision a day where the outside temp is just right to hit this case. Maybe I should add a check for rapid switching if, for no other reason, peace of mind.

1 Like