Pause execution of dzVents script

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
hve22
Posts: 7
Joined: Wednesday 11 October 2017 23:16
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Pause execution of dzVents script

Post 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??
dannybloe
Posts: 1355
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Ermelo
Contact:

Re: Pause execution of dzVents script

Post 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.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
User avatar
Egregius
Posts: 2582
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Pause execution of dzVents script

Post by Egregius »

Simple in pass2php :lol:

Code: Select all

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

Who is online

Users browsing this forum: No registered users and 0 guests