BUG REPORT: Can’t create new piston


Unable to create CoRE pistons. Get the following message when clicking “if” in new piston.

Pistons with waits failing [TCP piston state change]

Confirmed here as well.


Same here too!! What’s happened?! :frowning:


Few things I’ve been wondering for a while is how much longer will be CoRE be maintained? Are there plans to discontinue the smartapp altogether forcing users to migrate to webCoRE? Most everything I’ve got is in webCoRE already, but a few pistons are still running in CoRE. Maybe @ady624 could advise?


Same here , existing conditions has disappeared from pistons :pensive:


Not much luck getting info in the ST logs here, as a starting point I got this when trying to add a “then” action

org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object ‘null’ with class ‘null’ to class ‘int’. Try ‘java.lang.Integer’ instead @line 3483 (createAction)


This error seems to be the primary cause of all the issues I can find with CoRE. Anywhere that a value was casted to an integer without first checking that it is not null will fail. Possibly a java update over at ST?


The two code changes required to get some of the basics working here:

Change line 857 to

def pid = condition.parentId ? (int) condition.parentId : (int)condition.id

Change line 3483 to

action.id = actionId == null ? getNextActionId() : actionId

In both cases removing (int) cast on a value that might be null. I will look for other instances of that pattern but for now that fixes a few of the major issues.


Apparently, there was a major version upgrade of Groovy yesterday, but I haven’t been able to find any sort of documented changelog.

There are apparently other SmartApps and DTHs that are experiencing typehandling errors as well.



I don’t see any other instances of that pattern… Now, do I have access to CoRE to push out an update?

Nope. but I can submit a pull request and ping Ady in the morning if he doesn’t see it sooner.


@GRClark @leftyfb @windowsdan @fiansari

Pull request for the fixes mentioned above is submitted to CoRE, please paste in and publish the code in that branch to test whether any other issues remain.

CoRE smart app code - the code at this link will update automatically if any additional fixes are pushed.


@ipaterson Thanks, I pasted your code over the one in my IDE and new piston are working.


This fix should show up in the GitHub smart app updates for everyone. I have write access to CoRE now and should be able to resolve future CoRE issues more quickly.