All Projects → mfussenegger → knx

mfussenegger / knx

Licence: MIT license
python knx / eib client library

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to knx

knxmap
KNXnet/IP scanning and auditing tool for KNX home automation installations.
Stars: ✭ 97 (+288%)
Mutual labels:  knx, eib
calimero-core
Core library for KNX network access and management
Stars: ✭ 106 (+324%)
Mutual labels:  knx
linknx
Linknx is a service aimed at interacting with KNX devices. It features a value cache to save bus bandwidth and exposes a rules engine allowing to automate actions based on powerful logical conditions and timers.
Stars: ✭ 37 (+48%)
Mutual labels:  knx
Tasmota
Alternative firmware for ESP8266 with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
Stars: ✭ 16,624 (+66396%)
Mutual labels:  knx
automate-home
Yet another python home automation (iot) project. Because a smart light is more than just on or off.
Stars: ✭ 59 (+136%)
Mutual labels:  knx
hkknx-public
hkknx is a HomeKit KNX bridge for KNX.
Stars: ✭ 65 (+160%)
Mutual labels:  knx
calimero-tools
A collection of KNX network tools for device discovery, process communication, and monitoring
Stars: ✭ 25 (+0%)
Mutual labels:  knx
ioBroker.knx
connect KNX via eibd
Stars: ✭ 46 (+84%)
Mutual labels:  knx
calimero-gui
A graphical user interface for Calimero based on the Eclipse Standard Widget Toolkit (SWT)
Stars: ✭ 18 (-28%)
Mutual labels:  knx
node-eibd
node.js eibd client (EIB/KNX daemon)
Stars: ✭ 52 (+108%)
Mutual labels:  knx
CometVisu
Repository for the CometVisu building automation visualisation.
Stars: ✭ 60 (+140%)
Mutual labels:  knx
knx-go
KNX clients and protocol implementation in Go
Stars: ✭ 62 (+148%)
Mutual labels:  knx

knx

travis-ci Wheel PyPI Version Python Version

A minimalistic KNX / EIB python library.

Sending telegrams

This library can be used to send data telegrams to actuators in the bus system.

For example in order to turn on a light the following code could be used:

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

Where 0/1/14 is the address of the light and 1 is the payload of the data telegram which indicates that the light should be turned on.

Listening to telegrams

This KNX library can also be used to listen to telegrams that are sent onto the bus system. For example if you simply want to log an entry each time a light is turned off or on:

>>> import knx
>>> import asyncio

>>> @knx.coroutine
... def logger():
...     while True:
...         telegram = (yield)
...         print('Telegram from {0} sent to {1} with value: {2}'.format(
...               telegram.src, telegram.dst, telegram.value))

>>> loop = asyncio.get_event_loop()
>>> coro = knx.bus_monitor(logger(), host='localhost', port=6720)
>>> loop.run_until_complete(coro)

Install & Requirements

  • Python >= 3.6

Install using pip:

$ pip install knx

Disclaimer

I've only tested this with eibd 0.0.5 and the fork knxd as a gateway.

Alternatives

If you're looking for complete home automation solutions you might want to take a look at home-assistant or smarthome.

Development

Edit knx.py in your favorite editor and run tests using python -m unittest or python tests.py.

If you want to run the examples without first installing this library you can use:

python -m examples.actor -- hostname '0/0/20'

(Replace actor with the appropriate module name and omit the arguments if the module doesn't require them)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].