Skip to main content

KNX / EIB library

Project description

A minimalistic KNX / EIB python library. It can be used to send telegrams to actors in the bus system:

>>> from knx import connect
>>> with connect() as c:
...     c.write('0/1/14', 1)

Or it can be used to listen to the traffic on the bus system:

>>> import knx
>>> @knx.coroutine
... def logger():
...     while True:
...         telegram = (yield)
...         print(telegram.src)
...         print(telegram.dst)
...         print(telegram.value)

>>> knx.listen(logger())

See the examples folder for a full working example.

Install & Requirements

  • Python >= 3.4

Install using pip:

$ pip install knx

Disclaimer

I’ve only tested this with eibd 0.0.5 as a gateway.

Development

In order to setup a sandboxed development environment use buildout:

  1. Create a virtual environment to have a python without any third-party packages in it’s sys.path: (Kinda Optional):

    python -m venv .venv
  2. Run bootstrap.py:

    .venv/bin/python bootstrap.py
  3. Run bin/buildout:

    bin/buildout

Once these steps are done you’ll be able to run tests using bin/test.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

knx-0.2.0.tar.gz (7.9 kB view hashes)

Uploaded Source

Built Distribution

knx-0.2.0-py2.py3-none-any.whl (5.9 kB view hashes)

Uploaded Python 2 Python 3

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