hass-inspirair


Namehass-inspirair JSON
Version 0.6.0 PyPI version JSON
download
home_pagehttps://the-smartest-home.github.io/hass_inspirair/
SummaryNone
upload_time2024-11-04 20:04:04
maintainerNone
docs_urlNone
authorKraus, Vadim
requires_python<3.14,>=3.9
licenseOSI Approved :: Apache Software License
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # hass-inspirair

![GitHub CI](https://github.com/The-Smartest-Home/hass_inspirair/actions/workflows/test.yaml/badge.svg)

[![python](https://img.shields.io/badge/Python-3.10-3776AB.svg?style=flat&logo=python&logoColor=white)](https://www.python.org)
[![python](https://img.shields.io/badge/Python-3.11-3776AB.svg?style=flat&logo=python&logoColor=white)](https://www.python.org)
[![python](https://img.shields.io/badge/Python-3.12-3776AB.svg?style=flat&logo=python&logoColor=white)](https://www.python.org)
[![python](https://img.shields.io/badge/Python-3.13-3776AB.svg?style=flat&logo=python&logoColor=white)](https://www.python.org)

[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)

A python application that connects to the ventilation system `InspirAir® Home` from `Aldes` via ModBus and exposes it as a device for [Home Assistant](https://www.home-assistant.io/) .

<details>
<summary>Schematics of dataflow</summary>

```mermaid

graph LR
    P(hass-inspirair) <-- MQTT --> M(MQTT Broker)
    I[InspirAir Home] <-- ModBus --> P
    HM(Home Assistant \n MQTT Integration) <--MQTT--> M
    H[Home Assistant] <----> HM
```

</details>

Only the ventilation mode is currently writable. However, it takes some time before the value changes after a write command.
Since the register will stay at its previous value until the target state is reached.

Following features are implemented:

<details>
  <summary>1. Register after starting up</summary>
  
```mermaid
sequenceDiagram
    participant H as Home Assistant(MQTT)
    participant L as hass-inspirair
    participant I as InspirAir
    
    
    L->>+I: read_holding_registers
    activate L
    L-->>L: creat config
    
    L->>-H: register <prefix>/<sensor_type>/<object_id>/<device_serial>/config
```
</details>

<details>
<summary>2. Continues updates</summary>

```mermaid
sequenceDiagram

    participant H as Home Assistant(MQTT)
    participant L as hass-inspirair
    participant I as InspirAir


    L->>I: read_holding_registers
    activate L
    L->>L: parse result
    L->>H: publish <prefix>/climate/<device_serial>/state
    L->>L: sleep for <polling interval>
    deactivate L


```

</details>

<details>
<summary>3. React on Home Assistant Inputs</summary>

```mermaid
sequenceDiagram
    participant H as Home Assistant(MQTT)
    participant L as hass-inspirair
    participant I as InspirAir

    H->>L: publish "<prefix>/select/<object_id>/<device_serial>/set"
     activate L
    L->>I: write_registers
    L->>I: read_holding_registers

    L->>L: parse result
    L->>H: publish <prefix>/climate/<device_serial>/state
    deactivate L

```

</details>

<details>
<summary>4. React on Home Assistant MQTT lifecycle events</summary>

```mermaid
sequenceDiagram

    participant H as Home Assistant(MQTT)
    participant L as hass-inspirair
    participant I as InspirAir

    H->>L: publish "<prefix>/status" payload: "online"
    activate L
    L->>+I: read_holding_registers

    L-->>L: creat config

    L->>-H: register <prefix>/<sensor_type>/<object_id>/<device_serial>/config

```

</details>
<details>
<summary>5. Multilanguage Support</summary>
Default language is german, however, an english translation is available.
</details>

## Supported Models

In theory this application should work with any `InspirAir® Home` Ventilation system.

Currently, only the following was actually tested:

- InspirAIR Home SC 370

## Usage

Configure a `config.ini` file based on your requirements (or use environment variables) .
See [config.ini](config-ini.md) for configuration options which can also be set via environment variables [Config Values](#config).

```bash
pip intall hass-inspirair
ha-inspirair -c ./config.ini
```

For are more exhaustive usage tutorial see [docs/tutorial/index.md](#tutorial/index).

## Simulator/Testing

The compose stack includes a simulator that exposes the relevante registers via Modbus-TCP. The presented values are a pure mock.
However, this stack can be used to try out the behavior of the MQTT discovery.

1. Run `docker-compose up`
2. goto [http://localhost:8123](http://localhost:8123)
3. Setup a user
4. Add the MQTT Integration (`host=mqtt`, no further credentials)
5. A device should show up


            

Raw data

            {
    "_id": null,
    "home_page": "https://the-smartest-home.github.io/hass_inspirair/",
    "name": "hass-inspirair",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.14,>=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": "Kraus, Vadim",
    "author_email": "38394456+VadimKraus@users.noreply.github.com",
    "download_url": "https://files.pythonhosted.org/packages/d0/c7/af0df80b5328de3df4093fd1ffd515860814e7a35e39ee47977dadf29b18/hass_inspirair-0.6.0.tar.gz",
    "platform": null,
    "description": "# hass-inspirair\n\n![GitHub CI](https://github.com/The-Smartest-Home/hass_inspirair/actions/workflows/test.yaml/badge.svg)\n\n[![python](https://img.shields.io/badge/Python-3.10-3776AB.svg?style=flat&logo=python&logoColor=white)](https://www.python.org)\n[![python](https://img.shields.io/badge/Python-3.11-3776AB.svg?style=flat&logo=python&logoColor=white)](https://www.python.org)\n[![python](https://img.shields.io/badge/Python-3.12-3776AB.svg?style=flat&logo=python&logoColor=white)](https://www.python.org)\n[![python](https://img.shields.io/badge/Python-3.13-3776AB.svg?style=flat&logo=python&logoColor=white)](https://www.python.org)\n\n[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)\n\nA python application that connects to the ventilation system `InspirAir\u00ae Home` from `Aldes` via ModBus and exposes it as a device for [Home Assistant](https://www.home-assistant.io/) .\n\n<details>\n<summary>Schematics of dataflow</summary>\n\n```mermaid\n\ngraph LR\n    P(hass-inspirair) <-- MQTT --> M(MQTT Broker)\n    I[InspirAir Home] <-- ModBus --> P\n    HM(Home Assistant \\n MQTT Integration) <--MQTT--> M\n    H[Home Assistant] <----> HM\n```\n\n</details>\n\nOnly the ventilation mode is currently writable. However, it takes some time before the value changes after a write command.\nSince the register will stay at its previous value until the target state is reached.\n\nFollowing features are implemented:\n\n<details>\n  <summary>1. Register after starting up</summary>\n  \n```mermaid\nsequenceDiagram\n    participant H as Home Assistant(MQTT)\n    participant L as hass-inspirair\n    participant I as InspirAir\n    \n    \n    L->>+I: read_holding_registers\n    activate L\n    L-->>L: creat config\n    \n    L->>-H: register <prefix>/<sensor_type>/<object_id>/<device_serial>/config\n```\n</details>\n\n<details>\n<summary>2. Continues updates</summary>\n\n```mermaid\nsequenceDiagram\n\n    participant H as Home Assistant(MQTT)\n    participant L as hass-inspirair\n    participant I as InspirAir\n\n\n    L->>I: read_holding_registers\n    activate L\n    L->>L: parse result\n    L->>H: publish <prefix>/climate/<device_serial>/state\n    L->>L: sleep for <polling interval>\n    deactivate L\n\n\n```\n\n</details>\n\n<details>\n<summary>3. React on Home Assistant Inputs</summary>\n\n```mermaid\nsequenceDiagram\n    participant H as Home Assistant(MQTT)\n    participant L as hass-inspirair\n    participant I as InspirAir\n\n    H->>L: publish \"<prefix>/select/<object_id>/<device_serial>/set\"\n     activate L\n    L->>I: write_registers\n    L->>I: read_holding_registers\n\n    L->>L: parse result\n    L->>H: publish <prefix>/climate/<device_serial>/state\n    deactivate L\n\n```\n\n</details>\n\n<details>\n<summary>4. React on Home Assistant MQTT lifecycle events</summary>\n\n```mermaid\nsequenceDiagram\n\n    participant H as Home Assistant(MQTT)\n    participant L as hass-inspirair\n    participant I as InspirAir\n\n    H->>L: publish \"<prefix>/status\" payload: \"online\"\n    activate L\n    L->>+I: read_holding_registers\n\n    L-->>L: creat config\n\n    L->>-H: register <prefix>/<sensor_type>/<object_id>/<device_serial>/config\n\n```\n\n</details>\n<details>\n<summary>5. Multilanguage Support</summary>\nDefault language is german, however, an english translation is available.\n</details>\n\n## Supported Models\n\nIn theory this application should work with any `InspirAir\u00ae Home` Ventilation system.\n\nCurrently, only the following was actually tested:\n\n- InspirAIR Home SC 370\n\n## Usage\n\nConfigure a `config.ini` file based on your requirements (or use environment variables) .\nSee [config.ini](config-ini.md) for configuration options which can also be set via environment variables [Config Values](#config).\n\n```bash\npip intall hass-inspirair\nha-inspirair -c ./config.ini\n```\n\nFor are more exhaustive usage tutorial see [docs/tutorial/index.md](#tutorial/index).\n\n## Simulator/Testing\n\nThe compose stack includes a simulator that exposes the relevante registers via Modbus-TCP. The presented values are a pure mock.\nHowever, this stack can be used to try out the behavior of the MQTT discovery.\n\n1. Run `docker-compose up`\n2. goto [http://localhost:8123](http://localhost:8123)\n3. Setup a user\n4. Add the MQTT Integration (`host=mqtt`, no further credentials)\n5. A device should show up\n\n",
    "bugtrack_url": null,
    "license": "OSI Approved :: Apache Software License",
    "summary": null,
    "version": "0.6.0",
    "project_urls": {
        "Documentation": "https://the-smartest-home.github.io/hass_inspirair/",
        "Homepage": "https://the-smartest-home.github.io/hass_inspirair/",
        "Repository": "https://github.com/The-Smartest-Home/hass_inspirair"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "21aa1aa5ea4752648fab585f52bf82640c6e36d5a32f0ecb87657273e8407c35",
                "md5": "971eeaaa06022d5ae1f1fc089b7cc83d",
                "sha256": "0d910b863a0e2d6eb799cc4f0811b0fc551379adf98f817d105f95bbba5e9ff5"
            },
            "downloads": -1,
            "filename": "hass_inspirair-0.6.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "971eeaaa06022d5ae1f1fc089b7cc83d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.14,>=3.9",
            "size": 26279,
            "upload_time": "2024-11-04T20:04:02",
            "upload_time_iso_8601": "2024-11-04T20:04:02.459607Z",
            "url": "https://files.pythonhosted.org/packages/21/aa/1aa5ea4752648fab585f52bf82640c6e36d5a32f0ecb87657273e8407c35/hass_inspirair-0.6.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d0c7af0df80b5328de3df4093fd1ffd515860814e7a35e39ee47977dadf29b18",
                "md5": "a7e2f6997e4b0a5cc1b812600a3fbef7",
                "sha256": "cead4fc2aa4cc2ec4efecddbf4302002e7bd7ed674c49f5b6b877d11d61fc28b"
            },
            "downloads": -1,
            "filename": "hass_inspirair-0.6.0.tar.gz",
            "has_sig": false,
            "md5_digest": "a7e2f6997e4b0a5cc1b812600a3fbef7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.14,>=3.9",
            "size": 20592,
            "upload_time": "2024-11-04T20:04:04",
            "upload_time_iso_8601": "2024-11-04T20:04:04.161582Z",
            "url": "https://files.pythonhosted.org/packages/d0/c7/af0df80b5328de3df4093fd1ffd515860814e7a35e39ee47977dadf29b18/hass_inspirair-0.6.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-04 20:04:04",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "The-Smartest-Home",
    "github_project": "hass_inspirair",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "hass-inspirair"
}
        
Elapsed time: 0.50733s