Seam Docs
Search…
Get started with August Locks

August Locks

August Wifi Locks can be connected to your local wifi network with a bluetooth-enabled phone, these locks can then be remotely locked or unlocked with the Seam API. In addition to locking or unlocking the door, you can see if the door is open or closed.

Overview

To pair an august lock with our API, we'll need to sign into an August Account. We can do this by creating a Seam Webview.
For testing the August API use a sandbox API key. In the sandbox, you can login with August Sandbox accounts, see multiple locks, and perform lock and unlock actions against sandbox devices. When you're done testing with the Sandbox, switch to a real API key.
Make sure to install the relevant Seam package for your language...
Python
from seamapi import Seam
​
seam = Seam()
​
webview = seam.connect_webviews.create(accepted_providers=["august"])
​
assert webview.login_successful is False
​
# Send the webview URL to your user
print(webview.url)
We should now send the Connect Webview URL to the user, when the user signs in, we'll see a "completed" status on the webview or login_successful set to true.
Python
updated_webview = seam.connect_webviews.get(webview.connect_webview_id)
​
assert updated_webview.login_successful
We can now find all the devices that are associated with the connected account that was signed into. From the returned payload, we can see if a lock's door is open, and see if the lock is locked or unlocked.
Python
from pprint import pprint
​
all_locks = seam.locks.list()
​
some_lock = all_locks[0]
​
assert some_lock.properties["online"] is True
assert some_lock.properties["locked"] is True
​
pprint(some_lock)
# Device(device_id='a8669e4c-76e3-4db6-a827-11a65eb360ba',
# device_type='august_lock',
# location=None,
# properties={'august_metadata': {'house_name': 'My House',
# 'lock_id': 'lock-1',
# 'lock_name': 'FRONT DOOR'},
# 'door_open': False,
# 'locked': True,
# 'online': True})

Locking a Door

post
/locks/lock_door
Python
seam.locks.lock_door(some_lock)
​
updated_lock = seam.locks.get(some_lock.device_id)
​
assert updated_lock.properties["locked"] is True

Unlocking a Door

post
https://connect.getseam.com
/locks/unlock_door
Unlock a door
Python
seam.locks.unlock_door(some_lock)
​
updated_lock = seam.locks.get(some_lock.device_id)
​
assert updated_lock.properties["locked"] is False

Setting an Access Code

Python
seam.access_codes.create(
device=some_lock, code="123456", name="Personal Access Code"
)

Listing Access Codes

Python
# you can use a device or a device_id as the "device" parameter
seam.access_codes.list(device=some_lock)
# [
# AccessCode(
# access_code_id='af5272b1-2a49-4eb5-9388-2447fc7b5bd1',
# type='ongoing',
# code='123459'
# )
# ]
​