Jump to content

Programming with ELK


JSchumann

Recommended Posts

I want a program that monitors motion sensors in the house only when ELK is armed away and all the motion sensors are not triggered.  I do not understand all the ELK commands so this is what I currently have, but it doesn't seem to work:

Motion - Alert - [ID 0016][Parent 0001]

If
        Elk Area 'Home' 'Arm Up State' is Armed Fully
    And Elk Area 'Home' 'Armed State' is Armed Away
    And Elk Area 'Home' 'Arm Up State' is not Armed with Exit Timer
 
Then
        Wait  3 minutes  ( this ensures motion sensors are not 'on')
        Send Notification to 'Comcast Personal' content 'ISY-99 Alert' (just to see if we got this far)
        Enable Program 'Motion Den Activated'
        Enable Program 'Motion Hall Activated'
        Enable Program 'Motion LR Activated'
        Enable Program 'Motion Upstairs Activated'
 
Else
   - No Actions - (To add one, press 'Action')

 

Any help appreciated

Thanks,

John
 

 

Link to comment

Disclaimer: I don't have the ELK add on, so I could be wrong.

 

my guess is that you want OR for your If conditions:

 

If
        Elk Area 'Home' 'Arm Up State' is Armed Fully
    Or Elk Area 'Home' 'Armed State' is Armed Away
    Or Elk Area 'Home' 'Arm Up State' is not Armed with Exit Timer

When using AND it means all 3 conditions must be true, OR means at least one must be true.

Link to comment

Thanks Mr Bill. What I need to know is the exact meaning of 'armed fully' does it include not armed with exit timer, making my 3rd statement redundant?

When you are the ELK, there is a delay to allow you to exit and close all doors before it is fully armed.

So I think armed is when you start the exit

Fully armes is after exit delay is done

Armed away is the particular type of armed (away, stay, vacation)

So I am looking for the simplest way to ensure all 3 conditions are met before entering the motion sensor programs.

 

Thanks,

John

Link to comment

I found the answer in the wiki:

Program Examples

  • Trigger when the system is armed away AFTER the exit delay ends

The Elk system itself sends events Armed Away, Armed Fully, Armed with Exit Timer, and Armed Fully in that order. We are uncertain as to why ELK sends the first Armed Fully. The workaround is to put a 2 or 3 second wait at the start of your program e.g.

If
        Elk Area 'Apt 1102' 'Arm Up State' is Armed Fully
    And Elk Area 'Apt 1102' 'Armed State' is Armed Away

Then
        Wait  3 seconds
        Send Notification to 'Default'

Else
   - No Actions - (To add one, press 'Action')

Thanks,

John

Link to comment
23 hours ago, JSchumann said:

I found the answer in the wiki:

Program Examples

  • Trigger when the system is armed away AFTER the exit delay ends

The Elk system itself sends events Armed Away, Armed Fully, Armed with Exit Timer, and Armed Fully in that order. We are uncertain as to why ELK sends the first Armed Fully. The workaround is to put a 2 or 3 second wait at the start of your program e.g.


If
        Elk Area 'Apt 1102' 'Arm Up State' is Armed Fully
    And Elk Area 'Apt 1102' 'Armed State' is Armed Away

Then
        Wait  3 seconds
        Send Notification to 'Default'

Else
   - No Actions - (To add one, press 'Action')

Thanks,

John

Taking a second look at this program, I don't see how the 'wait 3 seconds' will sense the second activation of 'Armed Fully'.

What I think it needs is a program to sense 'Armed with exit timer' that will enable this program.  That way the first armed fully has gone by and when the exit time has expired (3 min on mine) the program will now sense the second activation of 'Armed Fully'.

 

Link to comment
3 hours ago, JSchumann said:

Taking a second look at this program, I don't see how the 'wait 3 seconds' will sense the second activation of 'Armed Fully'.

What I think it needs is a program to sense 'Armed with exit timer' that will enable this program.  That way the first armed fully has gone by and when the exit time has expired (3 min on mine) the program will now sense the second activation of 'Armed Fully'.

 

