![]() |
Thermostat with auto disable function - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8) +--- Thread: Thermostat with auto disable function (/showthread.php?tid=5694) |
Thermostat with auto disable function - eurosting - 22.10.2024 Hello all,
OR window opened I'm looking for thermostat function/script with 1-bit output. I have a electric heater in the bathroom, which controlled by MDT 1216 actor, and I have also motion detector and window sensor installed. The idea is to start the heater (electric plug) as long: "current temp"< "set value temp" AND window is closed AND last motion detected < 1hour Heater off (electric plug) if: "current temp" + hysterese > "set value temp" Heater thermostat function off if: 1) last motion detected > 1hour (in case the thermostat was forgotten)
2) OR "current temp" > "set value temp" for more then 1 hour (in case it's too hot, but somebody enabled the heater). It's not a PID functtion, just 1 point thermostat with some supervision. Please advise! RE: Thermostat with auto disable function - RomansP - 22.10.2024 Hello There are several questions at this moment: 1.) Are you going to control only one electric plug with connected heater? (cause it is a bit confusing "Heater off (electric plug)" and "Heater thermostat function off") 2.) How often does motion sensor is sending the telegrams (after what time it switches off)? RE: Thermostat with auto disable function - eurosting - 23.10.2024 (22.10.2024, 11:08)RomansP Wrote: Hello Hello RomansP, 1) well, the electric wall heater is just plugged to electric plug without any own control or measurement. So, I just need to switch on/off the electric plug. 2) the motion sensor ist MDT BWM55.02. As I know, by default it sends ON telegram at begin (but can also send this telegram cyclically) and it sends OFF telegram after expiry of time - normally to control the lights, but I don't use it. I don't have expirience with ser/reset timers. To build a logic is not a problem. RE: Thermostat with auto disable function - RomansP - 23.10.2024 Here is a script, but please carefully test it and give the feedback. I will make a changes if necessary. It is a resident script, with sleep time 60 seconds. Code: if not motion_minute_counter then RE: Thermostat with auto disable function - eurosting - 23.10.2024 Hi RomansP, thanks a lot, I done some changes in your script and will check it the next days. At the moment I just using the switch button to on/off the plug with electric wall heater. Now by using resident script I have to activate/deactivate the script with same button/group address. How to do this? RE: Thermostat with auto disable function - RomansP - 24.10.2024 Hi You can simply enable/disable script using other event script. Here is example of boolean object, event script Code: value = event.getvalue() RE: Thermostat with auto disable function - eurosting - 27.10.2024 Got the script working perfect! Thanks a lot!!!! Some changes need to be done, so it will work properly. 1) when the script is switched off, the heating must also be switched off directly in event based script 2) provided script toggels the heater (switches on/off the heater) every 1 minute due to wrong hysteresis logic. So it tries to reach the temperature =set_temperature-hysterese. I changed the logic to following: Code: if current_temp < set_temperature - hysteresis and Best regards. |