--- id: xknx version: "3.19.0" license: MIT license_treatment: permissive maintenance: active --- # xknx — An Asynchronous Library for the KNX protocol. Documentation: https://xknx.io/ License: permissive · Maintenance: active · Downloads: 127.7K/mo ## What it is and what it does XKNX is an asynchronous Python library that implements the KNX protocol for home automation. It allows developers to programmatically control and monitor KNX devices—lights, switches, thermostats, and other hardware—over a KNX/IP network. The library is built on async/await patterns, making it suitable for integration into event-driven applications like Home Assistant. The package depends on async_timeout, typing_extensions, cryptography, and ifaddr to handle network communication, type hints, encryption, and interface discovery. It requires Python 3.10 or later and is actively maintained with a production-stable status. The library is designed to abstract away KNX protocol complexity, exposing a device-oriented API where you instantiate objects representing physical KNX devices and call methods to control them. Use it for: - Integrate KNX lighting control into a Python home automation system or dashboard - Build scripts to automate KNX device state changes based on external triggers or schedules - Monitor KNX device status and log state changes to a database or analytics platform - Extend Home Assistant's KNX integration or develop a custom KNX management application - Create a bridge between KNX networks and other smart home protocols or APIs ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. XKNX is an asynchronous Python library for communicating with KNX home automation systems over KNX/IP networks, enabling control of lights, switches, and other KNX devices. Yes. XKNX is actively maintained, has no known vulnerabilities, installs with low friction, and is the standard library for KNX automation in Python. Install it if you need to control or monitor KNX devices from Python code or if you are extending Home Assistant's KNX support. ## Install pip install xknx uv add xknx poetry add xknx ## Installing xknx Before you install: Low friction installation with a pure-Python wheel and four lightweight runtime dependencies. Active maintenance with a recent release (4 days old) and steady repository activity. License in practice: MIT license permits unrestricted use, modification, and distribution with minimal legal constraints. Quickstart: pip install xknx import asyncio from xknx import XKNX from xknx.devices import Light async def main(): async with XKNX() as xknx: light = Light(xknx, name="TestLight", group_address_switch="1/0/9") xknx.devices.async_add(light) await light.set_on() asyncio.run(main()) Requires Python 3.10 or later; requires a KNX/IP gateway or tunneling interface on the network. Verify before relying: - Whether the library supports all KNX device types or only a subset (lights, switches, etc.) - Performance characteristics under high-volume device communication - Compatibility with specific KNX gateway hardware models ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 127.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags KNX home automation library, KNX/IP protocol Python, async KNX device control, home assistant KNX integration, EIB protocol library, smart home KNX communication, home-automation, knx-protocol, async-io [View on SkillFed](https://skillfed.io/packages/xknx) · [View on PyPI](https://pypi.org/project/xknx/)