Search

Smart extractor fan upgrade

A cheap way to upgrade your bathroom extractor fan.


last September me and my partner moved into our new apartment, in our previous apartment we spent quite a bit of money upgrading all of the Lights to hue RGB lights.

So obviously they had to come with us, one of the first things we did in the new apartment was take out all of the old light bulbs some LEDs some Incandescence and put in the hue lights. and to anyone who is familiar with hue lights the light switches become a thing on the wall you don't really care about, except of course in our bathroom because the landlord has wired the bathroom extractor fan directly into the light switch.



This works but personally I think this is a terrible way of doing it because after you're done taking a shower and you turn off the lights which consequently turns off the fan so all of the moisture that is still in the bathroom after taking a shower stays there and eventually leads to Mold, ideally you would want the fan to be on a timer so that when you turn off the power it stays on on to get rid of the extra moisture. this also means the bathroom fan turns on even when it's unnecessary for example when we want to use the bathroom.



So how do we fix this?

Well for one, you can call your landlord and ask to rewire it but that would mean running an additional mains power line to the fan so obviously my landlord isn't going to do that (We asked) Next best thing without spending a lot of money make it Smart.


let's start by removing it from the ceiling.


having a closer look at it we can see that it has a timer and a humidity sensor completely unutilized, because the signal is directly connected to live.



So let's get this fan connected to home assistant


Parts

so I grab all of these components and roughly lay them out inside the fan case, then connected everything together.


The relay connects between the power to the fan

The little power supply connects directly to mains

The 5 volt power out directly into the D1 Mini and relay

The bme280 connect into I2C and 3.3 volts on the D1 Mini

The relay signal pin goes into any of the GPIO ports on the D1 Mini

that's all the wiring done


Now let's flash the D1 mini with ESPhome so we can do over the Air updates,

And glue everything into place with hot glue.



let's install it back in the ceiling and plug it into power, see that everything boots up properly and we should have a new integration in our home assistant



Code
esphome:
  name: bathroom-extractor-bmp280
  platform: ESP8266
  board: d1_mini

logger:

api:

wifi:
  ssid: !secret ssid
  password: !secret password

captive_portal:
i2c:

  - platform: bme280
    temperature:
      name: "bathroom Temperature"
    pressure:
      name: "bathroom Pressure"
    humidity:
      name: "bathroom Humidity"
    address: 0x77
    update_interval: 30s

switch:
  - platform: gpio
    name: "Extractor Fan"
    pin: D7

binary_sensor:
  - platform: status
    name: "Bathroom Sensor"

Let's check if it all works properly, we are getting sensor readings and the relay turns on and off.


so now let's set up a little automation in Node-RED.



And this is very simple all way of going to do is get the bathroom humidity every 30 seconds and if it's between 0 to 50 we tell it to turn the fan off and if it goes above 60 we tell it to turn the fan on and it will stay on until it goes back down to a reasonable level.


I do want to improve this automation by leaving the fan on until the humidity goes down to the same level as one of the other senses in my house but I haven't figured out how to do that yet if you have any ideas let me know.


I also made a video about this project.



Thanks for sticking around.

if you'd like to support what I do here I'd appreciate a coffee

or just follow me on any of the social media platforms at the bottom of the page

I'm most active on Instagram


Until next time stay Mellow and have fun.


1,334 views0 comments

Recent Posts

See All

Cat box