Dumb and dumber…
While trying to execute my Custom Device Command reportNext() from a SmartApp, the Command WAS executed, but the SmartApp aborted immediately after with this luminous (!) error message :
"groovy.lang.MissingMethodException: No signature of method: physicalgraph.device.CommandService.executeAction() is applicable for argument types: (physicalgraph.device.cache.DeviceDTO, java.lang.Boolean) values: [JJG, true] @ line 93"
Guess what : the error was NOT within my SmartApp @ line 93 but instead in my Custom Device Handler, where adding a single line just before the exit of my Custom Command Handler solved my problem :
def reportNext() {
state.forcedWakeUp = true
return [] // <-- absolutely needed to avoid an abort in the calling SmartApp !
}
Sooooo many subtelties…