How to accomplish this 1 step at a time with LOTS of reading. That's how.
Put everything but the UNO away, for now.
-
Learn to program the UNO. There is an onboard LED on Pin 13. Learn how to control it, make it blink and make it turn on/off using an input.
-
Learn how to print things to the serial monitor. Use #1 and when the LED turns on send ON to the Serial monitor, and the same for OFF. Don't know what the Serial Monitor is, look above at resources and do some reading.
-
Get out the relay module. Use #2, add another output and another input. Use the output to control the relay. You should hear it click when it turns on. A voltmeter set to read resistance can be used to check the relay contacts to verify the relay turns on and off. If you don't have a voltmeter, get one and learn what the functions are. Even the cheapest one will be 100x better than none.
So far its been easy. The next steps are far more difficult.
4. Get out the DHT22. Learn to load the library(ies) required. Get it to print out the readings to the Serial Monitor.
5. Modify #4 to use the readings to control the relay.
- Get out the ESP8266 and connect it. I can't detail this further as I have yet to use the ESP8266. Because you have #5 sending reading to the serial monitor, you will be able to compare the webpage to the serial monitor to verify if it is all working correctly.
I will now put out a question and warning. The lights and ventilation, are they 120V AC or 240V AC? If they are either you will be playing with dangerous voltages on the relay board. If they are 240VAC, the board is likely not designed properly to handle that voltage. The relay may be rated for 240VAC, but not the board design. Just because you have a 10 cylinder engine in you car doesn't mean you can tow a freight trailer. It's all or nothing.
You can use one relay to control another. Most likely a relay not mounted to a circuit board can be used be safely, such as a relay like this one Jameco General Purpose Relay