PyAiraHome is a comprehensive Python library that provides both cloud-based and Bluetooth Low Energy (BLE) connectivity to Aira Home heat pump systems.
Project description
PyAiraHome
PyAiraHome is a comprehensive Python library that provides both cloud-based and Bluetooth Low Energy (BLE) connectivity to Aira Home heat pump systems.
📝 Table of Contents
🧐 About
PyAiraHome is a comprehensive Python library that enables developers to access Aira Home devices. The library provides seamless integration with Aira's cloud infrastructure via secure gRPC services, enabling remote monitoring, control, and data retrieval from anywhere with internet connectivity. Additionally, it offers direct Bluetooth Low Energy (BLE) communication for local device interaction, better data coverage and complete with message encryption for secure data exchange.
PyAiraHome features an intuitive object-oriented API that supports both raw protobuf responses and convenient Python dictionaries, comprehensive error handling, and detailed type annotations.
🏁 Getting Started
These instructions will get you a copy of the project up and running on your local machine for development. If you prefer an already working system check AiraHome-Dashboard out.
Prerequisites
- Internet connection - Required for cloud-based features and authentication
- Bluetooth Low Energy (BLE) capability - Required for local device communication and full data coverage (ensure you're within range of your Aira Brain)
Installation
Install PyAiraHome directly from PyPI using pip:
$ pip install pyairahome
🎈 Usage
Quick Start
Here's a basic example showing cloud functionality:
from pyairahome import AiraHome
# Initialize the library
aira = AiraHome()
# Cloud authentication
aira.cloud.login_with_credentials("email@example.com", "password")
# Get device information
devices = aira.cloud.get_devices()
device_id = devices["devices"][0]["id"]["value"]
print(f"Found device: {device_id}")
# Get current device state
states = aira.cloud.get_states(device_id)
print(f"Current temperature: {states['heat_pump_states'][0]['current_hot_water_temperature']}")
Cloud API Examples
Authentication and Device Management
# Login with credentials
aira.cloud.login_with_credentials("email@example.com", "password")
# Alternative: Login with existing tokens
# aira.cloud.login_with_tokens("id_token", "access_token", "refresh_token")
# List all devices
devices = aira.cloud.get_devices()
print(f"Found {len(devices['devices'])} devices")
# Get detailed device information
device_details = aira.cloud.get_device_details(device_id)
print(f"Device name: {device_details['name']}")
Monitoring and Control
# Get current device states
states = aira.cloud.get_states(device_id)
print(states)
# Send commands to device
command_result = aira.cloud.send_command(device_id, "Ping")
command_id = command_result['command_id']['value']
# Monitor command progress
for update in aira.cloud.stream_command_progress(command_id):
print(f"Command status: {update}")
Bluetooth Low Energy (BLE) Examples
Device Discovery and Connection
# Discover nearby Aira devices
devices = aira.ble.discover(timeout=5)
print(f"Found {len(devices)} BLE devices")
# Connect to a specific device by UUID
connected = aira.ble.connect_uuid("your-device-uuid-here")
if connected:
print("Successfully connected via BLE")
# Get device configuration
config = aira.ble.get_configuration()
print(f"Device configuration: {config}")
else:
print("Failed to connect")
Working with Raw vs Processed Data
# Get processed data (Python dictionaries)
devices = aira.cloud.get_devices(raw=False) # Default
print(type(devices)) # <class 'dict'>
# Get raw protobuf data
devices_raw = aira.cloud.get_devices(raw=True)
print(type(devices_raw)) # <class 'pyairahome.device.v1.devices_pb2.GetDevicesResponse'>
Complete Example
from pyairahome import AiraHome
import time
# Initialize and authenticate
aira = AiraHome()
aira.cloud.login_with_credentials("email@example.com", "password")
# Get device information
devices = aira.cloud.get_devices()
if devices["devices"]:
device_id = devices["devices"][0]["id"]["value"]
print(f"Working with device: {device_id}")
# Try BLE connection for enhanced data
try:
connected = aira.init_ble()
if connected:
print("BLE connection established - enhanced data available")
additional = aira.ble.get_system_check_state()
print(f"Additional system states: {additional}")
except Exception as e:
print(f"BLE connection failed: {e}")
print("Continuing with cloud-only mode...")
# Monitor device state
states = aira.cloud.get_states(device_id)
print(f"Device status: {states}")
else:
print("No devices found")
Note: Replace
"email@example.com"and"password"with your actual Aira Home credentials. For BLE functionality, ensure you're within range of your Aira Brain.
📋 Todo(s)
- Implement BLE commands functionality
- Replace short comments with more exhaustive ones
- Create an actual documentation with more examples
Suggestions and contributions are welcome! Feel free to open an issue or pull request with your ideas.
⚠️ Disclaimer
PyAiraHome is an independent, open-source software library developed for interacting with Aira Home heat pumps via their app gRPC APIs and Bluetooth Low Energy protocols. This project is not affiliated with, endorsed by, sponsored by, or associated with Aira Home or any of its subsidiaries, affiliates, or partners.
Important Legal Notice
- 🔒 This project is not an official product of Aira Home
- ⚖️ Use of this library does not imply any compatibility, support, or approval from Aira Home
- 🏷️ All trademarks, service marks, and company names mentioned herein are the property of their respective owners
- ⚠️ Use of this library is at your own risk - I'm not responsible for any damages, malfunctions, warranty voids, or issues arising from its use
- 🛡️ This software is provided "AS IS" without warranty of any kind, express or implied
- 🔍 No proprietary code, trade secrets, or copyrighted materials from Aira Home have been used in the development of this library.
By using this library, you acknowledge that you understand and accept these terms and any associated risks.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyairahome-2.0.5.tar.gz.
File metadata
- Download URL: pyairahome-2.0.5.tar.gz
- Upload date:
- Size: 101.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8015cd293554201e8965f5239d40bc62f03a330f3acb29f53137d3bad650c467
|
|
| MD5 |
ae72f32f1ef5bb19d96fc53e62d9a977
|
|
| BLAKE2b-256 |
3fc6bd20b5e74ccab694f91102824d99e1026b602930a8c16aa2cb56c3902a3c
|
Provenance
The following attestation bundles were made for pyairahome-2.0.5.tar.gz:
Publisher:
python-publish.yml on Invy55/pyairahome
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyairahome-2.0.5.tar.gz -
Subject digest:
8015cd293554201e8965f5239d40bc62f03a330f3acb29f53137d3bad650c467 - Sigstore transparency entry: 597859560
- Sigstore integration time:
-
Permalink:
Invy55/pyairahome@682be4068dfbd4fbd0349165abc7c7a48b2662c0 -
Branch / Tag:
refs/tags/2.0.5 - Owner: https://github.com/Invy55
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@682be4068dfbd4fbd0349165abc7c7a48b2662c0 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pyairahome-2.0.5-py3-none-any.whl.
File metadata
- Download URL: pyairahome-2.0.5-py3-none-any.whl
- Upload date:
- Size: 301.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d2ccda9826189870eb24d4f42f62125d686cd27d20bf5a53608f8c3a16aed88
|
|
| MD5 |
02a39619d13b00f9c68ecde90d43694a
|
|
| BLAKE2b-256 |
3b00783ac5d5c84ac24254f69443ebb3258b5b0be22a76e64cc0117e76dc8942
|
Provenance
The following attestation bundles were made for pyairahome-2.0.5-py3-none-any.whl:
Publisher:
python-publish.yml on Invy55/pyairahome
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyairahome-2.0.5-py3-none-any.whl -
Subject digest:
9d2ccda9826189870eb24d4f42f62125d686cd27d20bf5a53608f8c3a16aed88 - Sigstore transparency entry: 597859561
- Sigstore integration time:
-
Permalink:
Invy55/pyairahome@682be4068dfbd4fbd0349165abc7c7a48b2662c0 -
Branch / Tag:
refs/tags/2.0.5 - Owner: https://github.com/Invy55
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@682be4068dfbd4fbd0349165abc7c7a48b2662c0 -
Trigger Event:
release
-
Statement type: