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 open an issue, join the XKNX chat on Discord or write an email.
Development
You will need at least Python 3.9 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.20.4.tar.gz
(114.9 kB
view details)
Built Distribution
xknx-0.20.4-py3-none-any.whl
(183.4 kB
view details)
File details
Details for the file xknx-0.20.4.tar.gz
.
File metadata
- Download URL: xknx-0.20.4.tar.gz
- Upload date:
- Size: 114.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | af8d7bf6afffbcd0489ee97c91bed099980e1ffb7ca629e3c4b0fef4b9794be3 |
|
MD5 | 26d0698bff1c7694780cf09c4750e82f |
|
BLAKE2b-256 | e2cd7cd89190d46bdebc73cb75a1486c261aca0599b4f88aec0e44b1cce2a832 |
File details
Details for the file xknx-0.20.4-py3-none-any.whl
.
File metadata
- Download URL: xknx-0.20.4-py3-none-any.whl
- Upload date:
- Size: 183.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c66f85b70edfa8249e264a902993b59b08865ddd7582540a371ce8a6ffd58c00 |
|
MD5 | 4537bc33ac498d84623a2178d7789db2 |
|
BLAKE2b-256 | 25c350f6cf4e97fd170063dd59a617ad2f125956b4933401807f32aa159ec852 |