When should I open my window?

So I’ve built a window opener for my crank style windows. Hardware is working great, but I’m struggling with the logic of when I should open my windows…

My naive configuration isn’t producing the desired results (open window if temperature is above x, close if below x), so I’m trying to decide on some better logic. Current problem is if its too hot outside, opening the window actually heats the room, rather than allows it to cool. Then I thought ‘ok, only open the window if outside temp is below x’, but right now the window is open, outside temp is above x, and I’m getting a nice cooling breeze even though the air temp is higher than the inside temp.

Thoughts? I can’t be the only person to have this problem.

What sensors do you have at your disposal? Including sensors brought in thru integrations.
Are you basing outside temp on a local sensor?
Do you have an indoor temperature sensor?
Have you looked at ‘Feels Like’ temperature, this takes into account wind.
The only place I have ever seen the crank windows is Florida.
Can your ‘opener’ also close the windows?

Other things to consider:
Air Quaility (AQI)

There is another tread here where someone has done this but as a notification, taking into account temperature and Air Quality.
If you don’t have a weather station, you could use an integration to get wind speed and figure that out.
Will rain enter the window if open?
Do you want a window to open if you are not home? (is this a security issue).

On a side note, my windows will not be opening for at least a few days. My AC (heat pump) could not get my house down to 69F today (I set it lower to just help dry the air); tomorrow it is supposed to be 112F, only saw 103F today.

As far as sensors go - I currently have indoor temperature and humidity sensors (actually 2 in the room I’m working in at the moment, high ceiling, and I’ve automated the fan based on high up temp vs low temp).

I’m certainly willing to invest in other sensors if it will give me a better result, but looking at the environment Canada sensor for outside temperature at the moment (probably not the best, but my outside sensors have been unreliable in the winter months)

Window can be opened and closed using the build (followed Dr Zzs video for crank windows).

I don’t have access to ‘feels like’ temperature through the integration I’m using. Do you know what ‘feels like’ takes in to account?

Missed saying - I’m rural, so Air Quality is always pretty good, no major allergy sufferers in the house, so pollen count not an issue.

You can make your own ‘Feels Like’ sensor:
This link gives you some other useful formulas.

I’ve been trying to find a working formula for ‘Real Feel’ temperature which takes into account sun exposure effect on skin.

I’m kinda rural myself but we get smoke from the California and Canada wildfires every year hear in Washington State. Fires hundreds of miles away maxed out air quality sensors around me (not a good thing). That is why I bought a PurpleAir air quality sensor last year and added to my sensors with a WeatherFlow Tempest weather station.

Ok with temperature and humidity you can calculate dewpoint, which is a good indication of comfort level. Dewpoint is also a better indication of mold growth compared to humidity alone. I have found dewpoint to be very useful, in the winter if my Master Bath is too humid and I compare dewpoints of my MasterBath to the outside, if outside is lower than window is opened even if it is 30F outside. You can’t compare RH for different temperature directly but dewpoint you can since it is compensating for temperature. This is not perfect but it works very well for my situation. I have not got around to successfully calculating absolute humidity which can be very complicated.

I know you wanted a simple answer, but this is more complicated and can be more intricate than most people think to make this an automation because you figure a lot out my just your own personal senses and ‘common sense’.

There is nothing wrong with information obtained from the internet but if you don’t have reliable internet I would put in some fail safes for that. Such as if internet is unavailable and trend for temperature is going up then shut windows. Look into trend and derivative sensors also, these can be useful here.

I think all users have difficulty making the automation logic airtight and perform how we expect in all conditions. Some are much better than others but no one gets it right all the time. I tend to the not so good.

I would think that you need to include heating and cooling status probably with multiple automations to reduce individual automation complexity. I don’t know if Canada has access to air quality updated hourly similar to the Air Now integration. If they do this can help with air quality.

