-
Notifications
You must be signed in to change notification settings - Fork 53
Devices
There are three kinds of devices that are supported on the SmartThings ecosystem - Cloud-connected devices, hub-connected devices, and direct-connected devices. To integrate a device with the SmartThings ecosystem, follow the steps below.
- Check out our SDKs and samples.
- Build your device integration.
- For a cloud-connected integration, build a SmartThings Schema Connector or SmartApp Connector.
- For a device that uses a SmartThings-compatible hub, build a hub-connected integration.
- Test your device.
- Publish your device to make it available on the SmartThings app.
You can find additional information about devices here.
Note: The list of functions can also be found here.
-
list - Returns a list of device matching the query options or all devices accessible by the user if no options are specified. Options for the query are capability, capabilities, locationId, deviceId. These can be single values or arrays.
-
get - Returns a description of the specified device. Requires the UUID of the device.
-
delete - Deletes the specified device. Requires the UUID of the device.
-
create - Creates a device. Requires the device definition. If the client configuration specifies a locationID and installedAppId then these values don't need to be included in the definition.
-
update -Update a device. Currently only the device label can be changed. Requires the UUID of the device and the device definition with the label specified.
-
getStatus - Returns the current values of all device attributes. Requires the UUID of the device.
-
getComponentStatus - Gets the attribute values of the specified component of the device. Requires the UUID of the device and the alphanumeric component ID.
-
getCapabilityStatus - Gets the attribute values for the specified component capability. Requires the UUID of the device, the alphanumeric component ID, and the alphanumeric capability ID.
-
getHealth - Returns the health status of the device. Requires the UUID of the device.
-
executeCommands - Sends the specified list of commands to the device. Requires the UUID of the device and a list of commands to execute.
-
executeCommand - Sends the specified command to the device. Requires the UUID of the device and the single device command.
-
sendCommand - Sends the specified command or commands to the device and component defined in the specified config entry. The end result is the same as calling the executeCommand method, but this method accepts a SmartApp config entry for convenience. Requires the config entry specifying the device UUID and component, a capability ID or list of commands, the command name, and a list of arguments.
-
sendCommands - Sends a list of specified command or commands to the device and component defined in the specified config entry. The end result is the same as calling the executeCommand method, but this method accepts a SmartApp config entry for convenience. Requires the config entry specifying the device UUID and component, a capability ID or list of commands, the command name, and a list of arguments.
-
createEvents - Creates events for the specified device. Requires the UUID of the device and a list of events.
-
listInLocation - Returns all devices in the location specified in the client configuration. This call will throw an error if no location specified in the client config. For use only in SmartApps. Deprecated use list() instead.
-
listAll - Returns all devices accessible by the user. Deprecated use list() instead.
-
findByCapability - Returns devices with the specified capability. Deprecated use list({capability: 'switch'}) instead.
-
getState - Returns the current values of all device attributes. Deprecated. Use getStatus() instead.
-
getComponentState - Get the attribute values of the specified component of the device. Deprecated use getComponentStatus() instead.
-
getCapabilityState - Gets the attribute values of the specified component capability. Deprecated use getCapabilityStatus() instead.
-
postCommands - Sends the specified command to the device. Deprecated use executeCommand() instead.
-
sendEvents - Creates events for the specified device. Deprecated use createEvents() instead.
-
namedColor - Returns the hue and saturation of the named color. Deprecated.