calimero-project / calimero-device Goto Github PK
View Code? Open in Web Editor NEWCalimero network stack for a KNX device
License: Other
Calimero network stack for a KNX device
License: Other
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.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.