Advice on making dumb bathroom extractor fan smart

Hi there.

I am struggling to get my bathroom extractor fan to run properly.

I bought one with a built in humidistat but I just cannot get it to work properly - it stays on most of the time, despite the humidistat setting, and my guess is that the humidistat just is not particularly sophisticated (or even faulty).

I had my electrician wire it is in, so that the fan is not controlled by the light coming on/off and the fan has its own separate pull cord to turn the power on and off - the idea being that this pull cord should not, in fact, ever really be needed.

As I use HA for a few other things, I though that adding smart control to the extractor fan is the way to go.

What would the best way to do this?

If I bought a basic extractor fan (no timers, pull cords, humidistats etc.), is it simply a case of connecting the power cable to a zigbee relay and then connecting that to the extractor fan?

If so, can anyone recommend any relay in particular (I am in the UK, by the way)?

I was thinking that I could then use an external humidistat sensor, which I could then place anywhere in the bathroom, which I could then use to trigger the fan.

Hi, I am detecting a spike in humidity from one of two Aqara Zigbee sensors to trigger a common extractor fan to run for a set period of time using a Zigbee switch module.

Binary sensor config:

- platform: trend
  sensors:
    bathroom_shower_occupancy:
      entity_id: sensor.bathroom_humidity
      device_class: moisture
      max_samples: 10
      sample_duration: 300
      min_gradient: 0.025
    ensuite_shower_occupancy:
      entity_id: sensor.ensuite_humidity
      device_class: moisture
      max_samples: 10
      sample_duration: 300
      min_gradient: 0.025

Automation Config:

alias: Extractor Fan Control
description: ""
trigger:
  - platform: event
    event_type: timer.finished
    event_data:
      entity_id: timer.extractor_fan_timer
    id: timer_finished
  - platform: state
    entity_id:
      - binary_sensor.bathroom_shower_occupancy
      - binary_sensor.ensuite_shower_occupancy
    to: "on"
    for:
      hours: 0
      minutes: 0
      seconds: 5
    id: shower_active
condition: []
action:
  - choose:
      - conditions:
          - condition: trigger
            id: timer_finished
        sequence:
          - service: switch.turn_off
            data: {}
            target:
              entity_id: switch.extractor_fan_switch2
      - conditions:
          - condition: trigger
            id: shower_active
        sequence:
          - service: timer.start
            data: {}
            target:
              entity_id: timer.extractor_fan_timer
          - service: switch.turn_on
            data: {}
            target:
              entity_id: switch.extractor_fan_switch2
mode: single

You can see how this operates on the card below:

image

The following is the 2-gang Zigbee switch module that I use to run the extractor fan at two speeds (it seems to work well with ZHA):

1 Like

Thanks Mark - that looks like exactly the sort of thing I am after.

How do you have it installed in your bathroom?

My extractor fan is installed through a cavity wall, so my option is going to be to put the device in there (I won’t need any manual switch control). I am not sure whether that device is going to be OK in there - cannot quite work out if the space is going to be overly damp/cold.

That’s exactly how I’m doing it too, but if could I just make some comments on what I found with my sensors.

Yours is:

 bathroom_shower_occupancy:
      entity_id: sensor.bathroom_humidity
      device_class: moisture
      max_samples: 10
      sample_duration: 300
      min_gradient: 0.025

That gradient of 0.025 over 300 seconds equals an increase of 7.5% RH over 5 mins with a max sample size of the last 10 updates. If your sensors are only updating every 30 seconds, then that probably fine, but with my sensors I’m getting a sensor update every 15 seconds and I can use this to very rapidly detect a rise in RH and switch the fan as I found that it was less reliable with a larger sample duration. With the way you’re switching you could be waiting for a max of 5 mins for the fan to react, and that’s not ideal in a shower-room as you really want to be extracting the moisture as soon as the shower starts.
Below I have a shorter sample duration of 60 seconds and the gradient is 0.01666 meaning that I’m detecting a delta RH of 1% over 1 min (60 * 0.01667).

      humidity_shower_rising:
        entity_id: sensor.sonoff_shower_humidity
        sample_duration: 60
        max_samples: 5
        min_gradient: 0.01666
        device_class: moisture

Maybe this helps, or maybe I’m providing advice where it’s not needed.

1 Like

Please be cautious with any mains powered device in a shower/bathroom and especially within a fan enclosure. Most of these controllers are not specified with IP ratings and aren’t suitable for use within the confines of a bathroom, nevermind within the damp flow of an exhaust fan from a shower.
I’d suggest mounting it above the ceiling if possible, or within an IP66 rated plastic enclosure otherwise and protect any external wiring within suitable PVC channels.

1 Like

Thanks for that Ronnie - really helpful advice.

Unfortunately, I cannot put it into the ceiling so shall have to put it in the ceiling so shall have to go within an enclosure. Can you possibly recommend anything suitable that I might be able to sink into the wall, next to the fan? Everything seems to be surface mount only.

I use Wiska boxes which you can often get at a local electrical shop.

You can put cable-glands on them to seal the cables.

Not expensive.

Yes, I should have said that the configuration parameters will need to be varied for different situations. I played around with mine a bit to get the sensor working reliably (which it now does).

Hi Alex, my setup is a little unusual as I live in an apartment. I have a Vent Axia Muli-vent system mounted on the ceiling in a utility cupboard. This has flexible hoses running in the ceiling void that input from 3 areas (bathroom, ensuite, kitchen) and then has a single discharge up to the roof.

image

The control unit has 3 inputs for low/medium/high speed which are activated by switching 240V onto the relevant terminal. I have the light switches turning it on at high speed (as per the original installation) and Home Assistant can control the low/medium speeds via the 2-gang Zigbee switch module that I mentioned previously.

image

Hopefully I have explained things OK.

1 Like