A hub-connected device communicates to SmartThings via a SmartThings-compatible hub and uses SmartThings Cloud to execute commands.
This article demonstrates how to integrate a hub-connected device with SmartThings.
- SmartThings-compatible hub, e.g.:
- Samsung SmartThings Hub V2/V3
- Samsung Connect Home
- Samsung SmartThings Wifi
- ADT Security Hub
- NVIDIA SHIELD with SmartThings Link
- A Samsung account, used on both Developer Workspace and the SmartThings Groovy IDE
- You are enrolled as an organization member in Developer Workspace
- GitHub account with a fork of SmartThingsPublic
Step 1: Log into Developer Workspace and IDE
- Log into Developer Workspace and create a new hub-connected device integration.
- Open the Groovy IDE and login with the same credentials.
graph.api.smartthings.comcredentials, and use these credentials to log into Developer Workspace.
Step 2: Set up GitHub integration
- Link your GitHub account with the IDE. In the IDE, navigate to "My Device Handlers" and click "Enable GitHub Integration" to authorize the application.
- Fork the SmartThingsPublic GitHub repository. You can commit changes made in the IDE to this repository and update the IDE with changes merged into this repository from other sources.
Step 3: Create a Device Handler in the IDE
A Device Handler is a representation of a physical device in the SmartThings platform. It is responsible for communicating between the actual device and the SmartThings platform.
- Under "My Device Handlers", click "Create a New Device Handler".
- In the From Template tab, select the protocol (Zigbee Home Automation [HA] or 3.0; Zigbee Light Link [ZLL]; Z-Wave) and capabilities that correspond to your device.
- If there is no Device Handler match (i.e. a New Device Handler Form is created), we recommend creating a Device Handler From Example. See below.
- If there is a Device Handler match, the corresponding Device Handler is shown. Enter the required fields to create a unique fingerprint for your device. Required fields may include: Manufacturer Name/ID, Product ID, Model Name/ID, Device Join Name, Namespace, Device Handler Name.
- Click the "Update Existing Device Handler" or "Create" button. You will see the template code.
- Click "Save". Then click "Publish" and "For Me" to publish this Device Handler in your account.
There are two other ways to create a Device Handler in the IDE:
- From Code: Copy the Groovy code from an existing Device Handler in the SmartThingsPublic repo and paste it in the empty field in the IDE.
- From Example: Select an existing Device Handler from this tab in the IDE.
Step 4: Test your device integration
- Open the SmartThings app and create a Location in the format
- Add your device and hub to this Location.
- Start testing your device with the SmartThings app. Make sure you enable Developer Mode.
- Verify the self-test guidelines and running the test cases.
Once you have successfully completed tests, send an invitation to the user
email@example.com to join this Location. This allows the SmartThings team to test and approve your device for publication.
Step 5: Add a product in Developer Workspace
- Return to Developer Workspace and add the product info for your hub-connected device.
- You will need to create a set of pairing instructions. These should be as generic as possible so that they can be reused with other devices belonging to the same family.