Help with thermostat piston


#1

1) Give a description of the problem
Trying to figure out why my thermostat didn’t resume program at 8pm on 4th Thursday or November
2) What is the expected behavior?
Thermostat to resume program at 8pm on 4th Thursday of November

11/22/2018, 7:59:59 PM +203ms
+1ms ╔Received event [4 Lane].time = 1542934800000 with a delay of -797ms
+177ms ║RunTime Analysis CS > 42ms > PS > 64ms > PE > 70ms > CE
+179ms ║Runtime (44422 bytes) successfully initialized in 64ms (v0.3.108.20180906) (177ms)
+181ms ║╔Execution stage started
+192ms ║║Comparison (time) 71999392 happens_daily_at (time) 25500000 = false (0ms)
+194ms ║║Condition #4 evaluated false (5ms)
+196ms ║║Cancelling statement #4’s schedules…
+200ms ║║Requesting time schedule wake up at Fri, Nov 23 2018 @ 7:05:00 AM EST
+206ms ║║Comparison (time) 71999406 happens_daily_at (time) 25500000 = false (1ms)
+208ms ║║Condition #17 evaluated false (5ms)
+209ms ║║Cancelling statement #17’s schedules…
+214ms ║║Requesting time schedule wake up at Fri, Nov 23 2018 @ 7:05:00 AM EST
+220ms ║║Comparison (time) 71999420 happens_daily_at (time) 25500000 = false (1ms)
+222ms ║║Condition #19 evaluated false (4ms)
+223ms ║║Cancelling statement #19’s schedules…
+228ms ║║Requesting time schedule wake up at Fri, Nov 23 2018 @ 7:05:00 AM EST
+231ms ║║Condition group #1 evaluated false (state did not change) (43ms)
+238ms ║║Comparison (time) 71999438 happens_daily_at (time) 72000000 = true (0ms)
+249ms ║║Time restriction check failed
+251ms ║║Condition #9 evaluated false (17ms)
+253ms ║║Cancelling statement #9’s schedules…
+257ms ║║Requesting time schedule wake up at Fri, Nov 23 2018 @ 8:00:00 PM EST
+264ms ║║Comparison (time) 71999464 happens_daily_at (time) 72000000 = false (0ms)
+265ms ║║Condition #18 evaluated false (5ms)
+267ms ║║Cancelling statement #18’s schedules…
+272ms ║║Requesting time schedule wake up at Fri, Nov 23 2018 @ 8:00:00 PM EST
+278ms ║║Comparison (time) 71999478 happens_daily_at (time) 72000000 = false (0ms)
+280ms ║║Condition #20 evaluated false (5ms)
+282ms ║║Cancelling statement #20’s schedules…
+286ms ║║Requesting time schedule wake up at Fri, Nov 23 2018 @ 8:00:00 PM EST
+290ms ║║Condition group #6 evaluated false (state did not change) (55ms)
+297ms ║╚Execution stage complete. (117ms)
+301ms ║Setting up scheduled job for Fri, Nov 23 2018 @ 7:05:00 AM EST (in 39900.497s), with 5 more jobs pending
+309ms ╚Event processed successfully (309ms)


#2

I am guessing this has something to do with other folks’ issue with time happens daily at trigger. Do a search for it and it will bring up some similar issues as yours.


#3

@ipaterson is there any update on the “time happens daily at” issue?


#4

No


#5

His looks like a different issue, though. His trigger was [Location].time, and the time verification at +238ms in his log file evaluated true. The time restriction check after that failed… not sure if that means it missed the 4th Thursday of November as being true, rather than the 8pm?


#6

Not sure why it didn’t evaluate true. Yesterday was the fourth Thursday.


#7

Changed “happens daily at” 8pm to “is between” 8:00 and 8:01 and it works now. There is definitely a bug with “happens daily at”.


#8

According to your logs it only evaluates true the first time the expression is evaluated. The first condition checking December evaluated true for 8pm but failed the date restriction leaving the remaining two 8pm checks. Since both evaluated false I would conclude that once evaluated true in the piston this condition sets some value that prevents it from evaluating true again.

You may have better luck using a timer statement every day at 8pm restricted to Nov, Dec, Jan. Then within the timer use a single if to check “time is any” with the restrictions you’re currently using. That way you can configure the 8pm time in a single place in the piston and it should handle the SmartThings platform’s early/late triggering of the piston.

I’m not sure if “is between 8:00 and 8:01” handles early execution (e.g. 7:59:59), just be aware that ST can trigger your piston early and “happens daily at” allows a bit of flexibility. The time range may have that flexibility as well, I haven’t checked to be sure.


#9

Thanks for getting back to me on this @ipaterson. Trying to set up your suggestion. Is it something like this?