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??
Pause execution of dzVents script
Moderator: leecollings
-
- 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
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.
- 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
Simple in pass2php
Code: Select all
<?php
sleep(180);
if(apcu_fetch('another_switch')=='Off')dosomething...
?>
Who is online
Users browsing this forum: No registered users and 0 guests