Attic Fan Automation Node-Red

I purchased home a few years ago and noticed an Attic fan which was not hooked up. After fumbling around and trying to get electricity I was able to get it working with an “old school” thermostat switch like this one:

These thermostat switches suck big time, I think they are mechanical so the temp varies a lot as to when the fan kicks in/out. It was also pretty hard to adjust and impossible to override.
I decided to swap this out to a zwave toggle switch and needed to figure out how I would automate this.

There are 2 issues with using attic fans which you need to consider:
The first issue is that it should always be off if the AC is running as the only thing it will do is suck out all the cold air in the house. The second issue is a safety problem, since the attic fan creates negative pressure in the house. If all the windows are closed, it could cause our boiler exhaust to be sucked into the house instead of vented to the chimney.

I decided that the best way to automate this would be to use my zwave temp sensor in the master bedroom. This is the room that benefits the most from the fan since the AC has trouble keeping this room cool while the rest of the house is already too cold. My automation starts by checking the temp there and splits out if the temp is above or below 82 Fahrenheit.
From there I check if the windows are open. I have an alarmdecoder unit that exposes all of my home alarm sensors to homeassistant. I simply created a group for all the binary window sensors. As soon as they are all closed the state of the group changes to “off” and if even a single window is open the state changes to “on”.
I do have a Nest thermostat at home to control the AC but the attic fan is much more efficient in giving the initial cool down, especially of the master bedroom. It also costs much less to operate. This is especially noticeable when it cools down outside in the evening but the house retains the days heat. So normally, I open a bunch of windows in the morning and set the Nest to off. During the day, the house starts to warm up and as soon as we hit 82 in the master the attic fan kicks on. This usually keeps the house pretty comfortable and doesn’t let it get too hot. Once I get home I close all the windows (which causes the attic fan to shut down and then I turn on the AC.
The last check I have in place is if the fan is already on/off before I call the service. No need to send the on command to the zwave switch every 60 seconds if it’s already on.
I also added a check to shut off the fan if all the windows are closed regardless of the temp. This is just in case someone mistakenly turned it on manually when the master bedroom was below 82 (wouldn’t want to suck in the boiler exhaust by mistake). Here is what it looks like in Node-Red:

Hopefully this gives a better idea of the automation.
I can tell you that my attic fan will cool my master bedroom by almost 10 degrees within minutes of working while the AC would have to be running for hours before making any headway. This is really noticeable and once that is done, I just close everything and let the AC kick in.
The only thing I haven’t figured out is how to manually override this automation. If I want to run the fan when the master is below 82 the automation shuts it down shortly after. I’m wondering if there is a way to account for that without having to modify the automation each time I want to override.
Any questions are comments are always welcome!

3 Likes

Do you mind sharing your Node-Red flow? Great to see the diagram!

Sorry, not much of an expert on node-red but hope the below was what you were asking for?

[
    {
        "id": "ffd3978b.10a398",
        "type": "poll-state",
        "z": "942a5c2b.35284",
        "name": "master temp",
        "server": "c951c3d.3b1634",
        "version": 1,
        "updateinterval": "60",
        "updateIntervalUnits": "seconds",
        "outputinitially": true,
        "outputonchanged": true,
        "entity_id": "sensor.aeon_labs_zw100_multisensor_6_temperature",
        "state_type": "str",
        "halt_if": "",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "outputs": 1,
        "x": 110,
        "y": 940,
        "wires": [
            [
                "58b953ca.88b07c"
            ]
        ]
    },
    {
        "id": "58b953ca.88b07c",
        "type": "switch",
        "z": "942a5c2b.35284",
        "name": "is temp above or below 82",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "gt",
                "v": "82.0",
                "vt": "str"
            },
            {
                "t": "lt",
                "v": "82.0",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 390,
        "y": 940,
        "wires": [
            [
                "7639b66d.31a2b8"
            ],
            [
                "faa40ffb.2b4e3"
            ]
        ]
    },
    {
        "id": "7639b66d.31a2b8",
        "type": "api-current-state",
        "z": "942a5c2b.35284",
        "name": "if above 82 are windows open",
        "server": "c951c3d.3b1634",
        "version": 1,
        "outputs": 2,
        "halt_if": "on",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "override_topic": false,
        "entity_id": "group.windows",
        "state_type": "str",
        "state_location": "payload",
        "override_payload": "msg",
        "entity_location": "data",
        "override_data": "msg",
        "blockInputOverrides": false,
        "x": 390,
        "y": 780,
        "wires": [
            [
                "b7184d3e.646be"
            ],
            [
                "982b1352.e6cf7"
            ]
        ]
    },
    {
        "id": "b7184d3e.646be",
        "type": "api-current-state",
        "z": "942a5c2b.35284",
        "name": "Windows open, Is fan off?",
        "server": "c951c3d.3b1634",
        "version": 1,
        "outputs": 2,
        "halt_if": "off",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "override_topic": false,
        "entity_id": "switch.attic_fan",
        "state_type": "str",
        "state_location": "payload",
        "override_payload": "msg",
        "entity_location": "data",
        "override_data": "msg",
        "blockInputOverrides": false,
        "x": 690,
        "y": 740,
        "wires": [
            [
                "26f85cfe.2eae84"
            ],
            []
        ]
    },
    {
        "id": "26f85cfe.2eae84",
        "type": "api-call-service",
        "z": "942a5c2b.35284",
        "name": "turn on the attic fan",
        "server": "c951c3d.3b1634",
        "version": "1",
        "service_domain": "switch",
        "service": "turn_on",
        "entityId": "switch.attic_fan",
        "data": "",
        "dataType": "json",
        "mergecontext": "",
        "output_location": "",
        "output_location_type": "none",
        "mustacheAltTags": false,
        "x": 970,
        "y": 740,
        "wires": [
            []
        ]
    },
    {
        "id": "982b1352.e6cf7",
        "type": "api-current-state",
        "z": "942a5c2b.35284",
        "name": "windows closed, if fans is on",
        "server": "c951c3d.3b1634",
        "version": 1,
        "outputs": 2,
        "halt_if": "on",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "override_topic": false,
        "entity_id": "switch.attic_fan",
        "state_type": "str",
        "state_location": "payload",
        "override_payload": "msg",
        "entity_location": "data",
        "override_data": "msg",
        "blockInputOverrides": false,
        "x": 700,
        "y": 820,
        "wires": [
            [
                "b5c92821.7806b8"
            ],
            []
        ]
    },
    {
        "id": "b5c92821.7806b8",
        "type": "api-call-service",
        "z": "942a5c2b.35284",
        "name": "turn off the attic fan",
        "server": "c951c3d.3b1634",
        "version": "1",
        "service_domain": "switch",
        "service": "turn_off",
        "entityId": "switch.attic_fan",
        "data": "",
        "dataType": "json",
        "mergecontext": "",
        "output_location": "",
        "output_location_type": "none",
        "mustacheAltTags": false,
        "x": 970,
        "y": 820,
        "wires": [
            []
        ]
    },
    {
        "id": "e5d395bf.07aae8",
        "type": "api-call-service",
        "z": "942a5c2b.35284",
        "name": "turn off the attic fan",
        "server": "c951c3d.3b1634",
        "version": "1",
        "service_domain": "switch",
        "service": "turn_off",
        "entityId": "switch.attic_fan",
        "data": "",
        "dataType": "json",
        "mergecontext": "",
        "output_location": "",
        "output_location_type": "none",
        "mustacheAltTags": false,
        "x": 970,
        "y": 1120,
        "wires": [
            []
        ]
    },
    {
        "id": "787a21ea.a0217",
        "type": "api-current-state",
        "z": "942a5c2b.35284",
        "name": "windows closed, is fan on?",
        "server": "c951c3d.3b1634",
        "version": 1,
        "outputs": 2,
        "halt_if": "on",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "override_topic": false,
        "entity_id": "switch.attic_fan",
        "state_type": "str",
        "state_location": "payload",
        "override_payload": "msg",
        "entity_location": "data",
        "override_data": "msg",
        "blockInputOverrides": false,
        "x": 720,
        "y": 1120,
        "wires": [
            [
                "e5d395bf.07aae8"
            ],
            []
        ]
    },
    {
        "id": "faa40ffb.2b4e3",
        "type": "api-current-state",
        "z": "942a5c2b.35284",
        "name": "if below 82 are windows open",
        "server": "c951c3d.3b1634",
        "version": 1,
        "outputs": 2,
        "halt_if": "on",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "override_topic": false,
        "entity_id": "group.windows",
        "state_type": "str",
        "state_location": "payload",
        "override_payload": "msg",
        "entity_location": "data",
        "override_data": "msg",
        "blockInputOverrides": false,
        "x": 390,
        "y": 1100,
        "wires": [
            [
                "33b9d7b7.a4e628"
            ],
            [
                "787a21ea.a0217"
            ]
        ]
    },
    {
        "id": "33b9d7b7.a4e628",
        "type": "api-current-state",
        "z": "942a5c2b.35284",
        "name": "windows open, is fan on",
        "server": "c951c3d.3b1634",
        "version": 1,
        "outputs": 2,
        "halt_if": "on",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "override_topic": false,
        "entity_id": "switch.attic_fan",
        "state_type": "str",
        "state_location": "payload",
        "override_payload": "msg",
        "entity_location": "data",
        "override_data": "msg",
        "blockInputOverrides": false,
        "x": 710,
        "y": 1060,
        "wires": [
            [
                "3b6995b9.9ecada"
            ],
            []
        ]
    },
    {
        "id": "3b6995b9.9ecada",
        "type": "api-call-service",
        "z": "942a5c2b.35284",
        "name": "turn off the attic fan",
        "server": "c951c3d.3b1634",
        "version": "1",
        "service_domain": "switch",
        "service": "turn_off",
        "entityId": "switch.attic_fan",
        "data": "",
        "dataType": "json",
        "mergecontext": "",
        "output_location": "",
        "output_location_type": "none",
        "mustacheAltTags": false,
        "x": 970,
        "y": 1060,
        "wires": [
            []
        ]
    },
    {
        "id": "b1d8d591.3f6608",
        "type": "comment",
        "z": "942a5c2b.35284",
        "name": "Attic Fan Automation",
        "info": "",
        "x": 690,
        "y": 940,
        "wires": []
    },
    {
        "id": "c951c3d.3b1634",
        "type": "server",
        "name": "Home Assistant",
        "legacy": false,
        "addon": true,
        "rejectUnauthorizedCerts": true,
        "ha_boolean": "y|yes|true|on|home|open",
        "connectionDelay": true,
        "cacheJson": true
    }
]

Thank you,
I’m putting together an automation for my WHF. This will help.