Metadata-Version: 2.5
Name: innosonix
Version: 0.2.0
Summary: Async Python client for Innosonix MAXX amplifiers
Project-URL: Homepage, https://github.com/mokonack/innosonix-ha
Project-URL: Repository, https://github.com/mokonack/innosonix-ha
Project-URL: Issues, https://github.com/mokonack/innosonix-ha/issues
Author: Mokonack
License: Apache-2.0
License-File: LICENSE
Keywords: amplifier,audio,innosonix,rest-api
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Home Automation
Requires-Python: >=3.10
Requires-Dist: aiohttp>=3.9
Description-Content-Type: text/markdown

# Innosonix Amplifier integration for Home Assistant

[![My Home Assistant](https://my.home-assistant.io/badge.svg)](https://my.home-assistant.io/redirect/config_flow_start/?domain=innosonix)
[![PyPI](https://img.shields.io/pypi/v/innosonix)](https://pypi.org/project/innosonix/)

A Home Assistant integration that reads status information from Innosonix
amplifiers (MAXX series) over the built-in REST API, built on top of the
standalone [`innosonix`](https://pypi.org/project/innosonix/) Python client
library published on PyPI.

## Features

- Device info sensors: model, serial number, software revision, channel count
- Device sensors: master volume, PSU voltage, PSU load
- Device health: error / warning problem binary sensors
- Per-channel switches: amplifier enable and mute (all channels)
- Per-channel volume: number entity in dB (all channels)
- Configurable API key (defaults to the key shipped with the amplifier)
- Local polling, no cloud required

## The Python client library

The `innosonix` package (`src/innosonix`) is a standalone async client for the
Innosonix REST API and works independently of Home Assistant:

```bash
pip install innosonix
```

```python
import asyncio
import aiohttp
from innosonix import InnosonixApiClient

async def main():
    async with aiohttp.ClientSession() as session:
        client = InnosonixApiClient("192.168.1.50", session=session)
        device = await client.get_device_infos()
        print(device.model_name, device.sw_revision)
        print("master volume (dB):", await client.get_master_volume())
        print("psu:", await client.get_psu_status())
        channels = await client.get_channels()
        for ch in channels:
            print(ch.channel_id, ch.name, ch.amp_enabled, ch.muted, ch.volume)
        await client.set_channel_muted(1, True)
        await client.set_channel_volume(1, -6.0)

asyncio.run(main())
```

The Home Assistant integration lists the library as a requirement, so Home
Assistant installs it from PyPI automatically during setup.

## Installation

### HACS

1. Open HACS in Home Assistant.
2. Go to **Integrations** → **⋯** → **Custom Repositories**.
3. Add this repository's URL and choose the **Integration** category.
4. Find **Innosonix Amplifier** in HACS and install it.
5. Restart Home Assistant.

### Manual

Copy the `custom_components/innosonix` folder into the `custom_components`
folder of your Home Assistant configuration directory, then restart Home
Assistant.

## Setup

1. In Home Assistant, open **Settings** → **Devices & Services** → **Add Integration**.
2. Search for **Innosonix Amplifier**.
3. Enter the host name or IP address of your amplifier (e.g. `192.168.1.50`).
4. Optionally enter a custom API key.
5. Finish the flow.

## Requirements

- Home Assistant 2024.12 or newer