Time Restriction not Working


#1

I have, what I thought would be a simple Piston, but for some reason, the time restriction is not working in this Piston. I want to toggle my HVAC Virtual Switch on an off during 10am and 10pm to force it to only cycle on and off during a 45 minute window then shut the system down for 30 minutes.

The issue is, the Piston keeps going even after 10pm.

+2ms ╔Received event [HVAC].switch = on with a delay of 512ms
+453ms ║Runtime (38312 bytes) successfully initialized in 135ms (v0.2.0e5.20170812) (449ms)
+455ms ║╔Execution stage started
+501ms ║║Piston execution aborted due to restrictions in effect
+644ms ║╚Execution stage complete. (189ms)
+649ms ║Setting up scheduled job for Sun, Aug 27 2017 @ 11:34:32 PM EDT (in 2699.88s), with 1 more job pending
+683ms ╚Event processed successfully (683ms)
8/27/2017, 10:49:31 PM +564ms
+1ms ╔Received event [Home].time = 1503888571525 with a delay of 38ms
+212ms ║Runtime (38319 bytes) successfully initialized in 78ms (v0.2.0e5.20170812) (210ms)
+213ms ║╔Execution stage started
+642ms ║║Executed [HVAC].on (391ms)
+685ms ║╚Execution stage complete. (472ms)
+688ms ║Setting up scheduled job for Mon, Aug 28 2017 @ 9:59:00 PM EDT (in 83367.749s)
+703ms ╚Event processed successfully (703ms)
8/27/2017, 10:19:31 PM +612ms
+2ms ╔Received event [HVAC].switch = off with a delay of 456ms
+645ms ║Piston waited at a semaphore for 312ms
+648ms ║Runtime (38376 bytes) successfully initialized in 389ms (v0.2.0e5.20170812) (646ms)
+650ms ║╔Execution stage started
+692ms ║║Piston execution aborted due to restrictions in effect
+777ms ║╚Execution stage complete. (127ms)
+780ms ║Setting up scheduled job for Sun, Aug 27 2017 @ 10:49:31 PM EDT (in 1799.134s), with 1 more job pending
+808ms ╚Event processed successfully (807ms)
8/27/2017, 10:19:30 PM +567ms
+1ms ╔Received event [Home].time = 1503886771690 with a delay of -1124ms
+271ms ║Runtime (38320 bytes) successfully initialized in 80ms (v0.2.0e5.20170812) (269ms)
+273ms ║╔Execution stage started
+457ms ║║Executed virtual command [HVAC].sendNotificationToContacts (135ms)
+929ms ║║Executed [HVAC].off (470ms)
+992ms ║╚Execution stage complete. (719ms)
+995ms ║Setting up scheduled job for Sun, Aug 27 2017 @ 10:49:31 PM EDT (in 1799.964s), with 1 more job pending
+1042ms ╚Event processed successfully (1042ms)
8/27/2017, 9:58:59 PM +255ms
+1ms ╔Received event [Home].time = 1503885540000 with a delay of -745ms
+328ms ║Runtime (38320 bytes) successfully initialized in 110ms (v0.2.0e5.20170812) (325ms)
+329ms ║╔Execution stage started
+452ms ║╚Execution stage complete. (123ms)
+455ms ║Setting up scheduled job for Sun, Aug 27 2017 @ 10:19:31 PM EDT (in 1231.981s), with 1 more job pending
+476ms ╚Event processed successfully (476ms)
8/27/2017, 9:34:30 PM +860ms
+2ms ╔Received event [HVAC].switch = on with a delay of 720ms
+750ms ║Runtime (38310 bytes) successfully initialized in 186ms (v0.2.0e5.20170812) (746ms)
+752ms ║╔Execution stage started
+881ms ║╚Execution stage complete. (129ms)
+884ms ║Setting up scheduled job for Sun, Aug 27 2017 @ 9:59:00 PM EDT (in 1468.257s), with 1 more job pending
+905ms ╚Event processed successfully (904ms)
8/27/2017, 9:34:29 PM +659ms
+1ms ╔Received event [Home].time = 1503884069298 with a delay of 359ms
+274ms ║Runtime (38319 bytes) successfully initialized in 110ms (v0.2.0e5.20170812) (271ms)
+275ms ║╔Execution stage started
+878ms ║║Executed [HVAC].on (562ms)
+906ms ║╚Execution stage complete. (632ms)
+909ms ║Setting up scheduled job for Sun, Aug 27 2017 @ 9:59:00 PM EDT (in 1469.434s)
+929ms ╚Event processed successfully (929ms)
8/27/2017, 9:04:29 PM +390ms
+1ms ╔Received event [HVAC].switch = off with a delay of 369ms
+711ms ║Piston waited at a semaphore for 308ms
+714ms ║Runtime (38375 bytes) successfully initialized in 394ms (v0.2.0e5.20170812) (712ms)
+716ms ║╔Execution stage started
+831ms ║╚Execution stage complete. (115ms)
+834ms ║Setting up scheduled job for Sun, Aug 27 2017 @ 9:34:29 PM EDT (in 1799.076s), with 1 more job pending
+854ms ╚Event processed successfully (854ms)
8/27/2017, 9:04:28 PM +571ms
+1ms ╔Received event [Home].time = 1503882269353 with a delay of -782ms
+278ms ║Runtime (38319 bytes) successfully initialized in 74ms (v0.2.0e5.20170812) (275ms)
+280ms ║╔Execution stage started
+344ms ║║Executed virtual command [HVAC].sendNotificationToContacts (15ms)
+694ms ║║Executed [HVAC].off (347ms)
+759ms ║╚Execution stage complete. (479ms)
+763ms ║Setting up scheduled job for Sun, Aug 27 2017 @ 9:34:29 PM EDT (in 1799.966s), with 1 more job pending
+783ms ╚Event processed successfully (783ms)
8/27/2017, 8:19:28 PM +545ms
+2ms ╔Received event [HVAC].switch = on with a delay of 489ms
+733ms ║Piston waited at a semaphore for 293ms
+737ms ║Runtime (38374 bytes) successfully initialized in 380ms (v0.2.0e5.20170812) (734ms)
+739ms ║╔Execution stage started
+883ms ║╚Execution stage complete. (144ms)
+887ms ║Setting up scheduled job for Sun, Aug 27 2017 @ 9:04:29 PM EDT (in 2699.923s), with 1 more job pending
+912ms ╚Event processed successfully (911ms)
8/27/2017, 8:19:27 PM +576ms
+1ms ╔Received event [Home].time = 1503879567664 with a delay of -88ms
+365ms ║Runtime (38319 bytes) successfully initialized in 198ms (v0.2.0e5.20170812) (362ms)
+367ms ║╔Execution stage started
+730ms ║║Executed [HVAC].on (326ms)
+760ms ║╚Execution stage complete. (394ms)
+764ms ║Setting up scheduled job for Sun, Aug 27 2017 @ 9:59:00 PM EDT (in 5971.662s)
+782ms ╚Event processed successfully (781ms)
8/27/2017, 7:49:27 PM +849ms
+2ms ╔Received event [HVAC].switch = off with a delay of 619ms
+669ms ║Runtime (38309 bytes) successfully initialized in 314ms (v0.2.0e5.20170812) (666ms)
+671ms ║╔Execution stage started
+785ms ║╚Execution stage complete. (115ms)
+789ms ║Setting up scheduled job for Sun, Aug 27 2017 @ 8:19:27 PM EDT (in 1799.028s), with 1 more job pending
+808ms ╚Event processed successfully (807ms)
8/27/2017, 7:49:26 PM +629ms
+1ms ╔Received event [Home].time = 1503877767343 with a delay of -714ms
+308ms ║Runtime (38320 bytes) successfully initialized in 102ms (v0.2.0e5.20170812) (306ms)
+309ms ║╔Execution stage started
+399ms ║║Executed virtual command [HVAC].sendNotificationToContacts (58ms)
+1002ms ║║Executed [HVAC].off (602ms)
+1071ms ║╚Execution stage complete. (762ms)
+1074ms ║Setting up scheduled job for Sun, Aug 27 2017 @ 8:19:27 PM EDT (in 1799.962s), with 1 more job pending
+1094ms ╚Event processed successfully (1093ms)
8/27/2017, 7:04:26 PM +682ms
+2ms ╔Received event [HVAC].switch = on with a delay of 568ms
+599ms ║Piston waited at a semaphore for 269ms
+602ms ║Runtime (38374 bytes) successfully initialized in 347ms (v0.2.0e5.20170812) (598ms)
+603ms ║╔Execution stage started
+709ms ║╚Execution stage complete. (105ms)
+712ms ║Setting up scheduled job for Sun, Aug 27 2017 @ 7:49:27 PM EDT (in 2699.95s), with 1 more job pending
+729ms ╚Event processed successfully (729ms)


#2

It could be because the piston will stop being evaluated outside of you time restriction.
Take them out of your ‘only when’ and put them in the main body.
See if that works.