A library to gather information from ETS project files used for KNX
Project description
(X)KNX Project
Extracts KNX projects and parses the underlying XML.
This project aims to provide a library that can be used to extract and parse KNX project files and read out useful information including the group addresses, devices, their descriptions and possibly more.
Documentation
Currently, xknxproject supports extracting (password protected) ETS 4, 5 and 6 projects and can obtain the following information:
- Areas, Lines, Devices and their individual address and channels
- CommunicationObjectInstance references for their devices (GA assignments)
- Group Addresses and their DPT type if set
- The application programs communication objects, their respective flags and the DPT Type
- Location information of devices (in which rooms they are)
- Functions assigned to rooms
Caution: Loading a middle-sized project with this tool takes about 1.5 seconds. For bigger projects this might as well be >3s.
Not all supported languages are included in project / application data. If the configured language is not found, the default language will be used - which is manufacturer / product dependent.
Installation
pip install xknxproject
Usage
"""Extract and parse a KNX project file."""
from xknxproject.models import KNXProject
from xknxproject import XKNXProj
knxproj: XKNXProj = XKNXProj(
path="path/to/your/file.knxproj",
password="password", # optional
language="de-DE", # optional
)
project: KNXProject = knxproj.parse()
The resulting KNXProject
is a typed dictionary and can be used just like a dictionary, or can be exported as JSON.
You can find an example file (exported JSON) in our test suite under https://github.com/XKNX/xknxproject/tree/main/test/resources/stubs
The full type definition can be found here: https://github.com/XKNX/xknxproject/blob/main/xknxproject/models/knxproject.py
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
Built Distribution
File details
Details for the file xknxproject-3.8.1.tar.gz
.
File metadata
- Download URL: xknxproject-3.8.1.tar.gz
- Upload date:
- Size: 38.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 115f0495e347dbdd4bdbee2dc77ba35cf8391b805bdc43b10585a82e965f093e |
|
MD5 | 9d9372ebfd75a922b27827b3640b7bf2 |
|
BLAKE2b-256 | 59a43c6e130ad6516bbaad16f8845435e6ee9b75a45c12a2a15a91d90818c45d |
File details
Details for the file xknxproject-3.8.1-py3-none-any.whl
.
File metadata
- Download URL: xknxproject-3.8.1-py3-none-any.whl
- Upload date:
- Size: 41.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1dda0334cc1c8a11858c268f73160be3a1c1887ec36e33f91eed2726d09996c6 |
|
MD5 | db9b2aea80245b901087202b8beb8427 |
|
BLAKE2b-256 | a707d2bb63b5f8d9a3fad392b83e6a4573ec18a403f203c57421197c511c7475 |