Aqara Cloud API
Python SDK for Aqara Cloud API
(Functionality is not full, but already has core for futher upgrades)
Install
pip install aqara_capi
Example of usage
from aqara_capi import CloudApiClient, Locality
# create client
client = CloudApiClient(
app_id=APP_ID, # your params from https://developer.aqara.com/console
app_key=APP_KEY,
key_id=KEY_ID,
locality=Locality.RU, # for cloud domain
)
# set access and refresh tokens
client.set_tokens(access_token='...', refresh_token='...')
# or generate them
client.get_auth_code(
account='my@example.com',
account_type=0,
access_token_validity='7d',
)
client.get_access_token(
auth_code='secret code from ur email',
account='my@example.com',
account_type=0,
)
# print your devices
response = client.query_device_info()
print(response.result)
# print device attributes
response = client.query_resource_info(
model='lumi.light....',
)
print(response.result)
# trigger some action (for example turn on light)
client.write_resource_device(
subject_id='lumi...',
resource_id='4.1.85',
value='1',
)
Metadata
Release files for aqara-capi 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aqara_capi-1.2.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for aqara_capi-1.2.0-py2.py3-none-any.whl |
Release files / aqara_capi-1.2.0-py2.py3-none-any.whl
| Download URL | aqara_capi-1.2.0-py2.py3-none-any.whl |
|---|---|
| Size | 12.8 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
fb6848d186c0a9826dba600d302fdf489fa835cd6770ac1ca1cc88dd58676d71
|
|
BLAKE2b-256 checksum How to use checksums |
3d1d692b02c304643458c2da74f2d746fb885efc5750fdee709b8be78a57c197
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.5
|
Security for aqara-capi 1.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.