Ariston module
Project description
python-ariston-api
A Python module for controlling Ariston devices with cloud polling. The following devices are currently supported:
- Ariston Alteas One 24
- Ariston Velis Evo
- Ariston Velis Lux
- Ariston Lydos Hybrid
- Ariston Genus One
- Ariston Nuos Split
- Ariston Thision S
- Chaffoteaux INOA S 24
Installation
Use pip3 to install the latest version of this module.
pip3 install ariston
The easy way (recommended for testing the module)
First, open Python 3 and import ariston module.
python3
import ariston
Syncronous
Discover devices if you dont know your gateway id. You can skip this step.
raw_devices = ariston.discover("username", "password")
For example the gateway id for your first device.
raw_devices[0]['gw']
Get your device
device = ariston.hello("username", "password", "gateway", is_metric, "location")
Asyncronous
raw_devices = await ariston.async_discover("username", "password")
device = await ariston.async_hello("username", "password", "gateway", is_metric, "location")
The ariston class way (recommended for integrate the module)
First, open Python 3 and import Ariston class from this module.
python3
from ariston import Ariston
Create a new Ariston instance
ariston = Ariston()
Now let's try some functions
Connect
The cloud requests are asynchronous, so if you call them from a synchronous function or not even from function, you should use asyncio.
import asyncio
Sync
asyncio.run(ariston.async_connect("username", "password"))
Async
await ariston.async_connect("username", "password")
- username: Your ariston cloud username.
- password: Your ariston cloud password.
Discovery
Use this function to discover devices. You can skip this step if you already know the gateway id.
Sync
devices = asyncio.run(ariston.async_discover())
Async
devices = await ariston.async_discover()
Say hello
Use this function to create the device object.
Sync
device = asyncio.run(ariston.async_hello("gateway", is_metric, "location"))
Async
device = await ariston.async_hello("gateway", is_metric, "location")
- gateway: You can find the value in the returned discover dictionary name 'gw'
- is_metric: Optional. True or False. True means metric, False means imperial. Only works with Galevo (Alteas One, Genus One, etc) system. Default is True.
- language_tag: Optional. Check https://en.wikipedia.org/wiki/IETF_language_tag Only works with Galevo (Alteas One, Genus One, etc) system. Default is "en-US".
Use your device
Get device features
Sync
device.get_features()
Async
await device.async_get_features()
Get device data
Sync
device.update_state()
Async
await device.async_update_state()
Get device energy
Sync
device.update_energy()
Async
await device.async_update_energy()
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
File details
Details for the file ariston-0.19.6.tar.gz
.
File metadata
- Download URL: ariston-0.19.6.tar.gz
- Upload date:
- Size: 26.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e7e8ca264ab459e8c2c2d2efb472f3a4c4b69bf8173430cf0c6dcda1670cdc4 |
|
MD5 | e649f63d748a62303195a774f5a6ee02 |
|
BLAKE2b-256 | d167912249bab29672efddf2990951a5fe2c6044cbd668a0f55bc8c91f2abe21 |
File details
Details for the file ariston-0.19.6-py3-none-any.whl
.
File metadata
- Download URL: ariston-0.19.6-py3-none-any.whl
- Upload date:
- Size: 33.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | da259b7918573a42c0058db8ce313e63df4554c0b01247674561422be8002309 |
|
MD5 | 46f2a6c29c58d1cee4b94c54f15ec305 |
|
BLAKE2b-256 | 397413e81dae5c18bf3050d49321caf69b0997979fa3c8af76ba7e01fe19c872 |