If the door is open more than 10 seconds... SOLVED!!

and the heating is on, then shout at the person letting the heat out ;D
i have gotten PLEG to do nearly do this but i can’t work out the 10 seconds bit…

can you help ?

t1nestisheating and (t1backdoor > 10)

t1backdoor is an RFXcom device which basically gives me a light switch in vera but is actually a Home Easy Magnetic Switch
t1nestisheating is the heating mode is set on the nest plugin

if i remove the timing >10 and use only t1nestisheating and t1backdoor as the condition it works but thats as soon as the door is open
i tried t1nestisheating and (t1backdoor;now>10) but still can’t work it out, it seems to fire twice after 30 seconds
t1nestisheating and t1backdoor and (t1backdoor;now > 10) didn’t work either

sorry for my ignorance am really struggling to understand the logic but am trying … :cry:

Triggers

Name Description
t1backdoor Whenever the RFX Light L2.0/001BCE8/10 is turned on
t1nestisheating nest is heating

Conditions

Name Repeat Expression
c1BackDoorOpen Yes t1nestisheating and t1backdoor and (t1backdoor;now > 10)

Actions

Actions for Condition: c1BackDoorOpen

Device Actions:

Immediate

Device Action Arguments
Sonos SetupTTS DefaultLanguage=en DefaultEngine=GOOGLE GoogleTTSServerURL=http://translate.google.co.uk OSXTTSServerURL=
Sonos Say Text=The heating is on, And the back, Door is Open Language=en Engine=GOOGLE Volume=50 SameVolumeForAll= GroupDevices= GroupZones=

NOW will cause the evaluation of the conditions once a minute.
It has a timestamp of that evaluation and a value of true;

Since it only evaluates once per minute it’s not really suited for resolution less than 1 minute.

For timers with more resolution you need to use a SCHEDULE.
Create a schedule called Timer with a Start time of self re-trigger and Off time of interval of 10 seconds.

Then have a condition:
EnableTimer t1nestisheating and t1backdoor
TimerFired EnableTimer and (EnableTimer; !Timer)

For the EnableTimer action … goto the advanced tab. Add the PLEG device, action is StartTimer, argument is Timer
For the TimerFired action do your notification.

thanks so much, that did it, i would never had figured that out.
it doesn’t seem to retrigger if the contact is left open after the initial 10 seconds, i have enabled repeats on the conditions and a random off delay of 5 seconds.

If you want it to repeat every 10 seconds … then add the StartTimer command to the TimerFired condition as well.

You can make the repeat interval longer by specifying the interval in the StartTimer command … this will override the OFF timer of the schedule.

i.e. set the Timer to 20 here and you will get a 10 seconds initial time and a 20 second repeat interval.

i thought i had it but now it triggers as soon as the door is opened (not after 10 seconds) and then triggers around 20 seonds later and never again…I was hoping it would continuously trigger until the door is shut or the heating goes off.

Triggers

Name Description
t1backdoorisopen Whenever Backdoor 1 is opened whether is armed or disarmed
t1nestisheating nest Thermostat is heating

Modes

Mode Name
Home h1Home
Away h1Away
Night h1Night

Schedules

Name On Type On Time On Days Random On Delay Off After Type Off Time Off Days Random Off Delay
s1checkdoor10secs Self ReTrigger None Interval 00:00:10 None

Conditions

Name Repeat Expression
c1EnableTimer No t1nestisheating and t1backdoorisopen
c1TimerFired Yes c1EnableTimer and (c1EnableTimer; !s1checkdoor10secs)

Actions

[b]Actions for Condition: c1EnableTimer

Device Actions:

Immediate[/b]

Device Action Arguments
Heat on, Door Open StartTimer timerName=s1checkdoor10secs intervalTime=20
Actions for Condition: c1TimerFired

[b]Device Actions:

Immediate[/b]

Device Action Arguments
Sonos SetupTTS DefaultLanguage=en DefaultEngine=GOOGLE GoogleTTSServerURL=http://translate.google.co.uk OSXTTSServerURL=
Sonos Say Text=The heating is on, And the back, Door is Open Language=en Engine=GOOGLE Volume=30 SameVolumeForAll= GroupDevices= GroupZones=
Notifications

Name Description Users Last Sent
Heat on, Door Open Heat on, Door Open has satisfied condition: c1TimerFired deejc 2015-03-16 19:59:52.107

The code looks right…please attach a PDF status report generated while the door is open and the heat is on.