The program works as is. The Armed with Exit Timer interrupts the Wait statement and the program condition is reevaluated, which in turn causes the Else branch to run, i.e., the program ends. The second Armed Fully event triggers the program, and the Then branch executes. After 3 seconds, the notification is sent. 

Link to comment
4 hours ago, jfai said:

The program works as is. The Armed with Exit Timer interrupts the Wait statement and the program condition is reevaluated, which in turn causes the Else branch to run, i.e., the program ends. The second Armed Fully event triggers the program, and the Then branch executes. After 3 seconds, the notification is sent. 

jfai, OK I can see that.  But what programmer would recognize that and is it dependable?  I'm not used to getting in the 'then' statement then dropping out.....

Time for some comments in the program!

Also I would suggest adding that info to the wiki.

Regards,

John

Link to comment
27 minutes ago, JSchumann said:

jfai, OK I can see that.  But what programmer would recognize that and is it dependable?  I'm not used to getting in the 'then' statement then dropping out.....

Time for some comments in the program!

Also I would suggest adding that info to the wiki.

Regards,

John

The WAIT statement semantics are documented. The implementation is solid. If you want to program the ISY,  it's best to understand how ISY statements and programs work, otherwise the outcome may surprise you.

Wiki away to your heart's content...

Link to comment
On 6/28/2020 at 11:13 AM, JSchumann said:

Taking a second look at this program, I don't see how the 'wait 3 seconds' will sense the second activation of 'Armed Fully'.

What I think it needs is a program to sense 'Armed with exit timer' that will enable this program.  That way the first armed fully has gone by and when the exit time has expired (3 min on mine) the program will now sense the second activation of 'Armed Fully'.

 

@JSchumann If you sole purpose is to turn on your interior motion sensors AFTEr you have left the house and the Elk is fully armed, why not just simply put a wait of 2 minutes or so after any elk arming condition? IE:

If elk is armed away or armed vacation or armed..etct....then wait 2 minutes, activate interior sensors..

You could even make the timer 10 minutes, unless you think you will miss someone entering your house that soon after you leave? 

Link to comment
6 minutes ago, dbwarner5 said:

@JSchumann If you sole purpose is to turn on your interior motion sensors AFTEr you have left the house and the Elk is fully armed, why not just simply put a wait of 2 minutes or so after any elk arming condition? IE:

If elk is armed away or armed vacation or armed..etct....then wait 2 minutes, activate interior sensors..

You could even make the timer 10 minutes, unless you think you will miss someone entering your house that soon after you leave? 

dbwarner5 I tried that but it didn't work properly.  The example from the wiki does work.

Regards,

John

Link to comment

Haven’t spent many brain cells here, but are these sensors on the Elk or something else (eg insteon or z wave)? The way the program is written I suspect they’re not on the Elk. There’s an easy way to do this if they’re on the Elk.

Regardless I tend to agree with just making this linked to an armed condition rather than your 3 conditions. But if you want the 3 conditions the best way to get this going may be to start with 3 programs - 1 for each of your Elk conditions. The programs don’t have to do anything - in fact the quickest fix would be to monitor them in Admin Console to see which programs is true / false when. That said Maybe put a 1 minute wait in each one so you know if the condition remains true.

Without knowing what’s in the Then portion of your program (is that a problem too?). I’d start with the If to make sure they’re all triggering as you expect. Figure them out individually before putting 3 together?


Sent from my iPhone using Tapatalk

Link to comment
  • 8 months later...

So I am using the program and after running it for many months, it sends the notification about half the time.  Should I increase the delay to 4 seconds?  I have the ELK send the same message and I always get that one.


If        Elk Area 'Apt 1102' 'Arm Up State' is Armed Fully
    And Elk Area 'Apt 1102' 'Armed State' is Armed Away

Then
        Wait  3 seconds
        Send Notification to 'Default'

Else
   - No Actions - (To add one, press 'Action')

 

Link to comment
4 hours ago, JSchumann said:

So I am using the program and after running it for many months, it sends the notification about half the time.  Should I increase the delay to 4 seconds?  I have the ELK send the same message and I always get that one.


