I want to switch the fan on if the fan inlet temperature (read by DHT22) is higher than the basement temperature (read by DHT22).
I also want to control (override) the fan with my smartphone. and also control it based on the clock time (off between 11pm to 7am - sleeping time)
I am a 100% n00b at LUA coding and all I can do so far is make an LED blink, make a SSR relay turn on and off via my home network, and get a temperature reading to be displayed on the internet.
I am using ESPlorer to program my ESP8266 and my NodeMCU V1 and am kinda getting the hang of it all.
now my next big step is to get the fan control working - without wanting anyone to "please write my LUA code" I kinda just need to understand what components the code will need, then I can research more on how to write the code.
so I *think* I need:
1. code to read two DHT22 sensors
2. code to make a calculation of the DHT22 outputs (if temp1 > temp2, then fan relay (GPIOx) HIGH)
3. code to make a simple web interface to display the DHT22 reading and have an override button
am I way over my head, or will I be able to work this out with a bit of guidance?
thanks!