I have a SmartApp which is processing JSON data via POST, and calling a custom device type method. The relevant SmartApp code is:
devices.eachWithIndex { it, i -> if ( devices[i].deviceNetworkId == request.JSON.name ) devices[i].setPoints(request.JSON.points) }
This call and resulting device type code works perfectly, but the SmartApp raises the following error in the log:
groovy.lang.MissingMethodException: No signature of method: physicalgraph.device.CommandService.executeAction() is applicable for argument types: (physicalgraph.device.cache.DeviceDTO, org.codehaus.groovy.grails.web.json.JSONObject) values: [UPS-AVcloset, [input_frequency:59.9, input_voltage:122, ...]] @ line 46
I’m not sure I care, except that SmartThings is sending a 500 (error) response-code to the external api client. I’d prefer to do things a little more gracefully.
If my call to the device’s setPoints() method is working, why is the app throwing this exception?
Thoughts?