How to remove a delayed part of a scene

Scenes can trigger actions immediately and then trigger actions after a delay. Lets say that a light is turned on and then set to turn off 1 hour later.

Is it possible to remove the delayed part of the scene after the first immediate part has been triggered?

Hi Elo

By ‘remove’ you probably mean ‘cancel’.
I had similar questions any by reading through tons of posts in this forum it is my understanding that once a scene is ‘on its way’ it cannot be halted (short of rebooting the Vera).
I have the situation where I lock my entrance door 30 seconds after it’s been closed. This in itself is easy to achieve with the ‘delay’ mechanism in scenes. However, when the door is re-opened within this delay I want of course to ‘cancel’ the scene, so that the door will not be locked while the door is open (extend the bolt).
Using scenes alone this cannot be accomplished.
I am using CountdownTimers and VirtualSwitches to sort of ‘cancel’ the closing delay. Here the scene that effectively locks the door is only started once the timer has expired.

So to make a long story short; no, scenes cannot be aborted. You have to make amends for all your eventualities before the scene is fired.

MJ

The only way to stop it is to reload Vera.

I had a similar situation and I used PLEG to solve my problem. Instead of using the delayed mechanism to turn the light off, you may consider letting PLEG decide whether or not to turn off the light. Lets say you have something like this:

Person switches a light on. It stays on for 1 hour then turns off… unless there is movement on a motion detector during that hour. In which case, wait another hour.

I’m still new to PLEG, so I doubt this will be 100% correct the first time. But you’ll want inputs in PLEG for the light switch on (we’ll call it LightSwitchOn) and the motion detector not tripped (we’ll call it NoMotionDetected). Then you’ll need a condition that looks like:

LightSwitchOn; NoMotionDetected; NOW > 60:00

It has to fulfill the conditions from left to right… so first the light has to be on, then there has to be no motion, then 60 minutes must pass before those conditions change. Now make an action based on that condition. Immediate: switch off the light.

I cannot believe that @RichardTSchaefer posted in the thread and didn’t mention the Programmable Logic Event Generator(PLEG) plugin.

right!

Please no sarcasm guys! I have been a HS user for years and this VERA forum is much more helpful and has a more friendly tone and by far is free of arrogance (or perhaps I have a language problem ;D). I am happy for all the answers I get.

Thank you all for answering as I am still new to VERA. In its basic form VERA DOES NOT offer the same decision tools as HS. This is however solved by PLEG which actually makes VERA more advanced than HS in this sense.

The answers are however a little disappointing and the example with the lock clearly shows the point I try to raise. In several cases it is not possible to pre-define a acceptable solution as the only solution is to cancel the delayed action. I will look into using PLEG actively to control the delayed action. The backside of this is that even simple issues gets complicated to set up but as long as it offers a solution its ok.

Again thank you for pointing at the possibilities.

In PLEG you would break this into two conditions.
Each with it’s own actions.
I will use an alarm example with an entry door to trigger … but with a delay to set the siren.
In this case I conditionally want to sound the alarm, I will cancel the alarm if the virtual switch is no longer Armed

Inputs:
Armed - A virtual Swith to indicate the System is armed.
Window1 - Window Sensor
Window2 - WIndow Sensor
DoorDelay1 - Door Sensor - Use for Entry/Exit
DoorNoDelay2 - Door Sensor - Immediate Alarm

Timer:
EntryDelay SelftStart 3 Minutes Interval Off

Conditions:
ImmediateAlarm Armed and (Window1 or Window2 or DoorNoDelay2)
DelayedAlarm (Armed;DoorNoDelay > 5:00) and Armeded and DoorNoDelay1
TiggerAlarm ImmediateAlarm or (Armed and (DelayedAlarm; !EntryDelay))

Actions:
DelayedAlarm Start EntryDelay Timer

TriggerAlarm Sound the Alarm

NOTE: The sequence Expression in this example uses a new feature in Version 5.6 (In Audit) the !EntryDelay in the sequence expression.
The 5:00 in the first sequence expression … lets you get out of the house before the alarm will be engaged for that door.
The 3.0 in the timer is the amount of time you have to disarm the alarm.

