ZIGBEE example error

I wanted to test out the code from the ZigBee example from this site: http://docs.smartthings.com/en/latest/device-type-developers-guide/zigbee-example.html, but unfortunately it wouldn’t compile. I had tons of errors from this code as listed below. Do I need to install groovy as described from: http://docs.smartthings.com/en/latest/getting-started/groovy-basics.html, or do I need to set up my ide in a certain way, or do I need to import things?

Metadata {} :
groovy.lang.MissingMethodException: No signature of method: script14681783347571255931203.metadata() is applicable for argument types: (script14681783347571255931203$_run_closure1) values: [script14681783347571255931203$_run_closure1@f37535f]
Possible solutions: getMetadata(), getState(), setState(java.lang.Object), metaClass(groovy.lang.Closure)

capability “Actuator”:
java.lang.NullPointerException: Cannot invoke method findDTOByName() on null object

fingerprint profileId: “0104”, inClusters: “0000, 0003, 0004, 0005, 0006, 0008”:
groovy.lang.MissingMethodException: No signature of method: script146817868385290037693.fingerprint() is applicable for argument types: (java.util.LinkedHashMap) values: [[profileId:0104, inClusters:0000, 0003, 0004, 0005, 0006, 0008]]

tiles(scale: 2) {} “method” :
groovy.lang.MissingMethodException: No signature of method: script14681787213021509226521.tiles() is applicable for argument types: (java.util.LinkedHashMap, script14681787213021509226521$_run_closure2) values: [[scale:2], script14681787213021509226521$_run_closure2@6768aa0a]
Possible solutions: tiles(), tiles(groovy.lang.Closure), tile(java.util.Map), tile(java.util.Map, groovy.lang.Closure), getTiles(), pages()

I’d really appreciate any help from other developers as to what I need to do to get everything working for this code.

No need to “install” Groovy … everything compiles and executes in the SmartThings Cloud.
The IDE is also entirely browser based and has no special requirements on your PC or Mac.

It definitely is essential that you are pasting the code as a new Device Type (and not a SmartApp) … that’s not an uncommon mistake.

The docs are sometimes out of date and there has been some small change in the platform that requires a little adjustment to the code, and sometimes the IDE is just flaky and it helps to just start a fresh Device Type after restarting your browser.

Gotta run at the moment, but myself or someone might try pasting the same example into their IDE and see if they get the same error and can perhaps see if the notice an obvious syntax error or other recently new requirement…

1 Like

It does sound like you may have mixed up smart apps and device type handlers. They get installed into separate sections of your account library. See if this helps at all.

1 Like