--- id: pyotgw version: "2.2.3" license: GPLv3+ license_treatment: copyleft maintenance: active --- # pyotgw — A library to interface with the opentherm gateway through serial or network connection. License: copyleft · Maintenance: active · Downloads: 73.6K/mo ## What it is and what it does pyotgw is an async Python library that bridges your code to an OpenTherm Gateway device, a hardware interface for reading and controlling modern heating systems. It maintains a persistent connection to the gateway over serial or network, caches status information, and allows you to query boiler parameters, set control setpoints, and manage alternative data-IDs for unsupported features. The library was originally written for Home Assistant but works as a standalone tool for any heating system automation. The core workflow is straightforward: instantiate an OpenThermGateway object, call connect() with your device port and optional timeout, then read cached status via methods like get_status() or subscribe to changes via callbacks. The library handles reconnection automatically if the gateway becomes unresponsive, and exposes methods to manipulate central heating enable bits and manage unsupported data-IDs. All operations are coroutines, so you integrate it into an async event loop. Use it for: - Integrate a heating system into a Home Assistant smart home setup for remote temperature control and monitoring - Build a standalone daemon to log boiler parameters (flow temperature, pressure, flame status) to a database - Automate heating schedules based on occupancy or weather data by setting control setpoints programmatically - Monitor and alert on boiler faults or unusual operating conditions via the gateway's status reports - Develop a custom thermostat UI that reads live heating data and sends commands to the boiler through the gateway ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. pyotgw is a Python library that communicates with an OpenTherm Gateway device over serial or network connection, allowing you to read and control heating system parameters asynchronously. Yes. pyotgw is actively maintained, has no known vulnerabilities, low install friction, and is marked Production/Stable. Install it if you own an OpenTherm Gateway and need to control or monitor a compatible heating system from Python. The copyleft license is standard for this project type and poses no barrier for most users. The single dependency (pyserial-asyncio-fast) is lightweight and well-established. ## Install pip install pyotgw uv add pyotgw poetry add pyotgw ## Installing pyotgw Before you install: Low install friction with a single runtime dependency (pyserial-asyncio-fast). The package is actively maintained with recent commits and marked as Production/Stable. No known vulnerabilities. License in practice: Licensed under GPLv3+, a copyleft license. Any derivative work or modification must be released under the same license terms, and source code must remain available. Quickstart: import asyncio from pyotgw import OpenThermGateway async def main(): gateway = OpenThermGateway() status = await gateway.connect('/dev/ttyUSB0', timeout=5) print(status) await gateway.disconnect() asyncio.run(main()) Requires a physical OpenTherm Gateway device connected via serial port or network. Python 3.8 or later. Verify before relying: - Whether the library fully supports all OpenTherm features or only those tested by the maintainer's hardware - Performance characteristics under high-frequency polling or many concurrent subscriptions ## Package facts - License: GPLv3+ (copyleft) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 73.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags opentherm gateway python, serial heating system control, boiler thermostat interface, opentherm protocol library, home automation heating, otgw python client, central heating control, home-automation, hardware-interface, async-io [View on SkillFed](https://skillfed.io/packages/pyotgw) · [View on PyPI](https://pypi.org/project/pyotgw/)