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) 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


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.1.0.tar.gz (36.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xknxproject-3.1.0-py3-none-any.whl (38.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: xknxproject-3.1.0.tar.gz
  • Upload date:
  • Size: 36.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for xknxproject-3.1.0.tar.gz
Algorithm Hash digest
SHA256 c6c00f782846eb6c6aabe1617f99376d9659ba2336e2d4ff6ef23eb6152b2580
MD5 cd61681d815ee458a91fe7f4ec06dfb6
BLAKE2b-256 23093a85684ba08d42fa23205ae0b3426b2f99c30ae9788231a7aa0d370c2016

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xknxproject-3.1.0-py3-none-any.whl
  • Upload date:
  • Size: 38.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for xknxproject-3.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 664a8e0e90232a81c16c49957c841c93ef0c48b5e924fb58380ee37f794b8406
MD5 8c9483705f965e8a7ef4554a32a85604
BLAKE2b-256 89ab516cf0ea5399909b83a85e2956c019c551c626b77d298627064a95475826

See more details on using hashes here.

Supported by

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