pyairahome


Namepyairahome JSON
Version 2.1.0 PyPI version JSON
download
home_pageNone
SummaryPyAiraHome is a comprehensive Python library that provides both cloud-based and Bluetooth Low Energy (BLE) connectivity to Aira Home heat pump systems.
upload_time2025-10-25 20:58:34
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords python aira airahome aira home api wrapper heat pump ble grpc
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <h3 align="center">PyAiraHome</h3>

<div align="center">

  ![Status](https://img.shields.io/badge/status-active-success)
  [![PyPi](https://img.shields.io/pypi/v/pyairahome)](https://pypi.org/project/pyairahome/)
  [![GitHub Issues](https://img.shields.io/github/issues/invy55/pyairahome)](https://github.com/invy55/pyairahome/issues)
  [![GitHub Pull Requests](https://img.shields.io/github/issues-pr/invy55/pyairahome)](https://github.com/invy55/pyairahome/pulls)
  ![GitHub License](https://img.shields.io/github/license/invy55/pyairahome)
</div>

---

<p align="center"> PyAiraHome is a comprehensive Python library that provides both cloud-based and Bluetooth Low Energy (BLE) connectivity to Aira Home heat pump systems.
    <br> 
</p>

## 📝 Table of Contents
- [About](#about)
- [Getting Started](#getting_started)
- [Usage](#usage)
- [TODO](#todo)
- [Disclaimer](#disclaimer)

## 🧐 About <a name = "about"></a>
**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 <a name = "getting_started"></a>
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](https://github.com/invy55/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:

```shell
$ pip install pyairahome
```

## 🎈 Usage <a name="usage"></a>

### Quick Start

Here's a basic example showing cloud functionality:

```python
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

```python
# 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

```python
# 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

```python
# 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

```python
# 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

```python
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) <a name = "todo"></a>

- [ ] 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 <a name = "disclaimer"></a>

**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.**

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pyairahome",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "\"Invy55 (Marco)\" <marco@invy55.win>",
    "keywords": "python, aira, airahome, aira home, api, wrapper, heat pump, ble, grpc",
    "author": null,
    "author_email": "\"Invy55 (Marco)\" <marco@invy55.win>",
    "download_url": "https://files.pythonhosted.org/packages/3c/e3/bbe4fc87f65af365f61279f57b5f6557f72b49af31114300d1e35ec61e0f/pyairahome-2.1.0.tar.gz",
    "platform": null,
    "description": "<h3 align=\"center\">PyAiraHome</h3>\n\n<div align=\"center\">\n\n  ![Status](https://img.shields.io/badge/status-active-success)\n  [![PyPi](https://img.shields.io/pypi/v/pyairahome)](https://pypi.org/project/pyairahome/)\n  [![GitHub Issues](https://img.shields.io/github/issues/invy55/pyairahome)](https://github.com/invy55/pyairahome/issues)\n  [![GitHub Pull Requests](https://img.shields.io/github/issues-pr/invy55/pyairahome)](https://github.com/invy55/pyairahome/pulls)\n  ![GitHub License](https://img.shields.io/github/license/invy55/pyairahome)\n</div>\n\n---\n\n<p align=\"center\"> PyAiraHome is a comprehensive Python library that provides both cloud-based and Bluetooth Low Energy (BLE) connectivity to Aira Home heat pump systems.\n    <br> \n</p>\n\n## \ud83d\udcdd Table of Contents\n- [About](#about)\n- [Getting Started](#getting_started)\n- [Usage](#usage)\n- [TODO](#todo)\n- [Disclaimer](#disclaimer)\n\n## \ud83e\uddd0 About <a name = \"about\"></a>\n**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.\n\nPyAiraHome features an intuitive **object-oriented API** that supports both raw protobuf responses and convenient Python dictionaries, comprehensive error handling, and detailed type annotations.\n\n## \ud83c\udfc1 Getting Started <a name = \"getting_started\"></a>\nThese 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](https://github.com/invy55/airahome-dashboard) out.\n\n### Prerequisites\n\n- **Internet connection** - Required for cloud-based features and authentication\n- **Bluetooth Low Energy (BLE) capability** - Required for local device communication and full data coverage (ensure you're within range of your Aira Brain)\n\n### Installation\n\nInstall PyAiraHome directly from PyPI using pip:\n\n```shell\n$ pip install pyairahome\n```\n\n## \ud83c\udf88 Usage <a name=\"usage\"></a>\n\n### Quick Start\n\nHere's a basic example showing cloud functionality:\n\n```python\nfrom pyairahome import AiraHome\n\n# Initialize the library\naira = AiraHome()\n\n# Cloud authentication\naira.cloud.login_with_credentials(\"email@example.com\", \"password\")\n\n# Get device information\ndevices = aira.cloud.get_devices()\ndevice_id = devices[\"devices\"][0][\"id\"][\"value\"]\nprint(f\"Found device: {device_id}\")\n\n# Get current device state\nstates = aira.cloud.get_states(device_id)\nprint(f\"Current temperature: {states['heat_pump_states'][0]['current_hot_water_temperature']}\")\n```\n\n### Cloud API Examples\n\n#### Authentication and Device Management\n\n```python\n# Login with credentials\naira.cloud.login_with_credentials(\"email@example.com\", \"password\")\n\n# Alternative: Login with existing tokens\n# aira.cloud.login_with_tokens(\"id_token\", \"access_token\", \"refresh_token\")\n\n# List all devices\ndevices = aira.cloud.get_devices()\nprint(f\"Found {len(devices['devices'])} devices\")\n\n# Get detailed device information\ndevice_details = aira.cloud.get_device_details(device_id)\nprint(f\"Device name: {device_details['name']}\")\n```\n\n#### Monitoring and Control\n\n```python\n# Get current device states\nstates = aira.cloud.get_states(device_id)\nprint(states)\n\n# Send commands to device\ncommand_result = aira.cloud.send_command(device_id, \"Ping\")\ncommand_id = command_result['command_id']['value']\n\n# Monitor command progress\nfor update in aira.cloud.stream_command_progress(command_id):\n    print(f\"Command status: {update}\")\n```\n\n### Bluetooth Low Energy (BLE) Examples\n\n#### Device Discovery and Connection\n\n```python\n# Discover nearby Aira devices\ndevices = aira.ble.discover(timeout=5)\nprint(f\"Found {len(devices)} BLE devices\")\n\n# Connect to a specific device by UUID\nconnected = aira.ble.connect_uuid(\"your-device-uuid-here\")\nif connected:\n    print(\"Successfully connected via BLE\")\n    \n    # Get device configuration\n    config = aira.ble.get_configuration()\n    print(f\"Device configuration: {config}\")\nelse:\n    print(\"Failed to connect\")\n```\n\n#### Working with Raw vs Processed Data\n\n```python\n# Get processed data (Python dictionaries)\ndevices = aira.cloud.get_devices(raw=False)  # Default\nprint(type(devices))  # <class 'dict'>\n\n# Get raw protobuf data\ndevices_raw = aira.cloud.get_devices(raw=True)\nprint(type(devices_raw))  # <class 'pyairahome.device.v1.devices_pb2.GetDevicesResponse'>\n```\n\n### Complete Example\n\n```python\nfrom pyairahome import AiraHome\nimport time\n\n# Initialize and authenticate\naira = AiraHome()\naira.cloud.login_with_credentials(\"email@example.com\", \"password\")\n\n# Get device information\ndevices = aira.cloud.get_devices()\nif devices[\"devices\"]:\n    device_id = devices[\"devices\"][0][\"id\"][\"value\"]\n    print(f\"Working with device: {device_id}\")\n    \n    # Try BLE connection for enhanced data\n    try:\n        connected = aira.init_ble()\n        if connected:\n            print(\"BLE connection established - enhanced data available\")\n            additional = aira.ble.get_system_check_state()\n            print(f\"Additional system states: {additional}\")\n    except Exception as e:\n        print(f\"BLE connection failed: {e}\")\n        print(\"Continuing with cloud-only mode...\")\n    \n    # Monitor device state\n    states = aira.cloud.get_states(device_id)\n    print(f\"Device status: {states}\")\n    \nelse:\n    print(\"No devices found\")\n```\n\n> **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.\n\n## \ud83d\udccb Todo(s) <a name = \"todo\"></a>\n\n- [ ] Implement BLE commands functionality\n- [ ] Replace short comments with more exhaustive ones\n- [ ] Create an actual documentation with more examples\n\nSuggestions and contributions are welcome! Feel free to open an issue or pull request with your ideas.\n\n## \u26a0\ufe0f Disclaimer <a name = \"disclaimer\"></a>\n\n**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.\n\n### Important Legal Notice\n\n- \ud83d\udd12 This project is **not an official product** of Aira Home\n- \u2696\ufe0f Use of this library does **not imply any compatibility, support, or approval** from Aira Home\n- \ud83c\udff7\ufe0f All trademarks, service marks, and company names mentioned herein are the **property of their respective owners**\n- \u26a0\ufe0f **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\n- \ud83d\udee1\ufe0f This software is provided **\"AS IS\"** without warranty of any kind, express or implied\n- \ud83d\udd0d No proprietary code, trade secrets, or copyrighted materials from Aira Home have been used in the development of this library.\n\n**By using this library, you acknowledge that you understand and accept these terms and any associated risks.**\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "PyAiraHome is a comprehensive Python library that provides both cloud-based and Bluetooth Low Energy (BLE) connectivity to Aira Home heat pump systems.",
    "version": "2.1.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/Invy55/pyairahome/issues",
        "Documentation": "https://github.com/Invy55/pyairahome#readme",
        "Homepage": "https://github.com/Invy55/pyairahome",
        "Repository": "https://github.com/Invy55/pyairahome"
    },
    "split_keywords": [
        "python",
        " aira",
        " airahome",
        " aira home",
        " api",
        " wrapper",
        " heat pump",
        " ble",
        " grpc"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "a6af404049430d48e97b29bfb580d8f797454bc60018a8bf685107617f52cab3",
                "md5": "1d519d42d6d21066d68db719f4a0c1f7",
                "sha256": "5c04f51d5376fb23d55e68b483cb939493c7c033dbd21c91490b8d9d138ccc51"
            },
            "downloads": -1,
            "filename": "pyairahome-2.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1d519d42d6d21066d68db719f4a0c1f7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 309938,
            "upload_time": "2025-10-25T20:58:32",
            "upload_time_iso_8601": "2025-10-25T20:58:32.691417Z",
            "url": "https://files.pythonhosted.org/packages/a6/af/404049430d48e97b29bfb580d8f797454bc60018a8bf685107617f52cab3/pyairahome-2.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "3ce3bbe4fc87f65af365f61279f57b5f6557f72b49af31114300d1e35ec61e0f",
                "md5": "418c607f7f9cd11d7426d90027e39efe",
                "sha256": "8d06c5e52d5e6166cd481ef88e09814dfc7354d1dd391b3d1f7c48b07925918f"
            },
            "downloads": -1,
            "filename": "pyairahome-2.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "418c607f7f9cd11d7426d90027e39efe",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 113066,
            "upload_time": "2025-10-25T20:58:34",
            "upload_time_iso_8601": "2025-10-25T20:58:34.512592Z",
            "url": "https://files.pythonhosted.org/packages/3c/e3/bbe4fc87f65af365f61279f57b5f6557f72b49af31114300d1e35ec61e0f/pyairahome-2.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-25 20:58:34",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Invy55",
    "github_project": "pyairahome",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pyairahome"
}
        
Elapsed time: 4.36529s