xknx


Namexknx JSON
Version 3.9.0 PyPI version JSON
download
home_pageNone
SummaryAn Asynchronous Library for the KNX protocol. Documentation: https://xknx.io/
upload_time2025-08-26 21:19:56
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10.0
licenseMIT
keywords knx eib home assistant home automation
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            # XKNX - An asynchronous KNX library written in Python

![PyPI - Python Version](https://img.shields.io/pypi/pyversions/xknx?logo=python)
[![codecov](https://codecov.io/gh/XKNX/xknx/branch/main/graph/badge.svg?token=irWbIygS84)](https://codecov.io/gh/XKNX/xknx)
[![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)
[![Pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=f8b424)](https://github.com/pre-commit/pre-commit)
[![HA integration usage](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fanalytics.home-assistant.io%2Fcurrent_data.json&query=%24.integrations.knx&logo=home-assistant&label=integration%20usage&color=41BDF5&cacheSeconds=21600)](https://www.home-assistant.io/integrations/knx/)
[![Discord](https://img.shields.io/discord/338619021215924227?color=7289da&label=Discord&logo=discord&logoColor=7289da)](https://discord.gg/bkZe9m4zvw)

## Documentation

See documentation at: [https://xknx.io/](https://xknx.io/)

## Help

We need your help for testing and improving XKNX. For questions, feature requests, bug reports either open an [issue](https://github.com/XKNX/xknx/issues), join the [XKNX chat on Discord](https://discord.gg/EuAQDXU) or write an [email](mailto:xknx@xknx.io).

## Development

You will need at least Python 3.10 in order to use XKNX.

Setting up your local environment:

1. Install requirements: `pip install -r requirements/testing.txt`
2. Install pre-commit hook: `pre-commit install`

## Testing

To run all tests, linters, formatters and type checker call `tox`

Running only unit tests is possible with `pytest`
Running specific unit tests can be invoked by: `pytest -vv test/management_tests/procedures_test.py -k test_nm_individual_address_serial_number_write_fail`

## Home-Assistant

XKNX is the underlying library for the KNX integration in [Home Assistant](https://home-assistant.io/).

## Example

```python
"""Example for switching a light on and off."""
import asyncio

from xknx import XKNX
from xknx.devices import Light


async def main():
    """Connect to KNX/IP bus, switch on light, wait 2 seconds and switch it off again."""
    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()
        await asyncio.sleep(2)
        await light.set_off()

asyncio.run(main())
```

## Attributions

Many thanks to [Weinzierl Engineering GmbH](https://weinzierl.de) and [MDT technologies GmbH](https://www.mdt.de) for providing us each an IP Secure Router to support testing and development of xknx.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "xknx",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10.0",
    "maintainer_email": null,
    "keywords": "KNX, EIB, Home Assistant, home automation",
    "author": null,
    "author_email": "Julius Mittenzwei <julius@mittenzwei.com>, Matthias Alphart <farmio@alphart.net>, Marvin Wichmann <me@marvin-wichmann.de>",
    "download_url": "https://files.pythonhosted.org/packages/58/92/aa5f4f720ac8f2c43da77ed722ae21b8ac373c77de93771d89be01dfdcbe/xknx-3.9.0.tar.gz",
    "platform": null,
    "description": "# XKNX - An asynchronous KNX library written in Python\n\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/xknx?logo=python)\n[![codecov](https://codecov.io/gh/XKNX/xknx/branch/main/graph/badge.svg?token=irWbIygS84)](https://codecov.io/gh/XKNX/xknx)\n[![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)\n[![Pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=f8b424)](https://github.com/pre-commit/pre-commit)\n[![HA integration usage](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fanalytics.home-assistant.io%2Fcurrent_data.json&query=%24.integrations.knx&logo=home-assistant&label=integration%20usage&color=41BDF5&cacheSeconds=21600)](https://www.home-assistant.io/integrations/knx/)\n[![Discord](https://img.shields.io/discord/338619021215924227?color=7289da&label=Discord&logo=discord&logoColor=7289da)](https://discord.gg/bkZe9m4zvw)\n\n## Documentation\n\nSee documentation at: [https://xknx.io/](https://xknx.io/)\n\n## Help\n\nWe need your help for testing and improving XKNX. For questions, feature requests, bug reports either open an [issue](https://github.com/XKNX/xknx/issues), join the [XKNX chat on Discord](https://discord.gg/EuAQDXU) or write an [email](mailto:xknx@xknx.io).\n\n## Development\n\nYou will need at least Python 3.10 in order to use XKNX.\n\nSetting up your local environment:\n\n1. Install requirements: `pip install -r requirements/testing.txt`\n2. Install pre-commit hook: `pre-commit install`\n\n## Testing\n\nTo run all tests, linters, formatters and type checker call `tox`\n\nRunning only unit tests is possible with `pytest`\nRunning specific unit tests can be invoked by: `pytest -vv test/management_tests/procedures_test.py -k test_nm_individual_address_serial_number_write_fail`\n\n## Home-Assistant\n\nXKNX is the underlying library for the KNX integration in [Home Assistant](https://home-assistant.io/).\n\n## Example\n\n```python\n\"\"\"Example for switching a light on and off.\"\"\"\nimport asyncio\n\nfrom xknx import XKNX\nfrom xknx.devices import Light\n\n\nasync def main():\n    \"\"\"Connect to KNX/IP bus, switch on light, wait 2 seconds and switch it off again.\"\"\"\n    async with XKNX() as xknx:\n        light = Light(\n            xknx,\n            name='TestLight',\n            group_address_switch='1/0/9',\n        )\n        xknx.devices.async_add(light)\n\n        await light.set_on()\n        await asyncio.sleep(2)\n        await light.set_off()\n\nasyncio.run(main())\n```\n\n## Attributions\n\nMany thanks to [Weinzierl Engineering GmbH](https://weinzierl.de) and [MDT technologies GmbH](https://www.mdt.de) for providing us each an IP Secure Router to support testing and development of xknx.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "An Asynchronous Library for the KNX protocol. Documentation: https://xknx.io/",
    "version": "3.9.0",
    "project_urls": {
        "homepage": "https://xknx.io/",
        "repository": "https://github.com/XKNX/xknx.git"
    },
    "split_keywords": [
        "knx",
        " eib",
        " home assistant",
        " home automation"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "d8729326a1fdd0a541a7cd0219dc539a182a2f0be24e77140846dd0b440b4acd",
                "md5": "ac077461952dd219348248bca4d8abea",
                "sha256": "8277b9528916bc8a65e9dcecafb5bf75e5a0f1352ecfc233f186e5ff369bc16c"
            },
            "downloads": -1,
            "filename": "xknx-3.9.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ac077461952dd219348248bca4d8abea",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10.0",
            "size": 235636,
            "upload_time": "2025-08-26T21:19:55",
            "upload_time_iso_8601": "2025-08-26T21:19:55.364617Z",
            "url": "https://files.pythonhosted.org/packages/d8/72/9326a1fdd0a541a7cd0219dc539a182a2f0be24e77140846dd0b440b4acd/xknx-3.9.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "5892aa5f4f720ac8f2c43da77ed722ae21b8ac373c77de93771d89be01dfdcbe",
                "md5": "8b400916a7e4141b794886bdf370aa3b",
                "sha256": "b89f8b995b8bf96763e501d710430bdf9039bfb1d7226431a5fd6d3ae809da9e"
            },
            "downloads": -1,
            "filename": "xknx-3.9.0.tar.gz",
            "has_sig": false,
            "md5_digest": "8b400916a7e4141b794886bdf370aa3b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10.0",
            "size": 157815,
            "upload_time": "2025-08-26T21:19:56",
            "upload_time_iso_8601": "2025-08-26T21:19:56.924691Z",
            "url": "https://files.pythonhosted.org/packages/58/92/aa5f4f720ac8f2c43da77ed722ae21b8ac373c77de93771d89be01dfdcbe/xknx-3.9.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-26 21:19:56",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "XKNX",
    "github_project": "xknx",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "tox": true,
    "lcname": "xknx"
}
        
Elapsed time: 1.68446s