I think it is good practice to write out the automation in word form to help identify the logic and look for edge conditions. I even do a logic table sometimes to help me decipher my thinking (final boolean condition to trigger action). I would think the summer automation logic is similar to this:

Trigger: Outside - Inside Temperature is < x degrees 
Conditions: A/C is the set mode (summer) | months are defined as summer
            air quality < value
            humidity < value1
Actions:  Shut off the A/C
          Crank the window open
          turn on specific ceiling fans

Trigger: Outside - Inside Temperature is >= x degrees
         Humidity >= value1
         Air Quality >= value
Conditions: A/C is the set mode (summer) | months are defined as summer
            Window is open
Actions:  Crank the window closed
          Turn on the A/C
          Turn off specific ceiling fans

Edge conditions can be difficult to mange. What happens when a human manually operates the window. Will an automation still run? I can think of issues such as solar gain or wind speed that might affect how you want to open the windows. Direction of wind could be important to open multiple windows to get a breeze.

You could buy sensors and a weather station to get exact site measurements (the ultimate solution), however NWS is very reliable (as well as other countries meteorological services). The Air Now site has been reliable as well. If you have a small airport or airbase nearby they will have a weather station that is a good source.

Hope this helps by giving you some items to consider and techniques to build a better automation.

I’m following this thread. I’ve always wanted to do something similar. Unfortunately none of my windows would be easily automated, but you never know.

For me the logic goes something like this: In summer, if it’s cooler out than in, shut off the air conditioner if it’s on and open all the windows. Typically this is in the evening. Then, the next day, before the outside temperature gets warmer than indoors, close them all. Maybe turn the thermostat back onto the “cooling” setting, depending on the expected daily high temp.

Other seasons would have different logic, based on whether it’s expected to be a cool or hot day ahead. And you’d have to factor in rain, and especially, wind-driven rain. I hadn’t thought of it, but good points on using humidity and wind direction, too.

It could get complicated pretty easily. I don’t expect a solution anytime soon. Maybe my next house…

What style of windows do you have? Dr. Zzs has videos on automating various styles…

Is there a waether-data provider or a sensor for a “Feels Like temperature”?

I have also been thinking for a long time about how best to do it. Every time I think that now is a good time to close all the windows, I am 2 hours later on the balcony and think that it was much too early.

In the evening I let then usually too long or sometimes I open too early.

EDIT: Found this

Some of the weather providers do have Feels Like Temperature. I don’t use a public provider; I host my own weather station and all the calculations. I use Feels Like and I have been playing with ‘Apparent Temperature’; these are virtually the same, except that Apparent takes Solar Radiation into account for the felt temperature. I have the equations for both, I can pull the Feels Like out of an integration on GitHub but I only have the Apparent running in Node-Red for testing still, so I don’t have that equation convenient at this time; I can get it in a few hours when I get back home.

Are you just wanting a weather provide to give this or are you willing to set up your own sensor for it?

Update please; have you fine tuned your automation? What sensors did you end up adding?

In the first step I want to check if “Feels like temp” could be the key. So I want to use weather provider for outside and perhaps the virtual feels-like sensor from Lymcha. Within my flat I had humi/temp sensor in each room.

Out of curiosity, are you all also using air conditioning or are open windows your only/primary cooling method?

I have A/C but also love opening the windows when I can. I use the temperature and relative humidity to calculate the enthalpy of the air inside and out (it’s not exact, because it can’t be directly calculated, but I have a formula that’s plenty accurate for my needs).

Look up enthalpy if you’re not familiar; it’s essentially the energy content of the air, including the latent energy of water vapor. The long/short is, if it’s lower outside than inside you’re not going to make your air conditioner work harder in the future (for instance if you opened the windows when it was cooler but more humid and then decided to turn the A/C on a few hours later). This is similar to one method that commercial building controls systems use to determine whether to use outside air as ‘free cooling’ in the shoulder seasons.

1 Like

I do have A/C, but don’t really use it (long story), but good thoughts on enthalpy and “energy content of the air”