Rust API for KNX devices and networks
knxkit is a library for interfacing with KNX devices and networks. It provides a high-level API for interacting with KNX devices and networks, and is designed to be easy to use and flexible.
-
Data structures — individual and group addresses, CEMI, APDU, DPT, DataPoint, KNXnet/IP frames
-
KNXnet/IP services — search, describe, tunneling are implemented.
-
Project files — read .knxproj files, which are used by ETS to store KNX project information. Devices and group definitions can be extracted.
-
Data point structures generated from knx_master.xml contents. Typed and generic representations are supported
-
Command line utilities for data structures generation and knx network interaction.
Code Example
[]
= { = "1.42.0", = ["full"] }
= "0.1.1"
= "0.1"
use ;
use ;
use ;
async
Command line utility example
cargo install knxkit_cli
export KNX_REMOTE=udp://192.168.8.2
export KNX_PROJECT=~/knxkit/_hidden/etc/TestProject.knxproj
Search

Group Monitor

Downloadable binary releases for Linux (and maybe Windows) will be provided in the future.
Related crates
- knxkit_dpt - DPT definitions
- knxkit_dptgen - DPT definitions generator
Status
Currently the library is in development. It may be used for testing and experimentation, but is not yet ready for production use. The API is subject to change. The library is being developed in the open, and contributions are welcome.
Plan
In addition to general improvements and bug fixes, the following features are planned for the library:
- KNXnet/IP routing
- KNXnet/IP secure
- USB tunneling
- multiplexing of single tunnel connection over unix domain socket
Tools and applications
- knx2mqtt
- knx2ws (WebSocket)
- knx2prometheus
- scriptable logic engine