SMLReader USBSerial unavailable randomly

Hi There,

i am using the SMLReader Binding from Market Place. My USBSerial adapters are connected to my windows machine. Openhab runs on this machine too.

Randomly one of the two adapters disconnects and becomes unavailable. I have to restart openhab to get things working again.

Is this a windows or openhab issue? Any suggestions?

Log:

2017-08-25 09:06:29.627 [ERROR] [binding.smlreader.internal.SmlDevice] - smlreader:meter:867f9c8a: Error during receive values from device: can't parse argument number: 
2017-08-25 09:06:29.627 [ERROR] [g.smlreader.handler.SmlReaderHandler] - Failed to read SML
java.lang.IllegalArgumentException: can't parse argument number: 
	at java.text.MessageFormat.makeFormat(MessageFormat.java:1429)[:1.8.0_131]
	at java.text.MessageFormat.applyPattern(MessageFormat.java:479)[:1.8.0_131]
	at java.text.MessageFormat.<init>(MessageFormat.java:362)[:1.8.0_131]
	at java.text.MessageFormat.format(MessageFormat.java:840)[:1.8.0_131]
	at org.openhab.binding.smlreader.connectors.SerialConnector.openConnection(SerialConnector.java:106)[195:org.openhab.binding.smlreader:2.1.0.201706271509]
	at org.openhab.binding.smlreader.connectors.ConnectorBase.getMeterValues(ConnectorBase.java:66)[195:org.openhab.binding.smlreader:2.1.0.201706271509]
	at org.openhab.binding.smlreader.connectors.SerialConnector.getMeterValues(SerialConnector.java:1)[195:org.openhab.binding.smlreader:2.1.0.201706271509]
	at org.openhab.binding.smlreader.internal.SmlDevice.readValues(SmlDevice.java:266)[195:org.openhab.binding.smlreader:2.1.0.201706271509]
	at org.openhab.binding.smlreader.handler.SmlReaderHandler.updateOBISValue(SmlReaderHandler.java:128)[195:org.openhab.binding.smlreader:2.1.0.201706271509]
	at org.openhab.binding.smlreader.handler.SmlReaderHandler.access$0(SmlReaderHandler.java:126)[195:org.openhab.binding.smlreader:2.1.0.201706271509]
	at org.openhab.binding.smlreader.handler.SmlReaderHandler$1.run(SmlReaderHandler.java:100)[195:org.openhab.binding.smlreader:2.1.0.201706271509]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_131]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)[:1.8.0_131]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)[:1.8.0_131]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)[:1.8.0_131]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_131]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_131]
	at java.lang.Thread.run(Thread.java:748)[:1.8.0_131]
Caused by: java.lang.NumberFormatException: For input string: ""
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)[:1.8.0_131]
	at java.lang.Integer.parseInt(Integer.java:592)[:1.8.0_131]
	at java.lang.Integer.parseInt(Integer.java:615)[:1.8.0_131]
	at java.text.MessageFormat.makeFormat(MessageFormat.java:1427)[:1.8.0_131]
	... 17 more

This occours if the serial Port is not available.
Do you have any other Binding accessing the serial Port? The sml Binding closes it in any case.

I have no other binding which is listening on the serial port. I had already changed COM Port assignment in device manager.
The only thing which resolves the problem is restarting openhab.

To me it looks like openhab is losing the com port and has to reinitialize it to work again…

In every read out the Binding opens the serial port, reads the values and closes it again.
You Staates to meine that it was working for you some time ago. Is that true? Die you change anything?
On which system runs openhab?

Yes, on my raspberry it runs fine.
I’ve changed openhab (and the serial readers) to my windows server.

It seems to me that there is a problem with two parallel readers. If i connect only one it runs fine. If i connect both one disconnects.