Skip to main content

An aiohttp-based client for Intergas InComfort/InTouch Lan2RF systems

Project description

PyPI version

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.

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 integration with Home Assistant.

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):

(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):

(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:

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

incomfort_client-0.6.3.post1.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

incomfort_client-0.6.3.post1-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file incomfort_client-0.6.3.post1.tar.gz.

File metadata

File hashes

Hashes for incomfort_client-0.6.3.post1.tar.gz
Algorithm Hash digest
SHA256 f534e0033eec7b3407c0894867b4795e8fb7abd42fa37eedd4c2ff6ba75992b3
MD5 83428598f0e09cf4fbbd36503f91e03b
BLAKE2b-256 ce1837ac70d0300b2d3304df3580ccf8abda42093cb582de79e57c2bb0866ef7

See more details on using hashes here.

File details

Details for the file incomfort_client-0.6.3.post1-py3-none-any.whl.

File metadata

File hashes

Hashes for incomfort_client-0.6.3.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 abf68cb486a423eb47bd72096733ebaa84f43405ca3e00bbabd8ee23753033e8
MD5 3d4b5a8f4fb7d457b24bd2454e7179e3
BLAKE2b-256 7798541714947db8b77b8a1d969f1c98b55d7054600ea98fa68741d44261258c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page