-
-
Save dknowles2/3eebe440eeee490770cbfc0365272500 to your computer and use it in GitHub Desktop.
Pyschlage Access Code Debug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
from getpass import getpass | |
import pyschlage | |
from pyschlage.code import AccessCode | |
username = input("Schlage username: ") | |
password = getpass() | |
auth = pyschlage.Auth(username, password) | |
api = pyschlage.Schlage(auth) | |
locks = api.locks() | |
for lock in locks: | |
resp = auth.request("get", AccessCode.request_path(lock.device_id)).json() | |
if not isinstance(resp, dict): | |
print(resp) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment