Programming Help-sensor/Countdown Timer/Siren

Would someone be so kind as to direct me to the links or help me get started programming this fairly simple task.

I have a siren going off upon the door opening (this much I have set up).

I would like to incorporate the countdown timer to have the siren go off in a predetermined amount of time then go on again if door is not closed.

Thanks in advance.

Have a look at the Pleg plugin.

You could setup a pleg timer to start when the door opens run the siren, stop then use the second timer to start the alarm again. With each timer cancelled by the door closing.

More details can be found here Program Logic Timer Switch - Vera Plugin

This is the closest scenario to what you describe. Really the only difference is that you’d set the “Cancel” action to be triggered by the door closing instead of the user pressing a button on the Minimote.

But try PLEG first. These kinds of tasks are its bread-and-butter.

This helps greatly!!!

Still quite confused after researching and creating PLTS…do i create a scene in Vera and and set it to the PLTS???

Please remember I have just started programming and am very new.

My goal is a front door sensor tripped enables the siren until door is closed…
Thanks again in advance…

I can help but I need some more details.

  1. Door Opens — Siren Goes Off.
  2. Starts Timer —
    At End of Timer:
    If Door is still Open then Restart Timer
    If Door is closed … Turn off Siren

Is there any other way to turn off the siren except for the timer to expire and the door closed ?
How long is the timer.

Thank you so much…2 scenarios day and night

Night
Any of my three doors are opened (sensor triggered)
Delay of 15 seconds to bypass??diarm??
Siren goes off predetermined amount of time

Day
Any of three doors are opened (sensor triggeres)
Immediate (or slight delay) until door closed (slight delay=giving user time to close door

I hope this enough info…

I would do this with PLEG (Program Logic Event Generator)
You also need the PLC (Program Logic Core … this is software common to PLTS and PLEG)
I would also install the Day our Night Plugin.
This allows you to decide when Day/Night time happen relative to sunrise/sunset respectively. I typically use day as 30 minutes before sunrise to 30 minutes after sunset.
Make sure you have setup your timezone and location properly (Needed in order to determine when sunrise/sunset is at your location).

Next in PLEGs:
Add some Input Triggers:
Night When Day or Night device indicates Night
Door1 When Door Sensor #1 is tripped
Door2 When Door Sensor #2 is tripped

DoorN When Door N is tripped.
AlarmIsOn When the Alarm is On
Add an Input Schedule:
EntryDelay SelfTrigger off after interval of 15 (Seconds)

Conditions:
Day Not Night
EntryExpired NotEntryDelay
SensorTrip Door1 or Door2 … or DoorN
AlarmOn SensorTrip and (SensorTrip;EntryExpired)
DayAlarmOff AlarmIsOn and Day and (not SensorTrip)
NightAlarmOff AlarmIsOn and Night and (not SensorTrip) and (AlarmIsOn; Now > 15:00)

Actions:
SensorTrip Have the PLEG Start Timer EntryDelay (Need to Used Advanced Tab)
AlarmOn Turn On Alarm
DayMute Turn Off Alarm
NightMute Turn Off Alarm

The 15:00 in the NightAlarmOff condition is for the ontime of the alarm. This is 15 minutes.

Wow…thats crazy…

How does one even begin to understand all that??

It appears I made an error as seen in attachment??

This is not a simple example. There are two different time delays … one for delaying before the Siren goes on … and one at night for when the siren should go off.

The tricky parts are the SelfTrigger timer and the Sequence expressions.

Generate a Status report … This will be useful to see what you typed exactly.

Looks like you did not create the AlarmIsOn input trigger.

Note: You may want to change the Door Triggers to Armed Door is triggered.
Then you can ByPass a door if you do not want it to participate in this Logic.

Note2: You also have to ARM the PLEG for it to run any actions.

Here is the requested status report.
Thanks again for your time to this matter. I hope I can repay you in some way, some day!!

You called the Input Siren but you use the name AlarmIsOn in the conditions.
You need to be consistent … Change the Input Name or Change the Name in the condition so they match!

Similarly I used the name EntryDelay for the name of the Schedule … and the
condition was NOT EntryDelay.

If you do not use the same names as me … you need to fix all of the references in the conditions.

Also your Schedule is NOT setup properly … It should have a type of SelfTrigger
There should not be a Random On Delay!
It’s OFF Type should be Interval with a time of 30 and NO Random Off Delay.

I am pretty sure I made all of your corrections and same error??

Here is revised Status report…uuugh

The name of the input is Alarm the name in the condition is AlarmIsOn

They need to be the same!!!

Also the expression for the condition Day is Not Day. You have NotDay.

The expression for condition EntryExpired is Not EntryDelay. You have NoyEntryDelay.

You need to read the documentation. This is the simple part!

Got it with no errors. Thank you so much again…I will test tonight and let you know.

As I experiment with PLTS and PLEG, I have some general questions…

  1. Does PLTS run independently of Vera scenes or do you point a scene in Vera to the programmed PLTS device.
  2. Can you demonstrate the programming a simple open Door light comes on for 1 minute then goes off for me in PLTS as an example.

Thanks in advance

@ Richard

Upon further research I created this simple motion detect light on and it seems to be functioning. I am still confused on where in the sequence is the amount of time the light stays on.

Also, I am still unclear if/where Vera scenes are corresponding to the PLEG programming in general?

I have attached my status report.

Thanks.