Page 1 of 1

Pause execution of dzVents script

Posted: Wednesday 04 April 2018 16:18
by hve22
Is there a way to pause the execution of a dzVents script??

What i'm attempting to accomplish in ONE dzVents script is:

If 'doorcontact' triggered -> check after 3 minutes the state of another switch -> if 'ON' = do nothing, if 'OFF' = DO SOMETHING

Is this possible??

Re: Pause execution of dzVents script

Posted: Wednesday 04 April 2018 16:23
by dannybloe
You can create a dummy switch and when the door contact is triggered you do domoticz.devices('myDummy').toggleSwitch().afterMin(3). Create a on=.. trigger for this dummy switch and there you can check for this special switch you mentioned.

Re: Pause execution of dzVents script

Posted: Wednesday 04 April 2018 18:08
by Egregius
Simple in pass2php :lol:

Code: Select all

<?php
sleep(180);
if(apcu_fetch('another_switch')=='Off')dosomething...
?>