Jump to content

only run then if device is on for x seconds


bilsk

Recommended Posts

Posted (edited)

all, i'm having not much luck with trying, and i am guessing i am not using the right search terms.

 

i'd like for the hidden door sensors to only beep if after 7 seconds the door is still open.

---------

if
       control sensor is on  <for 7 seconds>

then

        set buzzer relay on

        wait 1 second

        set buzzer relay off

else

        set buzzer off

 

i tried a few things but it isn't straight forward, i can;t use wait statements in [if] for example

anyone have an idea that works ?

Edited by bilsk
Posted

You'll need two programs and a spare device (you'll need to query the device because you can't query a battery powered device). Link the sensor as a controller of the spare device.

 

If

        Control 'sensor' is switched On

 

Then

        Wait 7 seconds

        Run 'program 2' (If)

 

Program 2

If

        Status 'spare device' is not off

 

Then

        set ...

 

Else

       set ...

Posted (edited)

This may provide a single Program approach

 

OpenDoor - [iD 002F][Parent 0001]
 
If
        Control '2C.71.C2.1 - Door Sensor' is switched On
     Or Control '2C.71.C2.1 - Door Sensor' is not switched Off
 
Then
        Set 'ApplianceLinc' On
        Wait  7 seconds
        Set 'ApplianceLinc' Off
 
Else
        Set 'ApplianceLinc' Off
 
 
Edited by LeeG
Posted

bilsk

 

Apologies for poor sample.  Seven second Wait replaced the 1 second Wait rather than being added where it should have been.

 

OpenDoor - [iD 002F][Parent 0001]
 
If
        Control '2C.71.C2.1 - Door Sensor' is switched On
     Or Control '2C.71.C2.1 - Door Sensor' is not switched Off
 
Then
        Wait  7 seconds
        Set 'ApplianceLinc' On
        Wait  1 second
        Set 'ApplianceLinc' Off
 
Else
        Set 'ApplianceLinc' Off
 
Thanks Larry for the heads up.
Guest
This topic is now closed to further replies.

×
×
  • Create New...