Jump to content
View in the app

A better way to browse. Learn more.

Universal Devices Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Timing of events between lock and security system

Featured Replies

@Goose66 , this node server is great. I've been using open action of Schlage lock to disarm my security system for a few months and with Force Update, its great! There is a "flaw" in my programming that I recognized with my scheme, so I always make sure the last message is locked by handle on the door. Without describing it completely, with scheme I'm using if last message was a disarm with code. and I forgot to actually lock the door then just opening the door would result in a security disarm. Now that Apple Key is working, I want to expand auto disarm to four other locks but not with the flaw that requires me to confirm contents of last message each time security is armed at all locks

Methods I've considered:

1) Get last message time and confirm it was in the last say 10-15 seconds. Issue is I can't locate how to manipulate current time into epoch time with eISY program (also couldn't find a node server that does it) to do the math. On one of Jimbo Automates node servers, he added seconds since last update element so someone could monitor the device had not changed. Would that we possible with this node server? It feels this would be the best option. to control and feel good about not hosing security. EDIT - I just located how to set variable to current epoch time so evaluating how that might help.

2) Another possibility would be if there was a way for me to request node server to clear the last message and user code fields at the time security is armed. Flaw here would appear to be would the fields get set again at time I did Force Update.

3) Finally, at the time the security system is armed, store and persist the current value of Last Update epoch time in a variable and then when using mostly my current scheme add to the If to say current last update time is not same as the value stored in the variables. Easy enough it appears, does it sound reasonable to prevent what I described as the flaw. What do you think? Example programs using this method:

Security:Store Last Update Times for Locks at Armed

If

$Security_Armed is 1

Then

$Security_Armed_Garage_Deadbolt_Last_Message_Time_I = 'Garage / Garage Door' Last Message Time Unix Timestamp

$Security_Armed_Garage_Deadbolt_Last_Message_Time_I Init To 'Garage / Garage Door' Last Message Time Unix Timestamp

Garage:Deadbolt Entry Delay Disarm With Schlage Code

'Security System / Security System:Partition' Partition State is Entry Delay

And 'Security System / Zone:Garage Door' Zone State is Open

Then

Wait 1 second

Set 'Garage / Garage Door' Force Update

Action of Short poll (10 seconds) or the Force Update from above triggers following programs

Garage:Deadbolt Unlocked By Paul

If

'Garage / Garage Door' Last Access Code Used is '$Security_Code_Paul_I User Number'

And 'Garage / Garage Door' Last Message Time is not '$Security_Armed_Garage_Deadbolt_Last_Message_Time_I Unix Timestamp'

Then

Set 'Security System / Security System:Partition' Disarm (it uses the user code to disarm but that doesn't show in the program copy to clipboard)

Garage:Deadbolt Unlocked By Wife

If

'Garage / Garage Door' Last Access Code Used is '$Security_Code_Wife_I User Number'

And 'Garage / Garage Door' Last Message Time is not '$Security_Armed_Garage_Deadbolt_Last_Message_Time_I Unix Timestamp'

Then

Set 'Security System / Security System:Partition' Disarm (it uses the user code to disarm but that doesn't show in the program copy to clipboard)

Edited by hart2hart

  • Author

...a bit more, the fields for the deadbolt from node server appear to only support Status and not Control so this means if field happens to have same value as last time, it will not trigger -- correct? If that is the case, should I put in an additional If like IF the epoch date is > 0 to ensure it always triggers program when it changes? Can the field be defined so it triggers with Control or Status? It feels like the IF section for comparing Old stored and current event epoch times may always force a trigger as the new date changed.

Edited by hart2hart

  • Author

Still researching and testing. There are three messages in last message list without a description. They are:

o Unknown

o Unknown (both unknowns show at the top of the drop-down list)

o 31

Also, there is a message type called "History Cleared" in the drop-down list. Does that imply the node server could have a command that would clear all history. If so, I could run that command when security is armed to make it simpler as I suggested in option 2 of original post.

Edited by hart2hart

  • Author

I'm getting odd results but when trying to debug I realized the fields like last message, access code, and last time are not flowing into the general eISY logging system.

The following programs trigger based on the last way the deadbolt was unlocked without the code from above that does a Force Update even running. I could see that last message is "Locked by Schlage Button" so I'm lost.

Garage:Deadbolt Unlocked By Apple Key - [ID 01F6][Parent 0124]

If

$Security_Allow_Schlage_To_Disarm_I is 1

And 'Garage / Garage Door' Last Message is Unlocked by Apple key

And 'Garage / Garage Door' Last Message Time is not '$Security_Armed_Garage_Deadbolt_Last_Message_Time_I Unix Timestamp'

And 'Garage / Garage Door' Last Message Time > 0.0 Unix Timestamp

Then

Set 'Security System / Security System:Partition' Disarm

Send Notification to 'JPaulText' content 'Security Disarmed Via Schlage Message'

Else

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

Garage:Deadbolt Unlocked By Paul - [ID 0125][Parent 0124]

If

$Security_Allow_Schlage_To_Disarm_I is 1

And 'Garage / Garage Door' Last Message is Unlocked by keypad

And 'Garage / Garage Door' Last Access Code Used is '$Security_Code_Paul_I User Number'

And 'Garage / Garage Door' Last Message Time is not '$Security_Armed_Garage_Deadbolt_Last_Message_Time_I Unix Timestamp'

And 'Garage / Garage Door' Last Message Time > 0.0 Unix Timestamp

Then

Set 'Security System / Security System:Partition' Disarm

Send Notification to 'JPaulText' content 'Security Disarmed Via Schlage Message'

Else

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

Edited by hart2hart

Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.