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?


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([:1.8.0_131]
	at java.text.MessageFormat.applyPattern([:1.8.0_131]
	at java.text.MessageFormat.<init>([:1.8.0_131]
	at java.text.MessageFormat.format([:1.8.0_131]
	at org.openhab.binding.smlreader.connectors.SerialConnector.openConnection([195:org.openhab.binding.smlreader:]
	at org.openhab.binding.smlreader.connectors.ConnectorBase.getMeterValues([195:org.openhab.binding.smlreader:]
	at org.openhab.binding.smlreader.connectors.SerialConnector.getMeterValues([195:org.openhab.binding.smlreader:]
	at org.openhab.binding.smlreader.internal.SmlDevice.readValues([195:org.openhab.binding.smlreader:]
	at org.openhab.binding.smlreader.handler.SmlReaderHandler.updateOBISValue([195:org.openhab.binding.smlreader:]
	at org.openhab.binding.smlreader.handler.SmlReaderHandler.access$0([195:org.openhab.binding.smlreader:]
	at org.openhab.binding.smlreader.handler.SmlReaderHandler$[195:org.openhab.binding.smlreader:]
	at java.util.concurrent.Executors$[:1.8.0_131]
	at java.util.concurrent.FutureTask.runAndReset([:1.8.0_131]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301([:1.8.0_131]
	at java.util.concurrent.ScheduledThreadPoolExecutor$[:1.8.0_131]
	at java.util.concurrent.ThreadPoolExecutor.runWorker([:1.8.0_131]
	at java.util.concurrent.ThreadPoolExecutor$[:1.8.0_131]
Caused by: java.lang.NumberFormatException: For input string: ""
	at java.lang.NumberFormatException.forInputString([:1.8.0_131]
	at java.lang.Integer.parseInt([:1.8.0_131]
	at java.lang.Integer.parseInt([:1.8.0_131]
	at java.text.MessageFormat.makeFormat([: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.