Sorry to dig up an old topic, but the example Richard brought up is exactly what i am looking for.
Would it be possible for you to elaborate a bit more on the timer and sequence expression Richard?

I tried to recreate your example but for some reason:

  • i’m not able to make the delayed alarm condition work
  • When Away = true my siren goes of shortly

please help

Thanks in advance

There is a bug in PLEG.

The following will work:
TiggerAlarm ImmediateAlarm or (Armed and (DelayedAlarm; EntryDelay; !EntryDelay))

The original will work with my patch, or in Version 6.7 when I release it.

Hi Richard, your help has been awesome so far, but i’m afraid i need it one more time :slight_smile:

Everything seems to function fine now, including entry and exit delays. But whenever i active Away state (arm alarm) my alarm sound for a second (instead of siren i now have send alert WOOP WOOP configured for testing purposes.
What am i doing wrong???

Thanks again

Triggers

Name Description State Last True Last False
T1_MS_Away MultiSwitch - Alarm Switch 1 is turned on true 2014-04-09 23:38:25.597 2014-04-09 23:38:21.248
T2_MS_Home MultiSwitch - Alarm Switch 2 is turned on false 2014-04-09 23:38:21.209 2014-04-09 23:38:25.657
T3_MS_Sleep MultiSwitch - Alarm Switch 3 is turned on false 2014-04-09 23:07:51.674 2014-04-09 23:09:51.559
T4_MS_Vacation MultiSwitch - Alarm Switch 4 is turned on false 2014-04-09 13:14:18.306 2014-04-09 13:14:27.559
T5_002_Motion1 002_Motion1 armed is tripped false 2014-04-09 22:54:04.943 2014-04-09 22:54:50.263
T6_002_Motion2 002_Motion2 armed is tripped false 2014-04-09 21:24:05.593 2014-04-09 23:38:25.717
T7_FrontDoor FrontDoor armed is tripped false 2014-04-09 23:30:57.241 2014-04-09 23:38:25.749
T8_004_Motion 004_Motion armed is tripped false 2014-04-09 21:20:41.993 2014-04-09 23:38:25.777

Schedules

Name On Type On Time On Days Random On Delay Off After Type Off Time Off Days Random Off Delay State Last On Last Off
EntryDelay Self Trigger None Interval 00:00:15 None false 2014-04-09 23:30:57.286 2014-04-09 23:31:12.000

Conditions

Name Repeat Expression State Last True Last False
Arm No T1_MS_Away AND (!T2_MS_Home AND !T3_MS_Sleep AND !T4_MS_Vacation) true 2014-04-09 23:38:25.671 2014-04-09 23:38:21.222
Disarm No T2_MS_Home AND (!T1_MS_Away AND !T3_MS_Sleep AND !T4_MS_Vacation) false 2014-04-09 23:38:21.255 2014-04-09 23:38:25.614
Sleep No T3_MS_Sleep AND (!T1_MS_Away AND !T2_MS_Home AND !T4_MS_Vacation) false 2014-04-09 23:07:51.716 2014-04-09 23:09:51.505
Vacation No T4_MS_Vacation AND (!T1_MS_Away AND !T2_MS_Home AND !T3_MS_Sleep) false 2014-04-09 13:14:18.338 2014-04-09 13:14:27.554
Immediate_Alarm No (T1_MS_Away OR T3_MS_Sleep OR T4_MS_Vacation) AND (T5_002_Motion1 OR T6_002_Motion2) false 2014-04-09 23:07:51.689 2014-04-09 23:09:51.597
Delayed_Alarm No (T1_MS_Away; T7_FrontDoor > 1:00) and T1_MS_Away and T7_FrontDoor false 2014-04-09 23:30:57.266 2014-04-09 23:31:17.896
Trigger_Alarm No Immediate_Alarm or (T1_MS_Away AND (Delayed_Alarm; !EntryDelay)) true 2014-04-09 23:38:25.638 2014-04-09 23:38:21.271

Actions

Actions for Condition: Arm

Immediate

Device Action Arguments
VeraAlerts SendAlert Message=ALARM ARMED Recipients=roel.snoek
002_Motion1 SetArmed newArmedValue=1
002_Motion2 SetArmed newArmedValue=1
FrontDoor SetArmed newArmedValue=1
004_Motion SetArmed newArmedValue=1
Actions for Condition: Delayed_Alarm

Immediate

Device Action Arguments
PLEG ALARM StartTimer timerName=EntryDelay intervalTime=
VeraAlerts SendAlert Message=Deur geopend met ARMED ALARM!! Recipients=roel.snoek
Actions for Condition: Disarm

Immediate

Device Action Arguments
002_Motion2 SetArmed newArmedValue=0
002_Motion1 SetArmed newArmedValue=0
FrontDoor SetArmed newArmedValue=0
004_Motion SetArmed newArmedValue=0
VeraAlerts SendAlert Message=ALARM DISARMED Recipients=roel.snoek
Actions for Condition: Sleep

Immediate

Device Action Arguments
002_Motion1 SetArmed newArmedValue=1
002_Motion2 SetArmed newArmedValue=1
FrontDoor SetArmed newArmedValue=1
004_Motion SetArmed newArmedValue=0
VeraAlerts SendAlert Message=ALARM ARMED SLEEP Recipients=roel.snoek
Actions for Condition: Trigger_Alarm

Immediate

Device Action Arguments
VeraAlerts SendAlert Message=WOOP WOOP WOOP Recipients=roel.snoek
Actions for Condition: Vacation

Immediate

Device Action Arguments
002_Motion1 SetArmed newArmedValue=1
002_Motion2 SetArmed newArmedValue=1
FrontDoor SetArmed newArmedValue=1
004_Motion SetArmed newArmedValue=1
VeraAlerts SendAlert Message=ALARM ARMED VACATION Recipients=roel.snoek

I think you need:

Trigger_Alarm Immediate_Alarm or (T1_MS_Away AND DelayedAlarm AND (Delayed_Alarm; !EntryDelay))

Wooohooo that did it!

[quote=“RichardTSchaefer, post:8, topic:178991”]In PLEG you would break this into two conditions.
Each with it’s own actions.
I will use an alarm example with an entry door to trigger … but with a delay to set the siren.
In this case I conditionally want to sound the alarm, I will cancel the alarm if the virtual switch is no longer Armed

Inputs:
Armed - A virtual Swith to indicate the System is armed.
Window1 - Window Sensor
Window2 - WIndow Sensor
DoorDelay1 - Door Sensor - Use for Entry/Exit
DoorNoDelay2 - Door Sensor - Immediate Alarm

Timer:
EntryDelay SelftStart 3 Minutes Interval Off

Conditions:
ImmediateAlarm Armed and (Window1 or Window2 or DoorNoDelay2)
DelayedAlarm (Armed;DoorNoDelay > 5:00) and Armeded and DoorNoDelay1
TiggerAlarm ImmediateAlarm or (Armed and (DelayedAlarm; !EntryDelay))

Actions:
DelayedAlarm Start EntryDelay Timer

TriggerAlarm Sound the Alarm

NOTE: The sequence Expression in this example uses a new feature in Version 5.6 (In Audit) the !EntryDelay in the sequence expression.
The 5:00 in the first sequence expression … lets you get out of the house before the alarm will be engaged for that door.
The 3.0 in the timer is the amount of time you have to disarm the alarm.[/quote]

Hi

I am trying to follow the above to setup a “simple” alarm system with two doors and an entry delay on the front door.

You have the following door inputs:

DoorDelay1 - Door Sensor - Use for Entry/Exit
DoorNoDelay2 - Door Sensor - Immediate Alarm

This line is not making sense to me:

DelayedAlarm (Armed;DoorNoDelay > 5:00) and Armeded and DoorNoDelay1

Should it have been like this ?

DelayedAlarm (Armed;DoorDelay1 > 5:00) and Armed and DoorNoDelay2

Thanks