incomfort-client


Nameincomfort-client JSON
Version 0.6.7 PyPI version JSON
download
home_pageNone
SummaryAn aiohttp-based client for Intergas InComfort/InTouch Lan2RF systems.
upload_time2025-01-22 21:05:19
maintainerJan Bouwhuis
docs_urlNone
authorJan Bouwhuis
requires_python<4.0,>=3.9
licenseMIT
keywords incomfort api async client
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![PyPI version](https://badge.fury.io/py/incomfort-client.svg)](https://badge.fury.io/py/incomfort-client)

# incomfort-client

Python client library for **Intergas boilers** accessible via a **Lan2RF gateway** by abstracting its HTTP API. It includes a basic CLI to demonstrate how to use the library.

This library was previously called **intouch-client**, as it is known in the UK as **InTouch**, but in mainland Europe (especially the Netherlands, where is it popular) it is known as **Incomfort**.

It is written for Python v3.9+. It is available as a [PyPi package](https://pypi.org/project/incomfort-client/).

With many thanks, the code was refactored by @zxdavb and maintained for about 5 years, and maintenance now has been taken over by @jbouwh to be able to continue support.

The library is used as backend code for the [Intergas InComfort/Intouch Lan2RF gateway](https://www.home-assistant.io/integrations/incomfort/) integration with [Home Assistant](https://www.home-assistant.io/).

### Porting from syncio libraries

This library is based upon https://github.com/bwesterb/incomfort, but uses **aiohttp** rather than synchronous I/O (such as **requests** or **httplib**).

Where possible, it uses the same methods and properties as **bwesterb/incomfort**, but with the following differences:

- **`Gateway`** class

  - added kwargs: `username`, `password` (used for newer versions of firmware)

- **`Heater`** class

  - renamed: `is_burning`, `is_failed`, `is_pumping`, `is_tapping`
  - moved: `room_temp`, `setpoint`, `setpoint_override`, `set` to **`Room`** class
  - new/added: `update`, `status`, `rooms`

- **`Room`** class has been added, and some methods moved in from **`Heater`**
  - same name: `room_temp`, `setpoint`
  - renamed: `override`, `set_override`
  - new/added: `status`

### Basic CLI included

There is a very basic CLI (this output has been formatted for readability):

```bash
(venv) root@hostname:~/$ python inclient.py ${HOSTNAME}
{
  'display_code': 126,
  'display_text': 'standby',
  'fault_code': 0,

  'is_burning': False,
  'is_failed': False,
  'is_pumping': False,
  'is_tapping': False,

  'heater_temp': 31.22,
  'tap_temp': 27.91,
  'pressure': 1.23,
  'serial_no': '175t23072',

  'nodenr': 200,
  'rf_message_rssi': 38,
  'rfstatus_cntr': 0,

  'room_1': {'room_temp': 26.4, 'setpoint': 19.5, 'override': 19.5},
  'room_2': {'room_temp': None, 'setpoint': None, 'override': 19.0}
}
```

### QA/CI via CircleCI

QA includes comparing JSON from **cURL** with output from this app using **diff** (note the `--raw` switch):

```bash
(venv) root@hostname:~/$ curl -X GET http://${HOSTNAME}/data.json?heater=0 | \
    python -c "import sys, json; print(json.load(sys.stdin))" > a.out

(venv) root@hostname:~/$ python inclient.py ${HOSTNAME} --raw > b.out

(venv) root@hostname:~/$ diff a.out b.out
```

Newer versions of the gateway require authentication:

```bash
(venv) root@hostname:~/$ python inclient.py ${HOSTNAME} -u ${USER} -p ${PASS}

(venv) root@hostname:~/$ curl --user ${USER}:${PASS} -X GET http://${HOSTNAME}/protect/data.json?heater=0
```

> Note that at the moment CircleCI is not active.


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "incomfort-client",
    "maintainer": "Jan Bouwhuis",
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": "jan@jbsoft.nl",
    "keywords": "incomfort, api, async, client",
    "author": "Jan Bouwhuis",
    "author_email": "jan@jbsoft.nl",
    "download_url": "https://files.pythonhosted.org/packages/11/d3/d8e30f11701cccc1d8c7246f633b86cd99cc2f28392b9c8683cb66adbb04/incomfort_client-0.6.7.tar.gz",
    "platform": null,
    "description": "[![PyPI version](https://badge.fury.io/py/incomfort-client.svg)](https://badge.fury.io/py/incomfort-client)\n\n# incomfort-client\n\nPython client library for **Intergas boilers** accessible via a **Lan2RF gateway** by abstracting its HTTP API. It includes a basic CLI to demonstrate how to use the library.\n\nThis library was previously called **intouch-client**, as it is known in the UK as **InTouch**, but in mainland Europe (especially the Netherlands, where is it popular) it is known as **Incomfort**.\n\nIt is written for Python v3.9+. It is available as a [PyPi package](https://pypi.org/project/incomfort-client/).\n\nWith many thanks, the code was refactored by @zxdavb and maintained for about 5 years, and maintenance now has been taken over by @jbouwh to be able to continue support.\n\nThe library is used as backend code for the [Intergas InComfort/Intouch Lan2RF gateway](https://www.home-assistant.io/integrations/incomfort/) integration with [Home Assistant](https://www.home-assistant.io/).\n\n### Porting from syncio libraries\n\nThis library is based upon https://github.com/bwesterb/incomfort, but uses **aiohttp** rather than synchronous I/O (such as **requests** or **httplib**).\n\nWhere possible, it uses the same methods and properties as **bwesterb/incomfort**, but with the following differences:\n\n- **`Gateway`** class\n\n  - added kwargs: `username`, `password` (used for newer versions of firmware)\n\n- **`Heater`** class\n\n  - renamed: `is_burning`, `is_failed`, `is_pumping`, `is_tapping`\n  - moved: `room_temp`, `setpoint`, `setpoint_override`, `set` to **`Room`** class\n  - new/added: `update`, `status`, `rooms`\n\n- **`Room`** class has been added, and some methods moved in from **`Heater`**\n  - same name: `room_temp`, `setpoint`\n  - renamed: `override`, `set_override`\n  - new/added: `status`\n\n### Basic CLI included\n\nThere is a very basic CLI (this output has been formatted for readability):\n\n```bash\n(venv) root@hostname:~/$ python inclient.py ${HOSTNAME}\n{\n  'display_code': 126,\n  'display_text': 'standby',\n  'fault_code': 0,\n\n  'is_burning': False,\n  'is_failed': False,\n  'is_pumping': False,\n  'is_tapping': False,\n\n  'heater_temp': 31.22,\n  'tap_temp': 27.91,\n  'pressure': 1.23,\n  'serial_no': '175t23072',\n\n  'nodenr': 200,\n  'rf_message_rssi': 38,\n  'rfstatus_cntr': 0,\n\n  'room_1': {'room_temp': 26.4, 'setpoint': 19.5, 'override': 19.5},\n  'room_2': {'room_temp': None, 'setpoint': None, 'override': 19.0}\n}\n```\n\n### QA/CI via CircleCI\n\nQA includes comparing JSON from **cURL** with output from this app using **diff** (note the `--raw` switch):\n\n```bash\n(venv) root@hostname:~/$ curl -X GET http://${HOSTNAME}/data.json?heater=0 | \\\n    python -c \"import sys, json; print(json.load(sys.stdin))\" > a.out\n\n(venv) root@hostname:~/$ python inclient.py ${HOSTNAME} --raw > b.out\n\n(venv) root@hostname:~/$ diff a.out b.out\n```\n\nNewer versions of the gateway require authentication:\n\n```bash\n(venv) root@hostname:~/$ python inclient.py ${HOSTNAME} -u ${USER} -p ${PASS}\n\n(venv) root@hostname:~/$ curl --user ${USER}:${PASS} -X GET http://${HOSTNAME}/protect/data.json?heater=0\n```\n\n> Note that at the moment CircleCI is not active.\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "An aiohttp-based client for Intergas InComfort/InTouch Lan2RF systems.",
    "version": "0.6.7",
    "project_urls": {
        "Bug Tracker": "https://github.com/jbouwh/incomfort-client/issues",
        "Changelog": "https://github.com/jbouwh/incomfort-client/releases",
        "Documentation": "https://github.com/jbouwh/incomfort-client",
        "Homepage": "https://github.com/jbouwh/incomfort-client",
        "Repository": "https://github.com/jbouwh/incomfort-client"
    },
    "split_keywords": [
        "incomfort",
        " api",
        " async",
        " client"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "a7207ba2d76f8f48d6b659ec1de564793f9ddfa9349d6d9a36d389ade4b98cac",
                "md5": "954db5dd993f866780abafe9b6a57b4f",
                "sha256": "7ac031e44799ce5dcf6467b425ce3e7ddc048db0db720f2b197c827e1b1ee7e4"
            },
            "downloads": -1,
            "filename": "incomfort_client-0.6.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "954db5dd993f866780abafe9b6a57b4f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 7563,
            "upload_time": "2025-01-22T21:05:15",
            "upload_time_iso_8601": "2025-01-22T21:05:15.364780Z",
            "url": "https://files.pythonhosted.org/packages/a7/20/7ba2d76f8f48d6b659ec1de564793f9ddfa9349d6d9a36d389ade4b98cac/incomfort_client-0.6.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "11d3d8e30f11701cccc1d8c7246f633b86cd99cc2f28392b9c8683cb66adbb04",
                "md5": "01963b10f98aa8c96f212f64407ac0ce",
                "sha256": "7c0b200cbbb5ddbfbb6c96ede82dec8df67cee2f62fc146ffd133780ca865634"
            },
            "downloads": -1,
            "filename": "incomfort_client-0.6.7.tar.gz",
            "has_sig": false,
            "md5_digest": "01963b10f98aa8c96f212f64407ac0ce",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 7934,
            "upload_time": "2025-01-22T21:05:19",
            "upload_time_iso_8601": "2025-01-22T21:05:19.586479Z",
            "url": "https://files.pythonhosted.org/packages/11/d3/d8e30f11701cccc1d8c7246f633b86cd99cc2f28392b9c8683cb66adbb04/incomfort_client-0.6.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-22 21:05:19",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jbouwh",
    "github_project": "incomfort-client",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "circle": true,
    "lcname": "incomfort-client"
}
        
Elapsed time: 0.48254s