Dumb question: I have a custom device that has methods available that most others of it’s type do not. One example of this could be a “thermostat” device type that has “present” or “away” status, such as the Nest thermostat. When writing something that may want to make use of this, I’m uncertain how to do feature detection to determine if the .away() or .present() method exist. I’ve found that following Groovy docs, that using thermostat.metaClass.getMetaMethod(“away”) yields the error: “Getting property metaClass on class physicalgraph.app.DeviceWrapper is not allowed”. However, using a method that simply does not exist, you get the error “Command ‘____’ is not supported. Supported commands: ”.
Is there a way to get_class_methods of a given object so I can use non-standard features if available?