I use ESPEasy version 148 talking to a RasPi/Domoticz server with MQTT.
A DS18B20 mounted on a heatsink measures temperature. GPIO-0 with PWM controls a fan that lowers the temp of the heatsink.
The fan should start at about 35C with a minimum PWM value of about 400 and above 75C PWM should always be 1023
Task 1 is a DS18b20 Named DS18 ValueName Temp
Task 4 Dummy Named Fan and ValueName PWM
I wrote this rule:
Code: Select all
On System#Boot do
timerSet,1,15
endon
On Rules#Timer=1 do
if [DS18#Temp] >35
TaskValueSet 4,1,[DS18#Temp]*12
PWM,0,[Fan#PWM]
else
TaskValueSet 4,1,0
PWM,0,0
endif
timerSet,1,15
endon
What is the solution?