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) ETS5 and ETS6 projects and can obtain the following information:
- Areas, Lines, Devices and their individual address
- 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)
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
Hashes for xknxproject-3.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 295615495265a0f0290815cc35dab67e9108d1d63cad19ee3480e41892686cc7 |
|
MD5 | fae3f4e831fd472b481d059a57588365 |
|
BLAKE2b-256 | 0f985d7087d3303557ac155c2ed894db60ab7a128a8fd341b00b0d95c1dcd249 |