Flashing QuietCool-AFG-SMT-PRO-2.0 Attic Fan with Tasmota

Decided to put an attic fan in over the garage and tried to find a “smart” one.  Sure enough Quietcool makes them and even better they have an ESP32 wifi chip in them which can be flashed with Tasmota.


This means the fan can be controlled locally with Home Assistant and doesn’t need a separate app to control it.

Also while having an attic fan being smart it doesn’t need to be super smart.  You want them to come on at a certain temp and go off at a certain temp.

The manufacturers app has too much going on in my opinion.  And with these apps you just have no idea what they are up to.

The only person who has any business knowing my attic fan is on or off is ME.  Not QuietCool, not Google, just me.


DISCLAIMER:  This is not my work. I was walked through this by user kwikSi1ver on the Digiblur Discord discussion group.  I am only documenting this for posterity and re-creation purposes.  Again, I claim no credit for this.

Flashing with Tasmota is really no issue.  I can do that.  The magic and genius behind this is the reverse engineering.  Telling what relay to do what.  Making sure both relays don’t come on at the same time.  Making sure the power LED comes on.  Making sure all the sensors are recognized and spew out the right information and are DISCOVERABLE.

Yep, anyone can flash Tasmota.  The guys who reverse engineer stuff get all the credit.  But first ya gotta flash it.  But first lets back up the manufactures firmware in case something goes wrong.

Lets use ESPTool.  On a Mac you can install it easily by issuing the following command in the terminal:

pip install esptool

Let’s hook up the board for backing up and flashing.  You can just crack open the case and do everything from the bottom of the board.  No need for complete disassembly.

QuietCool FTDI Hook Up (click pics to enlarge)

Once connected to the FTDI and the Boot Pin (GPIO0 is shorted) plug in your USB cable.  You should just get one red light to indicate you are in boot loader mode.  Go to the terminal in Mac and issue this command:

ls /dev/*

This will let you know what your COM port is.  Mine was:


Now the backup command.  Be sure to change the com port to whatever yours actually is.

esptool.py -b 115200 --port /dev/cu.usbserial-A10KP8TL read_flash 0x000000 0x400000 flash_4M.bin

This takes a while. Like 10 mins or so.  Be sure to save this file somewhere.

Now you have to follow the directions for flashing Tasmota for ESP32.  This is the command but WE ARE NOT READY JUST YET.

esptool.py --chip esp32 --port COM5 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dout --flash_freq 40m --flash_size detect 0x1000 bootloader_dout_40m.bin 0x8000 partitions.bin 0xe000 boot_app0.bin 0x10000 tasmota32.bin

Okay, lets do some things.  Notice in the command above there are some reference to some bin files.  You need to flash from a folder that contains those files.

Go to this website and download the Code (its in a zip file. Green button on the page that says code).  Go to the static directory > then ESP32 directory.  There are your files.

Lastly download Tasmota32.bin and place it in the same directory (my backup file is in here too. You only need the 4 files).

CD into that directory and this is where you will issue your command that we posted above.  Only make sure your COM port is correct.

esptool.py --chip esp32 --port /dev/cu.usbserial-A10KP8TL --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dout --flash_freq 40m --flash_size detect 0x1000 bootloader_dout_40m.bin 0x8000 partitions.bin 0xe000 boot_app0.bin 0x10000 tasmota32.bin

This doesn’t take too long.   Here’s a quick vid I made on the process.

Once flashed disconnect the FTDI and plug the fan in the wall.  The FTDI doesn’t seem to have enough OOOMPH to power the AP hotspot.  Once plugged in the wall it will create a Tasmota hotspot which you can connect and then go to in a browser.  Tasmota wants your network credentials and then connects to your wifi network.  Once you connect to THAT IP address it comes up with a generic template.

Go to Configuration > Configure Other and paste in the following template:

{"NAME":"QuietCool-AFG-SMT-PRO-2.0","GPIO":[1,1,1,1,1,224,1,1,1,1,1,1,1,1,640,608,0,1,1,225,0,1,1,1,0,0,0,0,1,1,1,1,1,0,0,1],"FLAG":0,"BASE":1,"CMND":"Interlock 1|WebButton1 Low|WebButton2 High"}

Click the Activate Button just below it and hit save. It will reboot and look like this:

If you need the temperature display units in F instead of C go to the Tasmota Console and issue

so8 1

Lastly the front of the box has two buttons.  One was Test and one was Pair.  Since we are no longer bluetooth pairing with the manufacturers app we can map those buttons to Low and High fan speed for manual setting at the fan.

Go to Configuration > Configure Template and set GPIO 26 to Button 2 and then set GPIO 27 to Button 1.  Hit save and the controller reboots.  Now the buttons work as high and low.  I’m playing around with the LED lights now and it isn’t as easy as the buttons were.

Anyway the advantage here is manual control at the fan itself.  Let’s say you are rooting through boxes in the attic and it’s hot but not hot enough for the fan to kick on.  You can just go kick it on.

We will control the fan with Home Assistant automations which I haven’t gotten around to yet because I haven’t mounted the fan yet.  Basically we will want a few automations.  Both the low and high speed control was auto detected by the Tasmota integration so we can use those entities to control the fan.  We’ll want to:

  • Turn the fan to low when it reaches a certain temperature
  • Turn the fan to high when it reaches a certain temperature
  • Shift from high to low as the temperature lowers
  • Shut the fan off when the temperature gets below whatever temp threshold we set.

Also kwiksi1ver wrote a rule for turning the fan off at 182 degrees.  Don’t laugh. This is a safety protocol the manufacturer uses.  If there is a fire, you don’t want a big old nasty super strong fan pulling fresh oxygen into it or spreading the fire somewhere else.  The rule you paste in your Tasmota console is:

Rule 1 ON SHT3X#Temperature>182 DO Power0 0 ENDON

Then run

 Rule 1

This last command loads the rule.

So even though the manufactures app is slick and I can control my attic fan with it………it works in the Cloud.  That app lives on your phone, your network, and you really don’t know what packets of information it is capable of sending or receiving.    Let’s also assume that QuietCool are straight up red, white, and blue Americans who would never do anything nefarious.   What if their code has gaping security holes in it which can be exploited?   Someone can hack your whole network because your fan software sucks.   Again I am NOT saying this is the case, but this is how hacks work.

Look up the Marai Attack sometime if you don’t think Internet of Things (IoT) devices can be hacked.

So we took our fan and gave it local control.  No Cloud.  It does exactly the same job but without a pretty app.

Leave a Reply

Your email address will not be published. Required fields are marked *