Many "Capabilities" don't work

I’ve been trying out multiple capabilities from https://smartthings.developer.samsung.com/docs/api-ref/capabilities.html#Capabilities-Reference such as “Lock”, “Door Control”, “Valve”, and “Window Shade”. However they all give the same error when I press their respective buttons: “A network or server error occurred. Try again later.” The only capability that doesn’t have this error is “Switch”. Why is the problem occurring, and how can it be fixed?

 metadata {
	definition (name: "Test", namespace: "Test", author: "Alex Feng", cstHandler: true) {
		capability "Lock"
		capability "Switch"
		capability "Door Control"
		capability "Valve"
		capability "Window Shade"
	} 

 	simulator {
		// TODO: define status and reply messages here
	} 

 	tiles {
		// TODO: define your main and details tiles here
	}
} 

 // parse events into attributes
def parse(String description) {
	log.debug "Parsing '${description}'"
	// TODO: handle 'lock' attribute
	// TODO: handle 'switch' attribute
	// TODO: handle 'door' attribute
	// TODO: handle 'valve' attribute
	// TODO: handle 'windowShade' attribute
	// TODO: handle 'supportedWindowShadeCommands' attribute 
 } 

 // handle commands
def lock() {
	log.debug "Executing 'lock'"
	// TODO: handle 'lock' command
} 

 def unlock() {
	log.debug "Executing 'unlock'"
	// TODO: handle 'unlock' command
} 

 def on() {
	log.debug "Executing 'on'"
	// TODO: handle 'on' command
} 

 def off() {
	log.debug "Executing 'off'"
	// TODO: handle 'off' command
} 

 def open() {
	log.debug "Executing 'open'"
	// TODO: handle 'open' command
} 

 def close() {
	log.debug "Executing 'close'"
	// TODO: handle 'close' command
} 

 def pause() {
	log.debug "Executing 'pause'"
	// TODO: handle 'pause' command
}

Try it on the SmartThings Classic App.

Groovy based Device Types have limited compatibility with the SmartThings New App.

Aren’t these capabilities supposed to be supported on the new app according to https://smartthings.developer.samsung.com/docs/api-ref/capabilities.html#Window-Shade?

If not, what would be the correct way to define these capabilities to work in the new app?

capability “Lock”
capability “Switch”
capability “Door Control”
capability “Valve”
capability “Window Shade”

The Capabilities work, but not in the form of the deprecated Groovy DTH (except in limited form).

Read ALL the documentation. Not just the section on Capabilities. Or just stick with SmartThings Classic App. :roll_eyes:

Isn’t the Groovy IDE still used even for new hub-connected devices according to https://smartthings.developer.samsung.com/docs/devices/hub/hub-connected-device.html#Step-3-Create-a-Device-Handler-in-the-IDE?

If the docs say so - it doesn’t mean it’s true, but it may be true but docs are incomplete too.

Contact Build@smartthings.com for developer support.

Yes but the new app uses a schema and capability based approach for displaying features and it’s still in development and not all combination work correctly as of now.

1 Like

© 2019 SmartThings, Inc. All Rights Reserved. Terms of Use | Privacy Policy

SmartThings; SmartApps®; Physical Graph; Hello, Home; and Hello, Smart Home are all trademarks of the SmartThings, Inc.