Code Monkey home page Code Monkey logo

openknxproducer's Introduction

OpenKNXproducer

This project provides a commandline tool to create knxprod files for ETS.

This is the successor of multiply-channels, which will be discontinued. multiply-channels and OpenKNXproducer are compatible, as long as you want to convert simple xml-sources using ETS 5.x. As soon as you use the include-functionality of these tools, there is no compatibility anymore.

For OpenKNX_Projects or for knxprod-creation with ETS 6 you should use OpenKNXproducer.

The current version provides the following verbs:

  • create Check given xml file and create knxprod

  • check Execute sanity checks on given xml file

  • knxprod Create knxprod file from given xml file without checks

  • new Create new xml file with a fully commented and working mini exaple

  • help Display more information on a specific command.

  • version Display version information.

This tool also creates a header file with defines for all parameter and com object definitions in the xml. An ETS must be installed on the PC. Currently ETS 4, ETS 5.5, ETS 5.6, ETS 5.7 and ETS 6.0 are supported. The correct ETS converter version is automatically found dependent on xmlns of provided xml document. This project uses dotnet 6.0.

Examples:

  • OpenKNXproducer new --ProductName=TempSensor --AppNumber=567 Sensor

    Creates initial Sensor.xml, do sanity checks produce Sensor.h, produce Sensor.knxprod

  • OpenKNXproducer create Sensor

    Reads Sensor.xml, do sanity checks, produce Sensor.h, produce Sensor.knxprod

  • OpenKNXproducer knxprod -o device.knxpord Sensor.xml

    Reads Sensor.xml, produce device.knxprod

  • OpenKNXproducer check Sensor.xml

    Reads Sensor.xml, do sanity checks

Tipps:

If all sanity checks were OK and the knxprod file was created, there might be still problems using this file in ETS. Because the user is editing an xml file, there might be many other problems there, which are not checked by this tool yet.

As a general hint:

  • if there is a problem importing the knxprod file into the product catalog (import function in ETS), there is usually a problem with Parameters-, ParameterTypes-, ComObjects-Section or the document structure itself.

  • if import was successful, but you cannot add the device to your project, usually there is a problem in Dynamic-, ParameterRef-, ComObjectRef-Section.

If you find a situation, which is not yet checked but leads to errors in ETS, tell me and I will add a new check. Or create a pull request...

openknxproducer's People

Contributors

geminiserver avatar ing-dom avatar mgeramb avatar mumpf avatar thewhobox avatar traxanos avatar waldemarporscha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

openknxproducer's Issues

language sections are not properly exported - like in MultiplyChannels_2.1.2

language sections are not properly exported - like in MultiplyChannels_2.1.2

The attached sample works in MultiplyChannels_2.1.2, but in OpenKNXproducer_1.1.1 all language sections are added to all *.xml files.

The language section of the catalog and the language section of the application are added to all xml files - even the Hardware.xml includes both language sections.

Maybe you can have a look at the attached sample:
Sensor.zip

OpenKNX Tools cannot be installed ...

I'm currently setting up a complete new OpenKNX Dev environment and follow the according Wiki page.

I downloaded the package, unzipped it. Changed into the folder.
First, here is no "Install-OpenKNX-Tools.ps1" script but a folder "scripts" with that script.
Changing into "scripts", I can start it but it fails with
"...\OpenKNXproducer-main\scripts\tools" kann nicht gefunden werden, da er nicht vorhanden ist."

There is no folder tools at all in the unzipped structure. Is there something missing?

Regards

SensorModule error at "createKNXproduct"

I just downloaded KNX producer for the first time trying to get a SensorModule-OneWire-1.5.2.zip up and running.

When executing Build-knxprod.ps1 OpenKNXproducer crashes. So I just tried to use OpenKNXproducer directly with following result:


C:\Users\Christoph\Downloads\SensorModule>OpenKNXproducer.exe knxprod --NoXsd --Output="./test.knxprod" "data/content.xml"
OpenKNXproducer 2.16.0.0
Reading xml file data/content.xml writing to ./test.knxprod
Unhandled exception. System.ArgumentOutOfRangeException: startIndex cannot be larger than length of string. (Parameter 'startIndex')
   at System.String.Substring(Int32 startIndex, Int32 length)
   at System.String.Substring(Int32 startIndex)
   at OpenKNXproducer.Program.FindEtsPath(String lXmlns)
   at OpenKNXproducer.Program.VerbKnxprod(KnxprodOptions opts)
   at OpenKNXproducer.Program.<>c.<Main>b__31_3(KnxprodOptions opts)
   at CommandLine.ParserResultExtensions.MapResult[T1,T2,T3,T4,T5,TResult](ParserResult`1 result, Func`2 parsedFunc1, Func`2 parsedFunc2, Func`2 parsedFunc3, Func`2 parsedFunc4, Func`2 parsedFunc5, Func`2 notParsedFunc)
   at OpenKNXproducer.Program.Main(String[] args)

version 2.15.0.0 gives the same output.
ETS 5.7 works.

Was mach ich falsch?

OpenKNXproducer "new" doesn't generate a valid knxprod

Hi
Running the following command
OpenKNXproducer new --ProductName=DuWx2S --AppNumber=890 --AppVersion=1 Test2

produces an invalid knxprod file. When importing, ETS 5.7.7 will state:
File: C:\Users\lith\bin\Test2.knxprod
Cannot convert into ObjectSize
Parameter name: value

I'll test with an earlier version of ETS in the evening.

Neue Prüfung: Union-Inhalt überschreitet Union-Größe

Beispiel von Marco:

<Union SizeInBit="16">
    <Memory CodeSegment="%AID%_RS-04-00000" Offset="25" BitOffset="0" />
    <Parameter Id="%AID%_UP-%T%%CCC%060" Name="BTN%C%StatusThreshold" Offset="0" BitOffset="0" ParameterType="%AID%_PT-ValueDpt5001" Text="Schwellwert" Value="25" SuffixText="%" />
    <Parameter Id="%AID%_UP-%T%%CCC%061" Name="BTN%C%StatusFallbackBase" Offset="1" BitOffset="0" ParameterType="%AID%_PT-DelayBase" Text="Zeitbasis" Value="1" />
    <Parameter Id="%AID%_UP-%T%%CCC%062" Name="BTN%C%StatusFallbackTime" Offset="1" BitOffset="2" ParameterType="%AID%_PT-DelayTime" Text="Zeit" Value="1" />
</Union>

Da müssten 24 Bit hin.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.