Get started with SmartThings Hubs + Smart Locks

Overview

Seam provides a universal API to connect and control many brands of smart locks. This guide provides a rapid introduction to connecting and controlling your SmartThings Hub and smart lock using the Seam API. SmartThings Hub is connected to your local network using either Wi-Fi or Ethernet. The smart lock is paired to SmartThings via Zigbee or Z-Wave. These locks can then be remotely locked, unlocked, and have access codes programmed to allow keyless entry.

To learn more about other smart lock brands supported by Seam such as August, Yale, and Salto, head over to our integration page.

1 β€” Install Seam SDK

Seam provides client libraries for many languages, such as JavaScript, Python, Ruby, PHP, and others, as well as a Postman collection and OpenAPI spec.

npm i seam

Once installed, sign-up for Seam to get your API key, and export it as an environment variable:

$ export SEAM_API_KEY=seam_test2ZTo_0mEYQW2TvNDCxG5Atpj85Ffw

This guide uses a sandbox workspace. You can only connect virtual devices in a sandbox workspace. If you need to connect a real device, use a non-sandbox workspace and API key.

To pair a SmartThings Hub and smart lock with our API, you must sign in to a SmartThings account. To do so, create a Seam Connect Webview.

Now, send the Connect Webview URL to the user. When the user signs in, you see a "completed" status on the Connect Webview or login_successful set to true.

You can now find all the devices that are associated with the connected account. From the returned payload, see whether the door lock is locked or unlocked.

Locking a Door

Lock a door

POST https://connect.getseam.com/locks/lock_door

Headers

Name
Type
Description

Authorization*

String

Bearer <API_KEY>

Request Body

Name
Type
Description

device_id*

String

ID of the Device to be locked

Unlocking a Door

Unlock a door

POST https://connect.getseam.com/locks/unlock_door

Headers

Name
Type
Description

Authorization*

String

Bearer <API_KEY>

Request Body

Name
Type
Description

device_id*

String

ID of the Device to be unlocked

Create an Access Code

POST https://connect.getseam.com/access_codes/create

Headers

Name
Type
Description

Authorization*

String

Bearer <API_KEY>

Request Body

Name
Type
Description

device_id*

String

ID of the Device to be programmed

code

String

digits to set on the device

name*

String

Name of Access Code

starts_at

String

iso8601 timestamp for desired start time of code. null implies that the code will be immediately active.

ends_at

String

iso8601 timestamp for desired end time of code. null implies that the code will be permanent.

For Scheduled Access Codes, both starts_at and ends_at are required. For Ongoing Access Codes, don't set starts_at or ends_at.

Delete an Access Code

DELETE https://connect.getseam.com/access_codes/remove

Headers

Name
Type
Description

Authorizaion*

String

Bearer <API_KEY>

Request Body

Name
Type
Description

access_code_id*

String

List Access Codes

GET https://connect.getseam.com/access_codes

Query Parameters

Name
Type
Description

device

String

Filter by Device

device_id

String

Filter by Device

Headers

Name
Type
Description

Authorizaion*

String

Bearer <API_KEY>

Last updated

Was this helpful?