Skip to main content

An Asynchronous Library for the KNX protocol. Documentation: https://xknx.io/

Project description

XKNX - An Asynchronous KNX Library Written in Python

Build Status Coverage Status

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.

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."""
    xknx = XKNX()
    await xknx.start()
    light = Light(xknx,
                  name='TestLight',
                  group_address_switch='1/0/9')
    await light.set_on()
    await asyncio.sleep(2)
    await light.set_off()
    await xknx.stop()


# pylint: disable=invalid-name
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
loop.close()

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.11.3.tar.gz (62.2 kB view details)

Uploaded Source

File details

Details for the file xknx-0.11.3.tar.gz.

File metadata

  • Download URL: xknx-0.11.3.tar.gz
  • Upload date:
  • Size: 62.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/2.7.16

File hashes

Hashes for xknx-0.11.3.tar.gz
Algorithm Hash digest
SHA256 5e44d6f82b157c1c20d398b345081508eb98de7ade6b3f2becdf5243cb521089
MD5 4a16283788a7274e65457125a45f003b
BLAKE2b-256 5cb4ac0fbcd636f2070e42323f7e0a0a2fbdb28f6cf569ef394781838f358976

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page