If        Elk Area 'Apt 1102' 'Arm Up State' is Armed Fully
    And Elk Area 'Apt 1102' 'Armed State' is Armed Away

Then
        Wait  3 seconds
        Send Notification to 'Default'

Else
   - No Actions - (To add one, press 'Action')

 

If Send Notification to 'Default' is timing out there should be an error in the error log.  But if that's the case you wouldn't change the delay here, you would want to change the SMTP timeout....  Configuration tab -> Emails/Notifications, try 2500 or 3000.   Changing 3 to 4 seconds in this program won't do anything that helps.

Link to comment
4 minutes ago, MrBill said:

If Send Notification to 'Default' is timing out there should be an error in the error log.  But if that's the case you wouldn't change the delay here, you would want to change the SMTP timeout....  Configuration tab -> Emails/Notifications, try 2500 or 3000.   Changing 3 to 4 seconds in this program won't do anything that helps.

Thanks Mr. Bill, will do.  Mine was set to 1000, so Last week I set it to 2000.  It helped, but still not getting all notifications.  Will bump it up some more.

Link to comment
42 minutes ago, JSchumann said:

Thanks Mr. Bill, will do.  Mine was set to 1000, so Last week I set it to 2000.  It helped, but still not getting all notifications.  Will bump it up some more.

Have you determined if all of the notifications are being sent and you are not receiving them, or the notifications are not being sent?

You can tell by looking at the last runtime for the program and by checking the log.

Link to comment
1 hour ago, JSchumann said:

The log only shows sensors/actions.  Nothing on notifications being sent or program actions.

First, when you think your notification was missed, go to the program and check the last run time for true or "then" portion of the program. If the run time indicates it ran true and you didn't receive the notification go to the error log and see if there was an error around that time. Look up the error code on the wiki page for ISY error messages.

If the program did not run true at that time, you have a problem with the program running.

Link to comment
20 hours ago, DennisC said:

First, when you think your notification was missed, go to the program and check the last run time for true or "then" portion of the program. If the run time indicates it ran true and you didn't receive the notification go to the error log and see if there was an error around that time. Look up the error code on the wiki page for ISY error messages.

If the program did not run true at that time, you have a problem with the program running.

So I did a couple tests,

- When the program evaluates true, the message comes

- When the message evaluates false, the message is not sent.

I need to determine why the program does not evaluate true every time.  The trigger is setting the ELK to Armed away.  I have a 3 min delay to allow me to get out.  The only variable I can think of is how long it take me to get out and the last door closes, but as long as I take less than 3 minutes, it shouldn't matter.

Stumped,

John

Link to comment
2 hours ago, JSchumann said:

So I did a couple tests,

- When the program evaluates true, the message comes

- When the message evaluates false, the message is not sent.

I need to determine why the program does not evaluate true every time.  The trigger is setting the ELK to Armed away.  I have a 3 min delay to allow me to get out.  The only variable I can think of is how long it take me to get out and the last door closes, but as long as I take less than 3 minutes, it shouldn't matter.

Stumped,

John

Do you have a copy of the Elk program Elk-RP?

If so, you can write a rule in the program to turn on a virtual output when the Elk is armed and turn off the virtual output when the Elk is disarmed. Then you can monitor the virtual output in a ISY program to receive your notification.

I think you will find this more reliable.

Link to comment
2 minutes ago, DennisC said:

Do you have a copy of the Elk program Elk-RP?

If so, you can write a rule in the program to turn on a virtual output when the Elk is armed and turn off the virtual output when the Elk is disarmed. Then you can monitor the virtual output in a ISY program to receive your notification.

I Think you will find this more reliable.

Dennis, Yes I do have ELK RP, I will give it a go!  Give mem a couple days and I will write back.

Regards,

John

Link to comment

Archived

This topic is now archived and is closed to further replies.


  • Recently Browsing

    • No registered users viewing this page.
  • Forum Statistics

    • Total Topics
      36.9k
    • Total Posts
      370.2k
×
×
  • Create New...