Async Python package for the Aseko Pool Live API
Project description
aioAseko package
An async Python wrapper for the Aseko Pool Live API.
The library supports Aseko ASIN AQUA devices. The Aseko ASIN Pool is partially supported. The library is currently limited to a selection of features available on pool.aseko.com. Mobile-only features are not supported.
Account
The library provides a MobileAccount
and WebAccount
class to make authenticated requests to the mobile and web API, respectively.
In this version of aioAseko, WebAccount
can only be used to obtain AccountInfo
and retrieve the account units.
The mobile API does not provide AccountInfo
, so MobileAccount.login()
will return None
.
Installation
pip install aioaseko
Usage
Import
from aioaseko import MobileAccount
Create a aiohttp.ClientSession
to make requests
from aiohttp import ClientSession
session = ClientSession()
Create a MobileAccount
instance and login
account = MobileAccount(session, "aioAseko@example.com", "passw0rd")
await account.login()
Example
from aiohttp import ClientSession
from asyncio import run
import aioaseko
async def main():
async with ClientSession() as session:
account = aioaseko.MobileAccount(session, "aioAseko@example.com", "passw0rd")
try:
await account.login()
except aioaseko.InvalidAuthCredentials:
print("The username or password you entered is wrong.")
return
units = await account.get_units()
for unit in units:
print(unit.name)
await unit.get_state()
print(f"Water flow: {unit.water_flow}")
for variable in unit.variables:
print(variable.name, variable.current_value, variable.unit)
await account.logout()
run(main())
Project details
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
File details
Details for the file aioaseko-0.2.0.tar.gz
.
File metadata
- Download URL: aioaseko-0.2.0.tar.gz
- Upload date:
- Size: 20.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6525ba6510232f49d8b645beea39a161e0ee972c23ce8e1aff76ecb7406ffe33 |
|
MD5 | 2706d0695661d3b131b041e2ea75750b |
|
BLAKE2b-256 | 1410d86848a0137cbaac02ae49d4367ae3262bf76f657d014ed3cce99937cf56 |
File details
Details for the file aioaseko-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: aioaseko-0.2.0-py3-none-any.whl
- Upload date:
- Size: 24.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4278fbe07f5181dabd585ed1a869e65237d6ab0623e4d22f2f88f6dc1a9f05b6 |
|
MD5 | d46b044f0d1eb36f4d868a0b5380ae7d |
|
BLAKE2b-256 | 98c2ae0b7458f9479f513aac0c8bf4c14e96e03fe5457d1cf568218128d8b259 |