Need help stopping an active core piston

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