Giter Site home page Giter Site logo

calimero-device's People

Contributors

bmalinowsky avatar calimero-project avatar holgerfriedrich avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

calimero-device's Issues

Saving interface object server fails and leaves empty XML file (Windows 10 64-Bit)

I am using the calimero-server on my Windows 10 with a TPUART connection.
Everything seem to work fine except when it comes to saving and load of the interface object server data.

When closing the calimero-server I get the following error:

10:36:43:267 DEBUG calimero.device.knx-server - saving interface object server to file:///C:/Users/User/Documents/calimero-server/knx-server-ios.xml
10:36:43:267 INFO calimero.server.knx-server - knx-server control endpoint COM5 closed
10:36:43:267 TRACE calimero.xml - using StaX XMLStreamWriter com.sun.xml.internal.stream.writers.XMLStreamWriterImpl
10:36:43:267 ERROR calimero.device.knx-server - saving interface object server
tuwien.auto.calimero.xml.KNXMLException: writeStartDocument
        at tuwien.auto.calimero.xml.XmlStreamWriterProxy.writeStartDocument(XmlStreamWriterProxy.java:341)
        at tuwien.auto.calimero.device.ios.InterfaceObjectServer$XmlSerializer.save(InterfaceObjectServer.java:860)
        at tuwien.auto.calimero.device.ios.InterfaceObjectServer$XmlSerializer.saveInterfaceObjects(InterfaceObjectServer.java:846)
        at tuwien.auto.calimero.device.ios.InterfaceObjectServer.saveInterfaceObjects(InterfaceObjectServer.java:256)
        at tuwien.auto.calimero.device.BaseKnxDevice.saveIos(BaseKnxDevice.java:557)
        at tuwien.auto.calimero.device.BaseKnxDevice.close(BaseKnxDevice.java:544)
        at tuwien.auto.calimero.server.knxnetip.KNXnetIPServer.shutdown(KNXnetIPServer.java:776)
        at tuwien.auto.calimero.server.Launcher.close(Launcher.java:672)
        at tuwien.auto.calimero.server.Launcher.quit(Launcher.java:664)
        at tuwien.auto.calimero.server.Launcher.run(Launcher.java:641)
        at tuwien.auto.calimero.server.Launcher.main(Launcher.java:609)
Caused by: javax.xml.stream.XMLStreamException: Underlying stream encoding 'Cp1252' and input paramter for writeStartDocument() method 'UTF-8' do not match.
        at java.xml/com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.verifyEncoding(XMLStreamWriterImpl.java:1246)
        at java.xml/com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeStartDocument(XMLStreamWriterImpl.java:1184)
        at java.xml/com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeStartDocument(XMLStreamWriterImpl.java:1167)
        at tuwien.auto.calimero.xml.XmlStreamWriterProxy.writeStartDocument(XmlStreamWriterProxy.java:338)
        ... 10 more
10:36:43:283 DEBUG calimero.device.knx-server - saving device memory to C:\Users\User\Documents\calimero-server\knx-server-ios.mem

This leaves an empty "knx-server-ios.xml" file with 0 bytes.

On next startup the calimero-server fails while trying to read the IOS data:

10:56:09:564 DEBUG calimero.device.knx-server - loading interface object server from file:///C:/Users/User/Documents/calimero-server/knx-server-ios.xml
10:56:09:576 TRACE calimero.xml - resolve file:///C:/Users/User/Documents/calimero-server/knx-server-ios.xml
10:56:09:580 TRACE calimero.xml - using StaX XMLStreamReader com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl
Exception in thread "main" tuwien.auto.calimero.xml.KNXMLException: ParseError at [row,col]:[1,1]
Message: Premature end of file.
        at tuwien.auto.calimero.xml.XmlStreamReaderProxy.wrapped(XmlStreamReaderProxy.java:204)
        at tuwien.auto.calimero.xml.XmlStreamReaderProxy.nextTag(XmlStreamReaderProxy.java:98)
        at tuwien.auto.calimero.device.ios.InterfaceObjectServer$XmlSerializer.load(InterfaceObjectServer.java:821)
        at tuwien.auto.calimero.device.ios.InterfaceObjectServer$XmlSerializer.loadInterfaceObjects(InterfaceObjectServer.java:802)
        at tuwien.auto.calimero.device.ios.InterfaceObjectServer.load(InterfaceObjectServer.java:221)
        at tuwien.auto.calimero.device.ios.InterfaceObjectServer.loadInterfaceObjects(InterfaceObjectServer.java:207)
        at tuwien.auto.calimero.device.BaseKnxDevice.loadIosFromResource(BaseKnxDevice.java:685)
        at tuwien.auto.calimero.device.BaseKnxDevice.initIos(BaseKnxDevice.java:649)
        at tuwien.auto.calimero.device.BaseKnxDevice.<init>(BaseKnxDevice.java:242)
        at tuwien.auto.calimero.server.knxnetip.KNXnetIPServer.<init>(KNXnetIPServer.java:364)
        at tuwien.auto.calimero.server.Launcher.<init>(Launcher.java:621)
        at tuwien.auto.calimero.server.Launcher.main(Launcher.java:606)
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1]
Message: Premature end of file.
        at java.xml/com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(XMLStreamReaderImpl.java:652)
        at java.xml/com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.nextTag(XMLStreamReaderImpl.java:1346)
        ... 11 more

Removing the empty knx-server-ios.xml before starting the server makes the server start properly again.

Adding group objects to a device without a predefined group address

Hi!

I am currently trying to implement a KNX device which is based on an existing ETS KNX product database file.
So far, I am able to program the individual address and the full application. ETS-5.7.6 does not complain and shows success.

Now I am trying to add the first group object to the device. Looking at the provided interface of BaseKnxDevice, it seems that I can only add a group object with a group address predefined. The datapoint interface seems to require this.

 public final void addGroupObject(final Datapoint dp, final DataSecurity security, final boolean update) 

My requirement would be to add my own group object by also specifiying the group object index and solely rely on the group addresses that were written by ETS.

Can you give a pointer on how to achieve this?
My current assumption is that this is not possible with the current implementation.

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.