My daughter has been suffering with allergies this spring. I decided to install a new air Purifier in the house. It may also help with bacteria/virus control too. It is a UV light in combination with an ionizer. It installs in the heater air duct. It was easy to install, cut a 3 inch hole in the duct after the fan and screw it into the hole. Install the provided transformer inside the heater and plug it in.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQJpHC47tlUh92J8VHw2YVJPwFhbQpLxT7tUUEZ1hjWZIhR_RsS2803XQaTYmp-9o4rlxqADrN9oIk408lyoyElfSX6-7iNC52WArc5vTtX5_CpgT6IT07HeV_TYWhDBcyTjqiwUhAfF0/s640/IMG_20200314_144323.jpg) |
The air purifier installed. |
For the size of this house based on square footage, it needs the fan to run at least 20 minutes at a time and repeat every hour regardless of whether the heater is on or not. I didn't have a timer and Amazon wanted way TOO much! I did find a dual relay module in my extras box and an esp8266, NodeMCU V0.9. I've had them quite a while.
I had heard of Tasmota, an IoT home automation software for ESP based controllers. I had not played with it before. I could have just written a program and webpage, but I usually do not add the extra code for robustness. I hoped that tasmota did. I downloaded it and flashed the ESP. It only took a couple days to find the little nuances that stopped it from doing what I wanted (without reading all the docs!). I was caught by the desire to not use MQTT or any cloud services. Finally I found that "on system#boot" does not work without MQTT and mDNS set, so it needed a patch, I downloaded tasmota_8.1.0.10.bin from http://thehackbox.org/tasmota/
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhx6jLBLu_wVCP_o_oyTVb2VN2oYMloL9UopOiumuQ3sQ6kDrqmfpzpvNUJDOF2ocdVynrSm5sBQ72xniQiA3tFWBDc8XJemhR1UcJO2369jrG5eQ8MoZIL8J189IYmqQNYxon6e7ukVwk/s640/IMG_20200314_144433.jpg) |
The dual relay module and the NodeMCU V0.9 |
In the end it only required a single multi-part rule to get the 20 minutes ON followed by 60 minutes of OFF. And it comes back for a re-boot/or power cycle controlling properly.
rule1
on system#boot do backlog ruletimer1 1800; power1 1 endon
on rules#timer=1 do backlog ruletimer2 3600; power1 0 endon
on rules#timer=2 do backlog ruletimer1 1800; power1 1 endon
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0jJUXquAUrGNmPKF4QRSUFK9tx3nBlVlHPhChay7gFz5h5zv4qITHgGvb527WypYGIGOhwi_lf6kmDADZdhyarg5e-hZz17ZpmRE9hvn2vrFRaxPRo2bNaRhAHfJeZy8a8MeLXjlYyX4/s640/IMG_20200314_144402.jpg) |
A 3D-printed enclosure |
I think the ESP needs to be outside the metal enclosure of the heater so it needs a protective case. I printed one with my Ender3 Pro.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjO8WyOsMdliffj1PM5KNG2V1dBleTf5wi3ORJk2A4MAxmRwOinQ3kNuRnLxr4XVOY_9nobNMQZqWk87n41vKBsUr81TukVCqGS_4OyepBHYqSUJvOc8cPOFW3a9Y2mjBZUHTAGYG6Clqg/s640/Screenshot_2020-03-14-15-18-11-690_com.android.chrome.jpg) |
The Tasmota WiFi interface on my phone |
With the stock interface the fan can be turned ON or OFF.
The details, if you are interested:
I downloaded and installed tasmota from:
https://github.com/arendst/Tasmota/releases/tag/v8.1.0
I then found that "on system#boot" does not work without mqtt and mDNS set, need patch
downloaded tasmota_8.1.0.10.bin from http://thehackbox.org/tasmota/
Then flashed it on a nodemcu V0.9 board with:
esptool.py --port /dev/ttyUSB0 write_flash -fs 1MB -fm dout 0x0 tasmota.bin
The dual relay module on D2. (I don't need the second relay, but it is what was on hand.)
Nodemcu Relay
5V -- VCC
GND -- GND
D2 -- IN1
jumper to JD-VCC-VCC not VCC-GND
connect WiFi on phone to 192.168.4.1 then set local WiFi configuration
reboot, net scan to find address. It may do mDNS.
config menu: Generic(0)
Save
D2 Relay1i(29)
Console:
rule on system#boot do backlog ruletimer1 1200; power1 1 endon on rules#timer=1 do backlog ruletimer2 3600; power1 0 endon on rules#timer=2 do backlog ruletimer1 1200; power1 1 endon
Save
Configure Other
PurifierFan, purifierFan2
Save
Console
Rule1 1
Config- Save Config to-> /Config_tasmota_A450B3_4275_8.1.0.10.dmp
It has been working flawless for 3 days now. No sneezing or watery eyes since!