Update: After a lot more testing, the initial issue I explained below always existed, but manually applying the response command to each item in the list didn’t always work either so I think there’s a larger issue with the way the parse result is being handled.
The one thing I do know is that if you use sendHubCommand and sendEvent instead of returning items from the parse method, everything will work the way it’s supposed to…
A few days ago most of my devices started reporting that they were offline and I tracked the problem down to SmartThings ignoring the events being returned from the WakeUpNotification event handler.
I ended up changing all of my device handlers to use sendEvent instead of using createEvent and that solved the problem, but it didn’t explain why it was only effecting my sleeping devices.
I’ve also been noticing some configuration changes not sticking and users have been reporting issues with the delay features in my siren handlers. There have also been a number of users reporting random problems on the forum this week.
It looks like a recent update changed the response command so that it no longer works with lists that have delays in them and I think that’s the source of all these problems.
Example 1:
This used to work fine, but now the commands don’t get sent to the device:
def cmds = delayBetween([
someCmd().format(),
anotherCmd().format()
], 50)
return response(cmds)
Example 2:
This also used to work fine, but now the commands don’t get sent to the device and the events get ignored.
def result = []
result += response([
someCmd().format(),
"delay 100",
anotherCmd().format()])
result << createEvent(...)
return result
No exceptions are thrown for either example…