Skip to main content

A library to gather information from ETS project files used for KNX

Project description

(X)KNX Project

Pre-commit Discord codecov

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


Download files

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

Source Distribution

xknxproject-3.8.2.tar.gz (38.6 kB view details)

Uploaded Source

Built Distribution

xknxproject-3.8.2-py3-none-any.whl (41.6 kB view details)

Uploaded Python 3

File details

Details for the file xknxproject-3.8.2.tar.gz.

File metadata

  • Download URL: xknxproject-3.8.2.tar.gz
  • Upload date:
  • Size: 38.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for xknxproject-3.8.2.tar.gz
Algorithm Hash digest
SHA256 2a4150b6ddb1c6f5ab961b2220ad48f8a416f0b5fbe654e03b1e6cdc7c6bd17a
MD5 379bb871bd6f25e222f8c322a8a9365a
BLAKE2b-256 736791604150194b6336e78d0cc47f426e0e438295af9b2ee291bac1d4e01c00

See more details on using hashes here.

File details

Details for the file xknxproject-3.8.2-py3-none-any.whl.

File metadata

  • Download URL: xknxproject-3.8.2-py3-none-any.whl
  • Upload date:
  • Size: 41.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for xknxproject-3.8.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f4c52dfea5c15ed1338a3b8fa37198f08f90c50f38a747b8af0a5a37b6093002
MD5 2ba3916b48aa645c0c29d8068c823307
BLAKE2b-256 5b2c56060ee1de99f1be626bdea3e33b3b7c1aa3bd2372ac969a7b424a992fdd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page