see attached, below is the log…

Tue Mar 17 22:06:45.104 - Daemon:1 Tue Mar 17 22:06:57.528 - TriggerPropertyUpdate:Tripped Tue Mar 17 22:06:57.528 - TPU:Tripped :0=1 Tue Mar 17 22:06:57.529 - TriggerPropertyUpdate:Name:t1backdoorisopen State:false Device:199 Tue Mar 17 22:06:57.530 - EvalConditions:Multi Trigger:t1backdoorisopen Tue Mar 17 22:06:57.531 - EvalConditions:Condition:c1EnableTimer Trigger:t1backdoorisopen Result:false Tue Mar 17 22:06:57.534 - EvalConditions:Condition:c1TimerFired Trigger:t1backdoorisopen Result:false Tue Mar 17 22:06:57.535 - TriggerCondition:None Tue Mar 17 22:06:57.538 - SaveDB:{{name = 's1checkdoor10secs', state = false, seq = 1426629737.2176, oseq = 1426629757.1018},{name = 'c1EnableTimer', state = false, seq = 1426629737.1836, oseq = 1426630017.5329},{name = 'c1TimerFired', state = false, seq = 1426629757.1058, oseq = 1426630017.5349},{name = 't1backdoorisopen', state = false, seq = 1426629737.181, oseq = 1426630017.5295},{name = 't1nestisheating', state = true, seq = 1426629583.0838, oseq = 1426617717.078},{name = 'h1Home', state = true, seq = 1426621476.1045, oseq = 1426616676.1046},} Tue Mar 17 22:06:57.545 - SaveDB:Memory:305194 Tue Mar 17 22:06:57.693 - TriggerPropertyUpdate:Tripped Tue Mar 17 22:06:57.694 - TPU:Tripped :1=1 Tue Mar 17 22:06:57.695 - TriggerPropertyUpdate:Name:t1backdoorisopen State:true Device:199 Tue Mar 17 22:06:57.695 - EvalConditions:Multi Trigger:t1backdoorisopen Tue Mar 17 22:06:57.697 - EvalConditions:Condition:c1EnableTimer Trigger:t1backdoorisopen Result:true Tue Mar 17 22:06:57.697 - TriggerCondition:c1EnableTimer Tue Mar 17 22:06:57.709 - EvalConditions:Condition:c1TimerFired Trigger:t1backdoorisopen Result:false Tue Mar 17 22:06:57.711 - SaveDB:{{name = 's1checkdoor10secs', state = false, seq = 1426629737.2176, oseq = 1426629757.1018},{name = 'c1EnableTimer', state = true, seq = 1426630017.6971, oseq = 1426630017.5329},{name = 'c1TimerFired', state = false, seq = 1426629757.1058, oseq = 1426630017.7098},{name = 't1backdoorisopen', state = true, seq = 1426630017.695, oseq = 1426630017.5295},{name = 't1nestisheating', state = true, seq = 1426629583.0838, oseq = 1426617717.078},{name = 'h1Home', state = true, seq = 1426621476.1045, oseq = 1426616676.1046},} Tue Mar 17 22:06:57.741 - SaveDB:Memory:304704 Tue Mar 17 22:06:57.742 - RunNext:Condition:c1EnableTimer Index:1 Tue Mar 17 22:06:57.743 - SaveActionDB:{} Tue Mar 17 22:06:57.770 - EvalConditions:Condition:c1EnableTimer Trigger:s1checkdoor10secs Result:true Tue Mar 17 22:06:57.782 - EvalConditions:Condition:c1TimerFired Trigger:s1checkdoor10secs Result:false Tue Mar 17 22:06:57.783 - TriggerCondition:None Tue Mar 17 22:06:57.791 - StartTimer:Using interval: 20 Tue Mar 17 22:06:57.803 - ScheduleEventOff:s1checkdoor10secs:1,20, Result:0 Tue Mar 17 22:06:57.804 - SaveDB:{{name = 's1checkdoor10secs', state = true, seq = 1426630017.7499, oseq = 1426629757.1018},{name = 'c1EnableTimer', state = true, seq = 1426630017.6971, oseq = 1426630017.5329},{name = 'c1TimerFired', state = false, seq = 1426629757.1058, oseq = 1426630017.7825},{name = 't1backdoorisopen', state = true, seq = 1426630017.695, oseq = 1426630017.5295},{name = 't1nestisheating', state = true, seq = 1426629583.0838, oseq = 1426617717.078},{name = 'h1Home', state = true, seq = 1426621476.1045, oseq = 1426616676.1046},} Tue Mar 17 22:06:57.810 - SaveDB:Memory:303697 Tue Mar 17 22:06:57.851 - TriggerPropertyUpdate:Tripped Tue Mar 17 22:06:57.862 - TPU:Tripped :0=1 Tue Mar 17 22:06:57.863 - TriggerPropertyUpdate:Name:t1backdoorisopen State:false Device:199 Tue Mar 17 22:06:57.864 - EvalConditions:Multi Trigger:t1backdoorisopen Tue Mar 17 22:06:57.865 - EvalConditions:Condition:c1EnableTimer Trigger:t1backdoorisopen Result:false Tue Mar 17 22:06:57.867 - EvalConditions:Condition:c1TimerFired Trigger:t1backdoorisopen Result:false Tue Mar 17 22:06:57.869 - SaveDB:{{name = 's1checkdoor10secs', state = true, seq = 1426630017.7499, oseq = 1426629757.1018},{name = 'c1EnableTimer', state = false, seq = 1426630017.6971, oseq = 1426630017.8657},{name = 'c1TimerFired', state = false, seq = 1426629757.1058, oseq = 1426630017.8677},{name = 't1backdoorisopen', state = false, seq = 1426630017.695, oseq = 1426630017.8636},{name = 't1nestisheating', state = true, seq = 1426629583.0838, oseq = 1426617717.078},{name = 'h1Home', state = true, seq = 1426621476.1045, oseq = 1426616676.1046},} Tue Mar 17 22:06:57.885 - SaveDB:Memory:303859 Tue Mar 17 22:07:0.115 - Daemon:1 Tue Mar 17 22:07:8.383 - TriggerPropertyUpdate:Tripped Tue Mar 17 22:07:8.383 - TPU:Tripped :1=1 Tue Mar 17 22:07:8.384 - TriggerPropertyUpdate:Name:t1backdoorisopen State:true Device:199 Tue Mar 17 22:07:8.385 - EvalConditions:Multi Trigger:t1backdoorisopen Tue Mar 17 22:07:8.386 - EvalConditions:Condition:c1EnableTimer Trigger:t1backdoorisopen Result:true Tue Mar 17 22:07:8.387 - TriggerCondition:c1EnableTimer Tue Mar 17 22:07:8.396 - EvalConditions:Condition:c1TimerFired Trigger:t1backdoorisopen Result:false Tue Mar 17 22:07:8.397 - SaveDB:{{name = 's1checkdoor10secs', state = true, seq = 1426630017.7499, oseq = 1426629757.1018},{name = 'c1EnableTimer', state = true, seq = 1426630028.3866, oseq = 1426630017.8657},{name = 'c1TimerFired', state = false, seq = 1426629757.1058, oseq = 1426630028.3961},{name = 't1backdoorisopen', state = true, seq = 1426630028.3845, oseq = 1426630017.8636},{name = 't1nestisheating', state = true, seq = 1426629583.0838, oseq = 1426617717.078},{name = 'h1Home', state = true, seq = 1426621476.1045, oseq = 1426616676.1046},} Tue Mar 17 22:07:8.403 - SaveDB:Memory:304002 Tue Mar 17 22:07:8.414 - RunNext:Condition:c1EnableTimer Index:1 Tue Mar 17 22:07:8.415 - SaveActionDB:{} Tue Mar 17 22:07:8.423 - EvalConditions:Condition:c1EnableTimer Trigger:s1checkdoor10secs Result:true Tue Mar 17 22:07:8.425 - EvalConditions:Condition:c1TimerFired Trigger:s1checkdoor10secs Result:false Tue Mar 17 22:07:8.426 - TriggerCondition:None Tue Mar 17 22:07:8.428 - StartTimer:Using interval: 20 Tue Mar 17 22:07:8.429 - ScheduleEventOff:s1checkdoor10secs:1,20, Result:0 Tue Mar 17 22:07:8.431 - SaveDB:{{name = 's1checkdoor10secs', state = true, seq = 1426630028.422, oseq = 1426629757.1018},{name = 'c1EnableTimer', state = true, seq = 1426630028.3866, oseq = 1426630017.8657},{name = 'c1TimerFired', state = false, seq = 1426629757.1058, oseq = 1426630028.4257},{name = 't1backdoorisopen', state = true, seq = 1426630028.3845, oseq = 1426630017.8636},{name = 't1nestisheating', state = true, seq = 1426629583.0838, oseq = 1426617717.078},{name = 'h1Home', state = true, seq = 1426621476.1045, oseq = 1426616676.1046},} Tue Mar 17 22:07:8.437 - SaveDB:Memory:303984 Tue Mar 17 22:07:15.108 - Daemon:1 Tue Mar 17 22:07:17.101 - RunScheduleOff:Ignored:s1checkdoor10secs ScheduleCnt:1 Tue Mar 17 22:07:28.113 - RunScheduleOff:s1checkdoor10secs Tue Mar 17 22:07:28.114 - EvalConditions:Condition:c1EnableTimer Trigger:s1checkdoor10secs Result:true Tue Mar 17 22:07:28.116 - EvalConditions:Condition:c1TimerFired Trigger:s1checkdoor10secs Result:true Tue Mar 17 22:07:28.117 - TriggerCondition:c1TimerFired Tue Mar 17 22:07:28.124 - SaveDB:{{name = 's1checkdoor10secs', state = false, seq = 1426630028.422, oseq = 1426630048.1132},{name = 'c1EnableTimer', state = true, seq = 1426630028.3866, oseq = 1426630017.8657},{name = 'c1TimerFired', state = true, seq = 1426630048.1166, oseq = 1426630028.4257},{name = 't1backdoorisopen', state = true, seq = 1426630028.3845, oseq = 1426630017.8636},{name = 't1nestisheating', state = true, seq = 1426629583.0838, oseq = 1426617717.078},{name = 'h1Home', state = true, seq = 1426621476.1045, oseq = 1426616676.1046},} Tue Mar 17 22:07:28.130 - SaveDB:Memory:303921 Tue Mar 17 22:07:28.133 - RunNext:Condition:c1TimerFired Index:1 Tue Mar 17 22:07:28.134 - SaveActionDB:{} Tue Mar 17 22:07:30.116 - Daemon:1 Tue Mar 17 22:07:45.108 - Daemon:1

