incomfort-client


Nameincomfort-client JSON
Version 0.5.0 PyPI version JSON
download
home_pagehttps://github.com/zxdavb/incomfort-client
SummaryAn aiohttp-based client for Intergas InComfort/InTouch Lan2RF systems
upload_time2023-02-10 12:04:13
maintainer
docs_urlNone
authorDavid Bonnes
requires_python>=3.9
licenseMIT
keywords intergas incomfort intouch lan2rf
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![CircleCI](https://circleci.com/gh/zxdavb/incomfort-client.svg?style=svg)](https://circleci.com/gh/zxdavb/incomfort-client)

# incomfort-client

Python client library for **Intergas boilers** accesible 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.6.7. It is available as a [PyPi package](https://pypi.org/project/incomfort-client/).

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



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/zxdavb/incomfort-client",
    "name": "incomfort-client",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "intergas,incomfort,intouch,lan2rf",
    "author": "David Bonnes",
    "author_email": "zxdavb@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/55/3e/6f58ff260422d024ff791e7ef6ff541fff0634e8bf8e92d80d70ed5489d8/incomfort-client-0.5.0.tar.gz",
    "platform": null,
    "description": "[![CircleCI](https://circleci.com/gh/zxdavb/incomfort-client.svg?style=svg)](https://circleci.com/gh/zxdavb/incomfort-client)\n\n# incomfort-client\n\nPython client library for **Intergas boilers** accesible 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.6.7. It is available as a [PyPi package](https://pypi.org/project/incomfort-client/).\n\n### Porting from syncio libraries\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 uses the same methods and properties as **bwesterb/incomfort**, but with the following differences:\n\n  - **`Gateway`** class\n    - added kwargs: `username`, `password` (used for newer versions of firmware)\n\n  - **`Heater`** class\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\nThere is a very basic CLI (this output has been formatted for readability):\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\nQA includes comparing JSON from **cURL** with output from this app using **diff** (note the `--raw` switch):\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```\nNewer versions of the gateway require authentication:\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\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "An aiohttp-based client for Intergas InComfort/InTouch Lan2RF systems",
    "version": "0.5.0",
    "split_keywords": [
        "intergas",
        "incomfort",
        "intouch",
        "lan2rf"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cf3165848a92ea1a4883832e888df6da1158d5c72f200e22d3ec4347971d003c",
                "md5": "9e4856d2b80b2d71d768106226841b5e",
                "sha256": "1375107cfd1736017f404dac676cd4c5c88fc930876f52c39f32045c61357bb2"
            },
            "downloads": -1,
            "filename": "incomfort_client-0.5.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9e4856d2b80b2d71d768106226841b5e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 7012,
            "upload_time": "2023-02-10T12:04:11",
            "upload_time_iso_8601": "2023-02-10T12:04:11.567694Z",
            "url": "https://files.pythonhosted.org/packages/cf/31/65848a92ea1a4883832e888df6da1158d5c72f200e22d3ec4347971d003c/incomfort_client-0.5.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "553e6f58ff260422d024ff791e7ef6ff541fff0634e8bf8e92d80d70ed5489d8",
                "md5": "2d18db644b366904f2a7065873d34768",
                "sha256": "25517cd1600afedfbaa6cbe6f8c91c6a60f4aded3ebe00d0dc1de6d66bebfec2"
            },
            "downloads": -1,
            "filename": "incomfort-client-0.5.0.tar.gz",
            "has_sig": false,
            "md5_digest": "2d18db644b366904f2a7065873d34768",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 7300,
            "upload_time": "2023-02-10T12:04:13",
            "upload_time_iso_8601": "2023-02-10T12:04:13.000818Z",
            "url": "https://files.pythonhosted.org/packages/55/3e/6f58ff260422d024ff791e7ef6ff541fff0634e8bf8e92d80d70ed5489d8/incomfort-client-0.5.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-02-10 12:04:13",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "zxdavb",
    "github_project": "incomfort-client",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "circle": true,
    "requirements": [],
    "lcname": "incomfort-client"
}
        
Elapsed time: 0.04860s