Problem with rules for fan control with humidity and PWM
Posted: 29 Dec 2023, 21:42
Hello,
I try to control a fan with measured humdity, PWM and rules but I don't find a working solution.
I know how to do it with python or C but I have problems to understand the rules logic.
I want to control:
Humid < 50 PWM 300
Humid >51 and <61 PWM 700
Humid >61 and < 70 PWM 900
Humid > 70 PWM 1023
The hardware and the sensors work.
I tried things like that:
On
if [BME280#Humidity]>51 and [BME280#Humidity]<61
PWM,12,700
end if
Endon
for every step one rule but it doesn't work
The only thing which works was:
On BME280#Humidity<50 Do
PWM,12,300
Endon
On BME280#Humidity>50 Do
PWM,12,1023
Endon
in one rule but with this I only have two steps.
Maybe you can help me? Thank you!
I try to control a fan with measured humdity, PWM and rules but I don't find a working solution.
I know how to do it with python or C but I have problems to understand the rules logic.
I want to control:
Humid < 50 PWM 300
Humid >51 and <61 PWM 700
Humid >61 and < 70 PWM 900
Humid > 70 PWM 1023
The hardware and the sensors work.
I tried things like that:
On
if [BME280#Humidity]>51 and [BME280#Humidity]<61
PWM,12,700
end if
Endon
for every step one rule but it doesn't work
The only thing which works was:
On BME280#Humidity<50 Do
PWM,12,300
Endon
On BME280#Humidity>50 Do
PWM,12,1023
Endon
in one rule but with this I only have two steps.
Maybe you can help me? Thank you!