smeisner / smart-thermostat

Open-source ESP32-based thermostat that has some useful intelligence
GNU General Public License v3.0
37 stars 9 forks source link

Turn on fan pin with heat or cool #28

Closed smeisner closed 9 months ago

smeisner commented 9 months ago

(G) Fan must be energized whenever (W) HEAT or (Y) COOL is asserted.

smeisner commented 9 months ago

Many modern HAVAC systems do not require this, but older ones can very well require FAN when heat or cool is called for.

y9rabbito commented 9 months ago

Can you specifically elaborate it and in which file i need to update the fan control signal G.

smeisner commented 9 months ago

the relay pins are controlled in state_machine.cpp. In the main loop is where the decisions are made to turn on/off each relay...and LEDs, if appropriate.

y9rabbito commented 9 months ago

@smeisner means this value gpio_set_level((gpio_num_t)LED_FAN_PIN, LOW); should be set to high on coolstate currenttemp > maxtemp

smeisner commented 9 months ago

Yes, that will turn on/off the LED. I think you want to look for HVAC_FAN_PIN to control the relay. For heat, the red LED is turned on. For cool, the blue is turned on. If only the fan is turned on, the green LED is turned on. If the fan is turned on as part of cooling/heating, there is no need to turn on the LED.

y9rabbito commented 9 months ago

Actually i have never read or know about HVAC system Im googling the topic and trying to understand the code.

y9rabbito commented 9 months ago

@smeisner can u take a look at that and let me know if it's right or not.

smeisner commented 9 months ago

This issue was addressed with e7d7b29dbfe0932cfff6a9a89d79f6e1776096d0. Code has beenmerged.