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.

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/to/your/file.knxproj", "optional_password")
project: KNXProject = knxproj.parse()

The 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-2.0.0.tar.gz (22.7 kB view details)

Uploaded Source

Built Distribution

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

xknxproject-2.0.0-py3-none-any.whl (25.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: xknxproject-2.0.0.tar.gz
  • Upload date:
  • Size: 22.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.7

File hashes

Hashes for xknxproject-2.0.0.tar.gz
Algorithm Hash digest
SHA256 2c1f80bcbe86dabda9315767ab4f15da631322b54591e6c8b3a73e434c6194a5
MD5 56aeaf25ac175a525ae9b8c43e79df83
BLAKE2b-256 f294880ddb85094e28e0ea8cf5fb0d938e56616eb812e6abfee3f9af3bc5f9bf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xknxproject-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 25.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.7

File hashes

Hashes for xknxproject-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1abc1d896aa0d8b2edd002d1e377e7d9920f9aa181f85ed1f89ea8d7ddd7c183
MD5 437b10fb7ea61062f70239489399b91b
BLAKE2b-256 ad03cb45aadf64de57e2c5c30349ef74c4dc245668c014c5a271e8a9f15f471d

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