![]() |
|
Time delay command: suggestion - Printable Version +- LogicMachine 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: Time delay command: suggestion (/showthread.php?tid=6420) |
Time delay command: suggestion - Domoticatorino - 13.05.2026 Hi, I am preparing a logic to manage an heating system. Considering that I have to set TOF or TON (set to ON or OFF a grp address only if the condition is valid for more than 5 or 10 minutes). Using "os.delay" for minutes is not suggested as you know. Which is the best approach to manage it? Thanks. BR RE: Time delay command: suggestion - admin - 13.05.2026 You can use os.sleep together with an event script that use "Last instance only" execution mode. But this will only work if the condition is not repeated because that will restart the script. Alternatively this solution can be adapted to your needs: https://kb.logicmachine.net/scripting/on-off-delay-timer/ RE: Time delay command: suggestion - Domoticatorino - 13.05.2026 (5 hours ago)admin Wrote: You can use os.sleep together with an event script that use "Last instance only" execution mode. But this will only work if the condition is not repeated because that will restart the script. Thank you Admin. I think that the example is the best way. Only a confirmation: group address 1/1/1 and 1/1/3 in the example are 1 bit group address? Thanks. BR. RE: Time delay command: suggestion - admin - 13.05.2026 Yes, the example script adds an optional on/off delay between 1-bit input and output. |