The SmartThings Schema is a specification for use in a cloud-connected device integration. It does not require using the SmartThings API.
When using the Schema for a cloud-connected device integration, you must:
- Create an OAuth2 client from your cloud.
- Register a Connector in the Developer Workspace that can fulfill requests sent from SmartThings.
- Implement the Schema in the HTTPS response.
- Test your integration.
The Schema defines the format of the JSON payloads sent from your server.
The SmartThings Schema recognizes three interaction types that define how your server responds to SmartThings.
- Discovery: Return a list of devices.
- State Refresh: Return the state of the devices.
- Command: Issue commands to the device.
SmartThings specifies an interaction type when sending a request to your server, which replies with the appropriate information in a JSON payload.
- ap-northeast-1 (Tokyo)
- us-east-1 (N. Virginia)
- eu-west-1 (Ireland)
See Integrate a cloud-connected device for details on setting up the Connector.
You must generate an OAuth2 application from your cloud. You supply the OAuth2 credentials and details for your application when registering your Connector in Developer Workspace.
When creating your OAuth2 application, you will need to supply the following SmartThings redirect URIs:
- https://c2c-us.smartthings.com/oauth/callback (United States)
- https://c2c-eu.smartthings.com/oauth/callback (European Union)
- https://c2c-ap.smartthings.com/oauth/callback (Asia-Pacific)