Interact with Yale systems
Project description
Yale Client
Yale client is a python client for interacting with the Yale APIs.
This project is largely taken from https://github.com/domwillcode/yale-smart-alarm-client
The API has been split into alarm and lock, and the auth parts has been moved away into a separate class to keep things noise free.
The codebase has also been updated be more python3 ish, dropping the ancient string formats etc.
Supported functions:
- alarm api:
- Arm full (away)
- Arm partial (away/night)
- Disarm
- Get alarm status
- lock api
- get status
- lock
- unlock
Usage
Create a client with:
client = YaleClient(username, password)
where username and password are your Yale Smart Alarm credentials.
Locks
Iterate the connected locks
client = YaleClient(username, password)
for lock in client.lock.locks():
print(f"{lock}")
lock a single lock
lock = client.lock.get(name="myfrontdoor"):
lock.close()
unlock:
lock = client.lock.get(name="myfrontdoor"):
lock.open(pin_code="1234566")
Alarm
Change the alarm state with:
client.alarm.arm_full()
client.alarm.arm_partial()
client.alarm.disarm()
or
client.alarm.set_alarm_state(<mode>)
where 'mode' is one of:
from yaleclient.alarm import (YALE_STATE_ARM_PARTIAL,
YALE_STATE_DISARM,
YALE_STATE_ARM_FULL)
Is the alarm armed fully or partially:
client.alarm.is_armed() # == True
or return alarm status. eg.
client.alarm.get_armed_status() is YALE_STATE_ARM_FULL
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for yaleclient-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ef4963a7f8dc43956d90b3c9aef188be8ce61ea5a3b03f89c28869f5cf81971 |
|
MD5 | 2fe1f7aae05f01a8c22d6d7a5bd44d54 |
|
BLAKE2b-256 | 89c06382b947e8cd768b31a5d1235270fe472c4622c23ec657a2c4300097fb1a |