An async Python wrapper for the Aseko Pool Live API.
The library is currently limited to the features available on pool.aseko.com.
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
.
pip install aioaseko
from aioaseko import MobileAccount
from aiohttp import ClientSession
session = ClientSession()
account = MobileAccount(session, "[email protected]", "passw0rd")
await account.login()
from aiohttp import ClientSession
from asyncio import run
import aioaseko
async def main():
async with ClientSession() as session:
account = aioaseko.MobileAccount(session, "[email protected]", "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())