Seam API Docs
Search…
Getting 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
1
from seamapi import Seam
2
3
seam = Seam()
4
5
webview = seam.connect_webviews.create(accepted_providers=["august"])
6
7
assert webview.login_successful is False
8
9
# Send the webview URL to your user
10
print(webview.url)
Copied!
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
1
updated_webview = seam.connect_webviews.get(webview.connect_webview_id)
2
3
assert updated_webview.login_successful
Copied!
We can now find all the devices that are associated with the third party 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
1
from pprint import pprint
2
3
all_locks = seam.locks.list()
4
5
some_lock = all_locks[0]
6
7
assert some_lock.properties["online"] is True
8
assert some_lock.properties["locked"] is True
9
10
pprint(some_lock)
11
# Device(device_id='a8669e4c-76e3-4db6-a827-11a65eb360ba',
12
# device_type='august_lock',
13
# location=None,
14
# properties={'august_metadata': {'house_name': 'My House',
15
# 'lock_id': 'lock-1',
16
# 'lock_name': 'FRONT DOOR'},
17
# 'door_open': False,
18
# 'locked': True,
19
# 'online': True})
Copied!

Locking a Door

post
/locks/lock_door
Python
1
seam.locks.lock_door(some_lock)
2
3
updated_lock = seam.locks.get(some_lock.device_id)
4
5
assert updated_lock.properties["locked"] is True
Copied!

Unlocking a Door

post
https://connect.getseam.com
/locks/unlock_door
Unlock a door
Python
1
seam.locks.unlock_door(some_lock)
2
3
updated_lock = seam.locks.get(some_lock.device_id)
4
5
assert updated_lock.properties["locked"] is False
Copied!

Setting an Access Code

Python
1
seam.access_codes.create(
2
device=some_lock, code="123456", name="Personal Access Code"
3
)
Copied!

Listing Access Codes

Python
1
# you can use a device or a device_id as the "device" parameter
2
seam.access_codes.list(device=some_lock)
3
# [
4
# AccessCode(
5
# access_code_id='af5272b1-2a49-4eb5-9388-2447fc7b5bd1',
6
# type='ongoing',
7
# code='123459'
8
# )
9
# ]
Copied!
Last modified 7d ago