That was the “Report” command … need to see the “Status” command.

The Status command shows the value of all the inputs and conditions as well as timestamps … to help understand the sequence.

Also,
You will want to move:
h1Home and
to the c1EnableTimer condition.

You do not need “Repeats” set for either condition.

attached, it only fired once …

Thank’s that helped …
I see the issue … I was wrong … you do need to have “REPEAT” on for c1TimerFired for the repeated alerts to work.

Why … because the condition turns true when the first 10 seconds is expired.
But it recycles the timer, but that does NOT cause the expression to be evaluated as false.
When the timer expires again … it evaluates to true again (because the door is still open) … but without the “REPEAT” flag it does not fire the condition again.

its still not working, i don’t understand it.
it fires twice and not again.

Can you capture a Status report after the second alert … past the time when you expected the 3rd notification.

today its only triggering once…
status report attached, thanks for you time with this

See above:

If you want it to repeat every 10 seconds ... then add the StartTimer command to the TimerFired condition as well.

c1EnableTimer and (c1EnableTimer; !s1checkdoor10secs) I thought !s1checkdoor10secs is the StartTimer command ?

see attached, I have this … am I really missing the point ?

That is the condition that detects that the timer has completed …

The ACTION (using advanced mode) adding the PLEG as the Device, StartTimer as the action and s1checkdoor10secs as the timer name is what starts the timer!

i.e. the SAME action you added to c1EnableTimer

yes i know, thats what i do have, thats what i uploaded in the screen shot in my last post

Once again … read my statement clearly!!!

If you want it to repeat every 10 seconds ... then add the StartTimer command to the TimerFired condition as well.

you know what, i don’t get it, i read the words, i look at the PLEG, i see what i think is enabled is what you are talking about.
i don’t know what a startTimer command is unless its the one i created in Action,Immediate,Advance

Device Action
StartTimer

Arguments
timerName: s1checkdoor10secs
intervalTime: 10

it shouldn’t be this hard, this is a simple thing i am trying to do, vera is a piece of crud for programming anything other than a basic on./off at 9pm scene … should have gone with Fibaro…

You successfully added the StartTimer to the actions for the c1EnableTimer condition.

You must ALSO add it to the actions for the c1TimerFired condition … so that it restarts the timer for subsequent alerts.

You will not find anything like PLEG in the Fibaro product …