I’'ve written a custom Device Type (largely just stubbed out right now), and a SmartApp to use it. The device looks OK in the simulator, though it doesn’t do anything yet. But when I try to run the app, I get the enclosed error.
I’ve seen references to this kind of error in a few forum topics, but never with a clear description of exactly what’s failing. I’m just starting out with this stuff, so I’m sure I’m doing something wrong, but the message isn’t exactly descriptive. A complaint about a null Device name sounds like a sane guess, but as far as I can tell, it has a name.
Any ideas?
The error is:
grails.validation.ValidationException: Validation Error(s) occurred during save():
Field error in object ‘physicalgraph.device.Device’ on field ‘name’:
rejected value [null]; codes
[physicalgraph.device.Device.name.nullable.error.physicalgraph.device.Device.name,physicalgraph.device.Device.name.nullable.error.name,physicalgraph.device.Device.name.nullable.error.java.lang.String,physicalgraph.device.Device.name.nullable.error,device.name.nullable.error.physicalgraph.device.Device.name,device.name.nullable.error.name,device.name.nullable.error.java.lang.String,device.name.nullable.error,physicalgraph.device.Device.name.nullable.physicalgraph.device.Device.name,physicalgraph.device.Device.name.nullable.name,physicalgraph.device.Device.name.nullable.java.lang.String,physicalgraph.device.Device.name.nullable,device.name.nullable.physicalgraph.device.Device.name,device.name.nullable.name,device.name.nullable.java.lang.String,device.name.nullable,nullable.physicalgraph.device.Device.name,nullable.name,nullable.java.lang.String,nullable];
arguments [name,class physicalgraph.device.Device]; default message
[{0} cannot be null]
For the edification of anybody else who runs across this same issue, the root cause of my problem was that I specified a nonexistant capability in a preferences/input clause. This apparently corrupted that SmartApp somehow-- from then on, trying to set a Location for the app resulted in an error, even after I removed the offending code.
When I copied the exact same code (with the bad capability removed) to a new app, it worked fine. There just may be a few bugs in the system
It seems as though any app with capability.colorControl is producing this error in the simulator now. I can’t tell if its happening in production yet as well. Please help @ben
I’ve been at this all day on multiple hubs with multiple accounts - it seems like anything with capability.colorControl is throwing this error, at least in the simulator.
As others have noted, if the error to throws once in a SmartApp, I have to wipe the app completely to get it to go away.
It seems there is another post about this too…
Anyone have suggestions? I talked to support and they said @April or @matthewnohr might be able to help!
I too am having this issue. I have found that selecting my real-life Linear garage door opener works, while the simulated device fails. This is the only way I’ve been able to get around it.
JIm,
It seems this error is so generic that SmarTThings needs to make the display of the error more helpful. I have wasted whole day trying to find the error - looked at the community forum also - but there is no real answer that says why we get this error. Just because someone gets it working by re installing the app is of no help. My suggestion - have someone in SmartThings monitor this and provide suitable reply