17.04.2023, 07:52
1. Your PID library is incomplete. Copy it from here: https://openrb.com/example-pid-thermostat-with-lm2/
Don't put quotes around numbers, only around group addresses. You can remove min/max/kp/ki/kd settings from PID configuration if you are using the default values.
2. You can add an extra if into the script to check whether heating is enabled and window is closed. Remove manual = '1/1/4', from PID configuration.
3. You can have multiple PIDs in a single script (use different variable names for each). Or you can make separate script for each PID. There's no big difference unless you need more than 10-20 PIDs. See this: https://forum.logicmachine.net/showthread.php?tid=2920
4. The manual mode does not turn off the output. It just stops the PID algorithm. Script in nr.2 sets output to 0 when either the heating is disabled or a window is open.
Don't put quotes around numbers, only around group addresses. You can remove min/max/kp/ki/kd settings from PID configuration if you are using the default values.
2. You can add an extra if into the script to check whether heating is enabled and window is closed. Remove manual = '1/1/4', from PID configuration.
Code:
if grp.getvalue('1/1/3') and grp.getvalue('1/1/4') then
p:run()
else
grp.checkwrite(p.params.output, 0)
end
3. You can have multiple PIDs in a single script (use different variable names for each). Or you can make separate script for each PID. There's no big difference unless you need more than 10-20 PIDs. See this: https://forum.logicmachine.net/showthread.php?tid=2920
4. The manual mode does not turn off the output. It just stops the PID algorithm. Script in nr.2 sets output to 0 when either the heating is disabled or a window is open.