Need help stopping an active core piston


(Arn B) #1

When my door sensor opens while the alarm is Armed(home or away), I use Smarthome with a “basic” Core piston, setting a 30 second delay before opening a simulated sensor, triggering the alarm. However, when the system is disarmed, then rearmed during the thirty second delay, it triggers an alarm.

How can the piston be terminated (not running the open command) if the system was disarmed during the Wait (30) command?

I tried setting “Task cancellation policy” to cancel on condition or piston state change without success.

Core commands using simulated contact sensor that is monitored by Smarthome
–>close
–>wait (30)
–>open
–>wait(5)
–>close


(Ron Talley) #2

Try if using CoRE

If sensor changes to open
Then using simulated sensor
Wait 30 seconds
Open

But If sensor changes to close
Then using simulated sensor
Close

If using webCoRE then just use to If statements


(Arn B) #3

Thank you for the response, however I want to stop the Open commands from occurring when: either the alarm is disarmed or (the system was disarmed and was rearmed, or system is armed for less than 31 seconds). Can’t figure out what to test for prior condition.

So using a “Then If” Core Piston:
When System is Armed
if Front door changes to open
Using simulated sensor
Wait 30 seconds

When System is Disarmed
Then
Using Location
Exit

Then if (was disarmed then rearmed, or perhaps system is armed for less than 31 seconds) How can this be tested???
Using Location
Exit

Then
Using simullated contact sensor
Open


(Arn B) #4

Almost there, but…is there any way to save and test a date time variable in native format?
I use a keypad and the DTH keeps last status timestamp in lastUpdate that I can read in Core then store in a variable when the piston begins. Then if the status is not disarmed and the lastUpdate time does not match the value in the variable issue EXIT. The problem is when stroring the variable in CoRE I cannot get the native time, and the only viable storage type-string gives Mon Jul 24, 2017 @ 6:50 PM EDT. It is missing seconds!

Number or Decimal gives 0 or 0.0
not setting a type gives string
boolean is not useful for this variable

Update: Ignore this post I discovered the Keypad’s DTH is formatting the time into a string without the seconds.


(Arn B) #5

After a large dose of self flagellation, I solved this. However, rather than attempting to stop the piston I went with a followup piston. This provides for an entry delay using an Xfinity 3400-x keypad lock manager, and Smarthome. It properly handles a keypad disarm/rearm within the delay, although a phone app disarm/rearm will likely cause an alarm without some changes to the DTH.

It was also necessary to modify the 3400-x DTH to:

  1. include seconds on the lastUpdate time
  2. not update lastUpdate when an entryDelay is issued

For ease of reading this is a stripped down version.

Front Door Opens Piston type:Then If
Restriction: run only if alarm state is Armed/Away or Armed/Home
If Front Door Contact changes to open
==when true==
Using Xfinity Keypad
Save attribute “lastUpate” to (global) variable {@vara}
setEntryDelay(25)

Then
Follow up with “Front Door Opens Follow Up” in 25 seconds

Front Door Opens Follow Up Piston type: Follow-Up
Restriction: run only if alarm state is Armed/Away or Armed/Home
If Xfinity 3400-x lastUpdate is {@vara}
====When True====
Using Simulated Contact Sensor (monitored by Smarthome)
Close
Open
Wait 4 seconds
Close

Edit July 28, 2017 I tested opening the door then setting the disarm/rearm with the phone app within the entryDelay time and it worked as expected


[RELEASE] Lowes Iris and XFinity CentraLite keypad DTH + Apps