pykevoplus
Python module for controlling Kwikset Kevo locks
Kwikset does not provide an official API for their Kevo locks; I reverse engineered this module from the mykevo.com web app.
To use this module you will need to have a Kevo Plus installed and a registered account on mykevo.com. You will need your mykevo.com credentials to use this module.
This module is published to pypi so you can install it simply via pip install pykevoplus
Usage
The Kevo.GetLocks() function will attempt to scrape the mykevo.com web site to find your locks; as of this writing it can find all of your locks, but scraping the HTML might break at any time if Kwikset changes the website.
from pykevoplus import Kevo
locks = Kevo.GetLocks("username@email.com", "password123")
for lock in locks:
print repr(lock)
Output:
KevoLock(name=Front Door, id=cca7cd1d-c1d5-43ce-a087-c73b974b3529, state=Locked) KevoLock(name=Back Door, id=c60130cd-8139-4688-8ba3-199276a65ad6, state=Locked)
A better way is to explicitly instantiate a KevoLock object using the UUID of the lock. You can get the lock IDs manually by logging into mykevo.com, click Details for the lock, click Settings, the lock ID is on the right.
from pykevoplus import KevoLock
lock = KevoLock.FromLockID("cca7cd1d-c1d5-43ce-a087-c73b974b3529", "username@email.com", "password123")
Locking and Unlocking
from pykevoplus import KevoLock
lock = KevoLock.FromLockID(lock_id, username, password)
lock.Unlock()
print lock.GetBoltState()
lock.Lock()
print lock.GetBoltState()
Output:
Unlocked Locked
Multiple operations in the same session
The KevoLockSession context manager allows you to perform multiple operations on a lock with a single auth session
from pykevoplus import KevoLock, KevoLockSession
lock = KevoLock.FromLockID(lock_id, username, password)
with KevoLockSession(lock):
lock.Unlock()
lock.Lock()
Known Issues
Error handling is extremely basic and needs much more work. Communication errors as well as lock bolt errors need to be addressed
No unit tests yet
Currently only python 2.7 support
Metadata
Release files for pykevoplus 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pykevoplus-1.0.1.tar.gz | 4.7 kB | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pykevoplus-1.0.1-py2.7.egg | Legacy Egg format | - | - | Details |
| pykevoplus-1.0.1-py2-none-any.whl | Python 2 | none | any | Details |
Total release size: 20.7 kB
Release files / pykevoplus-1.0.1.tar.gz
| Download URL | pykevoplus-1.0.1.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ec847a92d0a3b89e4b32475915fd7b85f66b27fa22a8779d91913e7c8d2f3397
|
|
BLAKE2b-256 checksum How to use checksums |
3c7f84b59f43a2dbdcfebaf2ad6fb8cbb09c5dc8d1a33d9e4a08026ff99b5a53
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / pykevoplus-1.0.1-py2.7.egg
| Download URL | pykevoplus-1.0.1-py2.7.egg |
|---|---|
| Size | 9.1 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
7ec9bad3df4a7b0b39e9d565ab40abe957f385b0babdb69b99e050cbddeddb37
|
|
BLAKE2b-256 checksum How to use checksums |
c8da86cbfb883c891040439e036edf0d0a9e146ac0dbf790755f8e6680bcda85
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / pykevoplus-1.0.1-py2-none-any.whl
| Download URL | pykevoplus-1.0.1-py2-none-any.whl |
|---|---|
| Size | 6.9 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
496e0812fe751b71248a79854da12f4006f27cbbd6e5bc66040db15d339950dd
|
|
BLAKE2b-256 checksum How to use checksums |
f76cc532a2ec40693b96bd80cbed9ccce88f1a5b7acd1a5815720796d7a71403
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |