ariston_boiler_control package
Module contents
Module for the control of a Wifi-enabled Ariston boiler through the Web API.
At the moment, this module only works with the default boiler specificed in the web interface.
- Features:
read the current temperature
read and set the target temperature
read and set the operation mode (Green, Comfort, Fast, Auto, HCHP)
read the HP state (on/off)
read and set the boost mode (on/off)
- Example:
>>> from ariston_boiler_control import AristonBoilerControl, OperationMode >>> abc = AristonBoilerControl('email@email.com', 'password') >>> # executes the login with the username and password provided >>> # it is actually optional: it is done automatically when needed >>> abc.login() >>> # get the current temperature >>> temperature = abc.get_current_temperature() >>> # set the operation mode to comfort >>> abc.set_operation_mode(OperationMode.COMFORT) >>> # set the target temperature to 60 degrees >>> abc.set_target_temperature(60)
Copyright (c) 2023 Francesco Santini <francesco.santini@gmail.com>
- class ariston_boiler_control.AristonBoilerControl(email, password, poll_interval=30)[source]
Bases:
object
Class to control an Ariston boiler
- Attributes:
email (str): the email address used to login to the Ariston website password (str): the password used to login to the Ariston website poll_interval (int, optional): the interval in seconds between polling for new data (default 30)
- get_boost(force: bool = False) bool [source]
Get the current state of the boost
Parameters
- forcebool, optional
if polling for a new value is required, by default False
Returns
- bool
A bool corresponding to the current state
- get_current_temperature(force: bool = False) float [source]
Get the current water temperature
Parameters
- forcebool, optional
if polling for a new value is required, by default False
Returns
- float
the current water temperature
- get_data_raw(force: bool = False) dict [source]
Get the raw data from the boiler.
- Args:
force (bool, optional): if polling for a new value is required. Defaults to False.
- Returns:
dict: dictionary of the data
- Raises:
ConnectionError: if there is a problem connecting to the website AuthenticationError: if a login is made and it fails
- get_hp_state(force: bool = False) HPState [source]
Get the current state of the heat pump
Parameters
- forcebool, optional
if polling for a new value is required, by default False
Returns
- HPState
A HPSate enum corresponding to the current state
- get_operation_mode(force: bool = False) OperationMode [source]
Get the current operation mode
Parameters
- forcebool, optional
if polling for a new value is required, by default False
Returns
- OperationMode
A OperationMode enum corresponding to the current state
- get_target_temperature(force: bool = False) float [source]
Get the target water temperature
Parameters
- forcebool, optional
if polling for a new value is required, by default False
Returns
- float
the target water temperature
- login()[source]
Login to the Ariston website.
- Returns:
None
- Raises:
ConnectionError: if there is a problem connecting to the website AuthenticationError: if the login fails
- set_boost(on: bool)[source]
Set the boost on or off
Parameters
- onbool
True for on, False for off
Returns
None
Raises
- ConnectionError
If there is a problem connecting to the website
- set_onoff(on: bool)[source]
Set the boiler on or off
Parameters
- onbool
True for on, False for off
Returns
None
Raises
- ConnectionError
If there is a problem connecting to the website
- exception ariston_boiler_control.AuthenticationError[source]
Bases:
ConnectionError
Exception raised when authentication fails