Comments (19)
That is understood, here is the behaviour I am seeing:
- PID controller is running, all good.
- I turn the thermostat to OFF as shown above
- I activate manual control and set the fan to a certain setting --> the fan reacts.
- After the next temp sensor reading the PID controller regulates the sensor back (even though the thermostat is off).
So, as far as I can tell, the PID controller runs on the last set target temperature regardless of the thermostat being set to COOL or OFF.
from esphome-fan-controller.
I'm pleased to announce a fix to this behavior.
I've just pushed a new version of the console-fan.yaml.
But here are the specific changes.
There is a new "fan" added called "manual_fan_control".
Both this fan and the pid controller will output their values to a proxy output. This proxy output decides what to do. Basically if the manual fan control is on, it uses the speed value from that fan, otherwise it uses the value from the PID output value.
Also if you look at the new dashboard yaml I posted in the README.md it describes how to conditionally prevent display of all the PID stuff if in manual control.
# Every time the fan speed is updated, this sensor will
# also be updated for displaying on the frontend.
# See proxy_output.
- platform: template
name: "Fan Speed (PWM Voltage)"
unit_of_measurement: "%"
id: fan_speed_pwm_voltage
output:
# Wire this pin (13) into the PWM pin of your 12v fan
# ledc is the name of the pwm output system on an esp32
- platform: ledc
id: console_fan_speed
pin: GPIO13
# 25KHz is standard PC fan frequency, minimises buzzing
frequency: "25000 Hz"
# my fans stop working below 13% powerful.
# also they're powerful and loud, cap their max speed to 80%
min_power: 13%
max_power: 80%
# This proxy output takes its input
# if the manual fan control is on, use the level from that
# otherwise use the PID control value.
# Then publish the result to the fan (ledc) and
# also publish to the template output sensor
- platform: template
id: proxy_output
type: float
write_action:
lambda: |-
float write_val =
(id(manual_fan_control).state) ?
id(manual_fan_control).speed / 100.0:
write_val = state*1.0;
id(console_fan_speed).set_level(write_val);
id(fan_speed_pwm_voltage).publish_state(write_val*100.0);
# If you turn this on, you can manually set the fan speed.
# The PID will be ignored. This is done via the proxy_output.
fan:
- platform: speed
id: manual_fan_control
output: proxy_output
name: "Manual Fan Speed"
# Expose a PID-controlled Thermostat
# Manual: https://esphome.io/components/climate/pid.html
climate:
- platform: pid
name: "Console Fan Thermostat"
id: console_thermostat
sensor: console_fan_temperature
# It is summer right now, so 30c is a decent target.
default_target_temperature: 30°C
cool_output: proxy_output
# cool_output: console_fan_speed
Enjoy!
from esphome-fan-controller.
The PID controller is still running. Turn the thermostat off.
You'll need to add a separate power switch to control the fan output manually.
from esphome-fan-controller.
I agree that the PID controller is still running, but turning the thermostat off does not change the behaviour. I thought the Fan controller was added to manually control the fan? I guess a power switch would only be needed to turn off the fan completely (can PWM send "real 0" or would a really cutting the 12V+ be better?). Thanks!
from esphome-fan-controller.
The answer to your last question depends heavily on the fan you use.
SOME fans turn off completely at low PWM, but my corsairs, for example, have a set minimum they'll spin at even with a zero PWM signal.
from esphome-fan-controller.
I guess a power switch would only be needed to turn off the fan completely (can PWM send "real 0" or would a really cutting the 12V+ be better?).
I recommend fans that stop at 0%.
My Arctic PWM PST spin at 0% with 200RpM, the Artic PWM PST 0dB stop completely.
from esphome-fan-controller.
That is understood. So my question remains: How to stop the PID controller? :) But it's not that important... ;)
from esphome-fan-controller.
Some fans will turn off with a 100% PWM signal. I think deepcool will treat 100% as 0. I can vouch that no corsair fan behaves that way and no noctua fan behaves that way. I am having difficulty finding it, but another repo with ledc pwm control shows a deepcool 140mm fan turning off at 100% PWM (on an 8266 using sw pwm at 25khz).
Of course, you can also just add a FET to switch the 12v.
Edit: I may have missed the point. Might need a switch that starts enabled on_boot to say "PID control" and then label it 'manual override'. Seems difficult to do without another toggle.
from esphome-fan-controller.
@TheDK forgive me for pointing out the obvious, but this is how you turn off the pid controller
I was not aware that some fans don't treat 0% as off. I think the documentation should be updated to mention this.
As @AlpineWhite indicated, it needs a FET capable of switching from the ESP32. I'd recommend IRLB8721 or FQP30N06L. Do we need to modify the documentation to explain how to do this?
from esphome-fan-controller.
...and to add another question: When I try the change the number entities (i.e. number.serverrack_fan_kd) nothing happens in the HA UI, nothing seems to happen at the ESP32 and when I open the window again it stayed at the old value. It appears to me HA does not read the number and publish it back to the ESP?
from esphome-fan-controller.
I had the same problem.
I replaced:
set_action:
lambda: |-
id(console_thermostat).set_kp( x )
with:
on_value:
then:
lambda: id(${nodename}_console_thermostat).set_kp( x );
set_action
did not work.
from esphome-fan-controller.
same errore. i need some help.
from esphome-fan-controller.
I have the same problem, I want to force the fan to stay on irregardless of the temperature.
When I turn the switch on, the fan starts on full speed as expected, but a few seconds later the climate / pid switches it off again.
Is there a software solution to this as it's already deployed:
switch:
- platform: template
name: Fan ON
id: fan_on
icon: mdi:fan
optimistic: true
turn_on_action:
- climate.control:
id: pid_data
mode: "OFF"
- output.set_level:
id: console_fan_speed
level: 1
turn_off_action:
- climate.control:
id: pid_data
mode: "COOL"
from esphome-fan-controller.
I'm running into the same thing @patrickcollins12 - it appears that setting the climate component to off
does not disable the PID running.
- I switch climate from
cool
tooff
in HA - Enable fan control
- Fan starts spinning
- With next data received from ESP fan stops spinning
from esphome-fan-controller.
Can we start a new issue please?
from esphome-fan-controller.
@darmach what do you mean by step 2, "enable fan control"?
from esphome-fan-controller.
Hi @patrickcollins12 I can open a new issue, no problem :)
As for the no.2 - by "enabling fan control" I meant turning on/setting speed to maximum for fan control device - the one templated in:
# Good for debugging, you can manually set the fan
# speed. Just make sure the Climate device is set to off or it will keep getting overridden.
fan:
- platform: speed
output: av_cabinet_fan_speed
name: "Fan Speed"
So as such, I suspect it is being overridden after all - despite climate device being turned off (Set to OFF in homeassistant instead of COOL)
from esphome-fan-controller.
Interesting I understand the issue now. I wonder if that is new behaviour in esphome. The template need some kind of awareness who is in control.
from esphome-fan-controller.
from esphome-fan-controller.
Related Issues (20)
- This is so cool! But...couple of questions? HOT 19
- Reduce flash writes? HOT 4
- Problems using Dallas sensor HOT 9
- Reading multiple tacho signals separate HOT 3
- Offset ?
- make fan stop spinning at zero HOT 44
- One console with two separate connected fans HOT 2
- LED strip control HOT 3
- Set the target temperature from an automation HOT 3
- Tacho connection in documentation HOT 1
- Additional fans HOT 10
- question about external temperature instead of built in dht HOT 1
- Fritzing Img ESP Pinouts? HOT 4
- Manual and thermostat fan control HOT 1
- constantly reboots HOT 13
- Two Sensors HOT 3
- DHT11 temperature stops updating periodically HOT 6
- Need advice: Still high temps. What RPM is good? HOT 1
- 3 wire fan HOT 3
- Can I do this project with a fan control with potentiometer? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esphome-fan-controller.