Skip to content
This repository has been archived by the owner on Dec 25, 2022. It is now read-only.

calimero-project/import-ets-xml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

[Archived] Import ETS XML into Calimero XML

This repository is archived. Use the Calimero Tools datapoint importer for ETS 5.7 or later.

Transform KNX datapoints of ETS source XML documents to Calimero XML source documents. Tested with ETS 4.0.3 and ETS 5.x (latest v5.6.4). ETS 5.7 or later is not supported!

Copyright (C) 2010, 2011 Thomas Wimmer
Copyright (C) 2015, 2018 Boris Malinowsky
Documentation by Wolfgang Granzer, Boris Malinowsky
Licensed under the GNU Lesser General Public License (LGPL), version 2.1

Required steps

  1. Export your ETS project: click on ETS, select your project, and click Export... . You get a file with the extension .knxproj (a ZIP archive).
  2. Check your ETS version (ETS 4/5)
  3. Transform to Calimero XML using XSLT, either by using Gradle, Maven, or do it manually (see below).

Know your ETS version!

Note: namespace version ≥ 20 is not supported.

Select the correct version inside the calimero xsl file (line 5) you want to use. If you don't know the version, use try and error with versions 11 to 14. With the wrong version, the transformed output file will not contain any datapoints! This adjustment of the version is necessary due to ETS .knxproj files using versioned XML namespaces.

  • ETS 4 uses http://knx.org/xml/project/11 or http://knx.org/xml/project/12
  • ETS 5 uses http://knx.org/xml/project/13 or http://knx.org/xml/project/14

By default, the transformation assumes a recent ETS 5 with namespace version 14.

Import using Gradle

  • Copy the .knxproj archives into src/main/resources (do not extract the archives).
  • On the command line, execute ./gradlew. The imported calimero.xml` file of each archive is written to the corresponding build/imports/<Project Name> folder.

Import using Maven

  • Copy the .knxproj archives into src/main/resources (do not extract the archives).
  • Execute the Maven goal process-resources. For example, in the terminal change to the directory where the pom.xml file resides, and type mvn process-resources. The output files are written to target/generated-resources/xml/xslt.

Manual import

  • Choose the appropriate XSL style sheet (see below).
  • Copy the chosen XSL file into the root directory of the extracted ETS project.
  • Invoke an appropriate XSLT tool. On Linux/MacOS you can use xsltproc, i.e., xsltproc -o <output_XML_file> <XSL_file> <source_XML_file>. On Microsoft Windows, you may use Saxon (http://saxon.sourceforge.net/).

Choose the appropriate XSL style sheet:

  • ets_calimero_group.xsl: Generates for each KNX group address one single datapoint. The resulting file can be loaded by Calimero.
  • ets_calimero_group_name.xsl: Generates for each KNX group address one single datapoint where the KNX group address name is used as name for the datapoint. The resulting file can be loaded by Calimero.
  • ets_calimero.xsl: Generates for each application object one single datapoint. Note that different application objects may have the same group address. Therefore, the output cannot be imported into Calimero! However, it can be used for further (manual) processing.

The source XML file is called 0.xml which is contained within the sub directory that begins with a P, e.g., P-0497.

Example invocation

xsltproc -o calimero.xml ets_calimero_group_name.xsl P-0497/0.xml


Developed at the A-Lab, Automation Systems Group
Vienna University of Technology
www.auto.tuwien.ac.at/a-lab