| Name | xknx JSON |
| Version |
3.10.0
JSON |
| download |
| home_page | None |
| Summary | An Asynchronous Library for the KNX protocol. Documentation: https://xknx.io/ |
| upload_time | 2025-10-13 08:50:03 |
| maintainer | None |
| docs_url | None |
| author | None |
| requires_python | >=3.10.0 |
| license | MIT |
| 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

[](https://codecov.io/gh/XKNX/xknx)
[](http://mypy-lang.org/)
[](https://github.com/pre-commit/pre-commit)
[](https://www.home-assistant.io/integrations/knx/)
[](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/60/19/85649a5d0e48ffceb157dc5ba1c6260849e0e73a32b412f0eda728f2e239/xknx-3.10.0.tar.gz",
"platform": null,
"description": "# XKNX - An asynchronous KNX library written in Python\n\n\n[](https://codecov.io/gh/XKNX/xknx)\n[](http://mypy-lang.org/)\n[](https://github.com/pre-commit/pre-commit)\n[](https://www.home-assistant.io/integrations/knx/)\n[](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.10.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": "6422e87563fc035df4defe21b42a75e318a7c03e1c52e444845ea9adda136fc6",
"md5": "2de2a0ea745ff092a8d95098c6829213",
"sha256": "03f6cb82bee4f3cc4cf7667b464bffc5ddc91d624555c6a0e38e6b788e2018d0"
},
"downloads": -1,
"filename": "xknx-3.10.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2de2a0ea745ff092a8d95098c6829213",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10.0",
"size": 235680,
"upload_time": "2025-10-13T08:50:02",
"upload_time_iso_8601": "2025-10-13T08:50:02.032419Z",
"url": "https://files.pythonhosted.org/packages/64/22/e87563fc035df4defe21b42a75e318a7c03e1c52e444845ea9adda136fc6/xknx-3.10.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "601985649a5d0e48ffceb157dc5ba1c6260849e0e73a32b412f0eda728f2e239",
"md5": "ae49ab096838610f000a445209653b9c",
"sha256": "332d82cf6e0d92036f54912b1fad23a7d72fe58c1740128fd576c7a0aa0a7135"
},
"downloads": -1,
"filename": "xknx-3.10.0.tar.gz",
"has_sig": false,
"md5_digest": "ae49ab096838610f000a445209653b9c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10.0",
"size": 157810,
"upload_time": "2025-10-13T08:50:03",
"upload_time_iso_8601": "2025-10-13T08:50:03.440159Z",
"url": "https://files.pythonhosted.org/packages/60/19/85649a5d0e48ffceb157dc5ba1c6260849e0e73a32b412f0eda728f2e239/xknx-3.10.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-13 08:50:03",
"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"
}