An Asynchronous Library for the KNX protocol. Documentation: https://xknx.io/
Project description
XKNX - An Asynchronous KNX Library Written in Python
Documentation
See documentation at: https://xknx.io/
Help
We need your help for testing and improving XKNX. For questions, feature requests, bug reports either join the XKNX chat on Discord or write an email.
Development
You will need at least Python 3.8 in order to use XKNX.
Setting up your local environment:
- Install requirements:
pip install -r requirements/testing.txt
- Install pre-commit hook:
pre-commit install
Home-Assistant Plugin
XKNX contains a plugin for the Home Assistant automation platform
Example
"""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')
await light.set_on()
await asyncio.sleep(2)
await light.set_off()
asyncio.run(main())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
xknx-0.18.2.tar.gz
(87.2 kB
view details)
Built Distribution
xknx-0.18.2-py3-none-any.whl
(142.0 kB
view details)
File details
Details for the file xknx-0.18.2.tar.gz
.
File metadata
- Download URL: xknx-0.18.2.tar.gz
- Upload date:
- Size: 87.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4dbfbdd4e5008d52de202382e17de2dfc7baf26e5fce43b1957dac41f665283 |
|
MD5 | 1c70be07b7aeb031965e7a15c5c971f8 |
|
BLAKE2b-256 | 9a8c627259f0056396ef89a71338308fe6e4d5d6c29fa15fd12c920bdf4067db |
File details
Details for the file xknx-0.18.2-py3-none-any.whl
.
File metadata
- Download URL: xknx-0.18.2-py3-none-any.whl
- Upload date:
- Size: 142.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75c66d46b4af82435a11e8ddb086ccb9ab7d0b8b02a8fd84cc88fd43ceca6b9b |
|
MD5 | ad9abc4fb0bfe789225de66ab9653c3f |
|
BLAKE2b-256 | 9a54bde3139ef2a203991d865792b06abe59f33cbd2d98d3cf937bb5ab7e0ee5 |