I'm still testing but may I found a workaround, to make PWM PID happen. The trick is to set the temperature higher or lower than the actual value to trigger the hysteresis.
Here is how I did it in node-red:
I set up a standard PID controller with analog input from BHT-002 and analog out 0.0...1.0
The analog output goes to a PWM node converting the analog to pulse pause at very slow frequency e. g. 200s on / 800s off = 0.25 = 25%
The pulse goes to a converter which is generating a dynamic setpoint for BHT-002 based on the actual room temperature. See codebox below.
The dynamic setpoint is calculated and sent every two minutes to make sure it always +-1K off even if the actual temperature just flipped while calculation.
// Open thermostat: set setpoint temperature higher than actual
if (msg.pulseOut == 1) {
msg.becaSetpoint = msg.becaTemperature + 1K;
}
// Open thermostat: set setpoint temperature lower than actual
if (msg.pulseOut == 0) {
msg.becaSetpoint = msg.becaTemperature - 1K;
}
return msg;
Used Nodes:
PID: node-red-contrib-pid
PWM: node-red-contrib-timeprop
I wonder if you could implement a PID workaround directly in the thermostat. Recommended features:
adjustable setpoint
adjustable PWM cycle time
adjustable PID parameter
integral lock (if window is open or difference too high for long)
summer anti seize feature: open daily/weekly for x amount of time
support an external temperature sensor on ESP as actual value for PID (like DS18B20 or BME280 or BMP280)
EDIT: changed hysteresis to 1K. +-0.5K does not trigger the relay safely.
I'm still testing but may I found a workaround, to make PWM PID happen. The trick is to set the temperature higher or lower than the actual value to trigger the hysteresis.
Here is how I did it in node-red:
Used Nodes: PID: node-red-contrib-pid PWM: node-red-contrib-timeprop
I wonder if you could implement a PID workaround directly in the thermostat. Recommended features:
EDIT: changed hysteresis to 1K. +-0.5K does not trigger the relay safely.