Pistons with waits failing [TCP piston state change]


#13

Just for reference here, I am on the https://graph-na02-useast1.api.smartthings.com/ shard.


#14

Thanks, I am on https://graph.api.smartthings.com/


#15

https://graph-na02-useast1.api.smartthings.com here


Piston using a 5 second wait is looping?
#16

The latest reply in the SmartThings community topic suggests that it is definitely a related issue, for anyone that did not see the earlier link we are also discussing this over here:


Piston stops prematurely
#17

I am having some very similar problems with some of my pistons. I created similar rules in both Smart Things and in Smart Rules. Both seemed to execute close to the expected times. My problems also started immediately after I updated to the latest revision. The pistons had been working fine up until that point.


#18

Yesterday’s updates over at ST killed off CoRE as well until we get a few code tweaks out. Seems like a java version update has taken out a number of smart apps. Possibly a contributing factor in these scheduling issues.


#19

“We upgraded major versions of Groovy yesterday for executing SmartApps and DeviceTypeHandlers, which included some rather major changes to the language.”

Seems like their changes have affected quite a few SmartApps :frowning: … would’ve been nice to alert developers :angry:


#20

The ‘wait’ issue seems to have been resolved as of about an hour ago. Will do more confirming tests in the AM.


#21

I’m seeing the same, was testing time scheduled and waits to compare between webCoRE and SmartRules but everything was running on time.


#22

The piston I posted above is still not working correctly. Same exact issue as before.


#23

#24

Thanks. I think there’s either a different problem happening now or something wrong with the piston itself then. I created a new piston with a simple wait and it’s working. The one posted above still has the same problem. The glaring issue I see is the trace log that says its requesting a wake up, but there’s no info log that shows it’s setting up a scheduled job. See post 11 for screenshots. Quick Facts also shows Never for next scheduled.

I tried duplicating the piston, same issue. Also tried recreating from scratch, also same issue.


#25

Dug a little deeper. It’s specific to the TCP Cancel on Piston State Change. If I remove that setting from my switch block tasks, the waits work correctly.

Piston snapshot:

TEP and TCP Set:

Trace shows wake up requested, info does not show a scheduled job, task after wait never executes:

Gutter timer is positive/red:

Quick facts shows no next schedule:
image



Now if I leave TEP set as-is and remove TCP:


Trace shows wake up requested, info shows a scheduled job now:

Quick facts shows a next schedule:
image
Set State task after the wait executes:

So…the question is, is there a problem with my logic in the piston, or is this a bug?


#26

@ipaterson any thoughts on my last post?


#28

I’d suggest its your use of 'changes to inactive ’ instead of ‘is inactive’

‘Changes to’ only remains true for about 20 seconds after changing, after which it reverts to false waiting for the next change to occur. Piston reverting to false will cancel your 60 second waits.

Try using ‘is inactive’ as this will only get cancelled if the device changes again.


#29

I’ll give that a shot when I get home later. Looking at the logs though, is it normal for the trace log to show that it’s requesting a wake up, but the info log to not show setting up a scheduled job? What was concerning to me was that it looked like the tasks after the wait were never scheduled in the first place, rather than being scheduled and subsequently canceled. That’s why I was asking if it was possibly a bug.


#30

I don’t thing waits have ever been listed as a scheduled job… that’s more for timers and the like.

If you go back to the main dashboard you should however see a countdown timer next to the piston, counting down from 60.


#31

They do show as a scheduled job, see the working and non-working screenshots I posted above.


#32

Not sure then… there is nothing obviously wrong with your logic, beyond my recommendation to use ‘IS’ instead of ‘CHANGES TO’… that should fix the wait not firing.

Perhaps the schedule not showing on the list is related to the fact that it is not guaranteed to happen when cancel is turned on.


#34

I changed it to “is inactive” instead of “changes to inactive” and it’s still behaving the exact same way. I’m fairly confident that TCP is not working as intended. It’s been awhile since I’ve been active in the forums, is there an official way to open a bug report, or is it just a thread here on the forum?