[solved] DSMR binding: RuntimeException during handling serial event

Tags: #<Tag:0x00007f744f653450>

I’m running Openhab 2.4 via Openhabian on a Raspberry Pi 3b+. I just connected my Landis+Gyr E 360 meter with a bought P1 cable.

I have succesfully installed the DSMR binding (I thought). I added Things, Items, and they show up in PaperUI. However, in the logs, I see this message a few times each minute, each time slightly different:

The binding seems to function, at least, the items I want are all OK. But it is flooding my logs with messages like below. Always the For input string: XX seems to differ. Sometimes it show legible characters, sometimes something like this: image

For now I’ve set log level to ERROR to avoid flooding, but I’d like to keep it at WARN. If anyone has a clue?

java.lang.NumberFormatException: For input string: "3!"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:?]
	at java.lang.Integer.parseInt(Integer.java:580) ~[?:?]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemHexString.getStateValue(CosemHexString.java:47) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemHexString.getStateValue(CosemHexString.java:1) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemObject.parseCosemValues(CosemObject.java:121) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemObjectFactory.getCosemObjectInternal(CosemObjectFactory.java:141) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemObjectFactory.getCosemObject(CosemObjectFactory.java:104) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.p1telegram.P1TelegramParser.storeCurrentCosemObject(P1TelegramParser.java:363) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.p1telegram.P1TelegramParser.setState(P1TelegramParser.java:390) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.p1telegram.P1TelegramParser.parseData(P1TelegramParser.java:214) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.DSMRTelegramListener.handleData(DSMRTelegramListener.java:61) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.connector.DSMRBaseConnector.handleDataAvailable(DSMRBaseConnector.java:112) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.connector.DSMRSerialConnector.handleDataAvailable(DSMRSerialConnector.java:305) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.connector.DSMRSerialConnector.serialEvent(DSMRSerialConnector.java:264) [228:org.openhab.binding.dsmr:2.4.0]
	at org.eclipse.smarthome.io.transport.serial.rxtx.RxTxSerialPort$1.serialEvent(RxTxSerialPort.java:81) [204:org.eclipse.smarthome.io.transport.serial.rxtx:0.10.0.oh240]
	at gnu.io.RXTXPort.sendEvent(RXTXPort.java:780) ~[199:com.neuronrobotics.nrjavaserial:3.15.0.OH2]
	at gnu.io.RXTXPort.eventLoop(Native Method) [199:com.neuronrobotics.nrjavaserial:3.15.0.OH2]
	at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1611) [199:com.neuronrobotics.nrjavaserial:3.15.0.OH2]
2019-11-07 21:19:03.620 [WARN ] [device.connector.DSMRSerialConnector] - RuntimeException during handling serial event: 1
java.lang.NumberFormatException: For input string: "3!"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:?]
	at java.lang.Integer.parseInt(Integer.java:580) ~[?:?]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemHexString.getStateValue(CosemHexString.java:47) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemHexString.getStateValue(CosemHexString.java:1) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemObject.parseCosemValues(CosemObject.java:121) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemObjectFactory.getCosemObjectInternal(CosemObjectFactory.java:141) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemObjectFactory.getCosemObject(CosemObjectFactory.java:104) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.p1telegram.P1TelegramParser.storeCurrentCosemObject(P1TelegramParser.java:363) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.p1telegram.P1TelegramParser.setState(P1TelegramParser.java:390) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.p1telegram.P1TelegramParser.parseData(P1TelegramParser.java:214) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.DSMRTelegramListener.handleData(DSMRTelegramListener.java:61) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.connector.DSMRBaseConnector.handleDataAvailable(DSMRBaseConnector.java:112) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.connector.DSMRSerialConnector.handleDataAvailable(DSMRSerialConnector.java:305) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.connector.DSMRSerialConnector.serialEvent(DSMRSerialConnector.java:264) [228:org.openhab.binding.dsmr:2.4.0]
	at org.eclipse.smarthome.io.transport.serial.rxtx.RxTxSerialPort$1.serialEvent(RxTxSerialPort.java:81) [204:org.eclipse.smarthome.io.transport.serial.rxtx:0.10.0.oh240]
	at gnu.io.RXTXPort.sendEvent(RXTXPort.java:780) ~[199:com.neuronrobotics.nrjavaserial:3.15.0.OH2]
	at gnu.io.RXTXPort.eventLoop(Native Method) [199:com.neuronrobotics.nrjavaserial:3.15.0.OH2]
	at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1611) [199:com.neuronrobotics.nrjavaserial:3.15.0.OH2]
2019-11-07 21:19:04.650 [WARN ] [device.connector.DSMRSerialConnector] - RuntimeException during handling serial event: 1
java.lang.NumberFormatException: For input string: "3!"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:?]
	at java.lang.Integer.parseInt(Integer.java:580) ~[?:?]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemHexString.getStateValue(CosemHexString.java:47) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemHexString.getStateValue(CosemHexString.java:1) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemObject.parseCosemValues(CosemObject.java:121) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemObjectFactory.getCosemObjectInternal(CosemObjectFactory.java:141) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemObjectFactory.getCosemObject(CosemObjectFactory.java:104) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.p1telegram.P1TelegramParser.storeCurrentCosemObject(P1TelegramParser.java:363) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.p1telegram.P1TelegramParser.setState(P1TelegramParser.java:390) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.p1telegram.P1TelegramParser.parseData(P1TelegramParser.java:214) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.DSMRTelegramListener.handleData(DSMRTelegramListener.java:61) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.connector.DSMRBaseConnector.handleDataAvailable(DSMRBaseConnector.java:112) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.connector.DSMRSerialConnector.handleDataAvailable(DSMRSerialConnector.java:305) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.connector.DSMRSerialConnector.serialEvent(DSMRSerialConnector.java:264) [228:org.openhab.binding.dsmr:2.4.0]
	at org.eclipse.smarthome.io.transport.serial.rxtx.RxTxSerialPort$1.serialEvent(RxTxSerialPort.java:81) [204:org.eclipse.smarthome.io.transport.serial.rxtx:0.10.0.oh240]
	at gnu.io.RXTXPort.sendEvent(RXTXPort.java:780) ~[199:com.neuronrobotics.nrjavaserial:3.15.0.OH2]
	at gnu.io.RXTXPort.eventLoop(Native Method) [199:com.neuronrobotics.nrjavaserial:3.15.0.OH2]
	at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1611) [199:com.neuronrobotics.nrjavaserial:3.15.0.OH2]
2019-11-07 21:19:05.680 [WARN ] [device.connector.DSMRSerialConnector] - RuntimeException during handling serial event: 1
java.lang.NumberFormatException: For input string: "3!"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:?]
	at java.lang.Integer.parseInt(Integer.java:580) ~[?:?]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemHexString.getStateValue(CosemHexString.java:47) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemHexString.getStateValue(CosemHexString.java:1) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemObject.parseCosemValues(CosemObject.java:121) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemObjectFactory.getCosemObjectInternal(CosemObjectFactory.java:141) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemObjectFactory.getCosemObject(CosemObjectFactory.java:104) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.p1telegram.P1TelegramParser.storeCurrentCosemObject(P1TelegramParser.java:363) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.p1telegram.P1TelegramParser.setState(P1TelegramParser.java:390) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.p1telegram.P1TelegramParser.parseData(P1TelegramParser.java:214) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.DSMRTelegramListener.handleData(DSMRTelegramListener.java:61) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.connector.DSMRBaseConnector.handleDataAvailable(DSMRBaseConnector.java:112) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.connector.DSMRSerialConnector.handleDataAvailable(DSMRSerialConnector.java:305) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.connector.DSMRSerialConnector.serialEvent(DSMRSerialConnector.java:264) [228:org.openhab.binding.dsmr:2.4.0]
	at org.eclipse.smarthome.io.transport.serial.rxtx.RxTxSerialPort$1.serialEvent(RxTxSerialPort.java:81) [204:org.eclipse.smarthome.io.transport.serial.rxtx:0.10.0.oh240]
	at gnu.io.RXTXPort.sendEvent(RXTXPort.java:780) ~[199:com.neuronrobotics.nrjavaserial:3.15.0.OH2]
	at gnu.io.RXTXPort.eventLoop(Native Method) [199:com.neuronrobotics.nrjavaserial:3.15.0.OH2]
	at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1611) [199:com.neuronrobotics.nrjavaserial:3.15.0.OH2]
2019-11-07 21:19:16.823 [WARN ] [device.connector.DSMRSerialConnector] - RuntimeException during handling serial event: 1
java.lang.NumberFormatException: For input string: "3"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:?]
	at java.lang.Integer.parseInt(Integer.java:580) ~[?:?]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemHexString.getStateValue(CosemHexString.java:47) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemHexString.getStateValue(CosemHexString.java:1) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemObject.parseCosemValues(CosemObject.java:121) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemObjectFactory.getCosemObjectInternal(CosemObjectFactory.java:141) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemObjectFactory.getCosemObject(CosemObjectFactory.java:104) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.p1telegram.P1TelegramParser.storeCurrentCosemObject(P1TelegramParser.java:363) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.p1telegram.P1TelegramParser.setState(P1TelegramParser.java:390) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.p1telegram.P1TelegramParser.parseData(P1TelegramParser.java:214) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.DSMRTelegramListener.handleData(DSMRTelegramListener.java:61) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.connector.DSMRBaseConnector.handleDataAvailable(DSMRBaseConnector.java:112) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.connector.DSMRSerialConnector.handleDataAvailable(DSMRSerialConnector.java:305) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.connector.DSMRSerialConnector.serialEvent(DSMRSerialConnector.java:264) [228:org.openhab.binding.dsmr:2.4.0]
	at org.eclipse.smarthome.io.transport.serial.rxtx.RxTxSerialPort$1.serialEvent(RxTxSerialPort.java:81) [204:org.eclipse.smarthome.io.transport.serial.rxtx:0.10.0.oh240]
	at gnu.io.RXTXPort.sendEvent(RXTXPort.java:780) ~[199:com.neuronrobotics.nrjavaserial:3.15.0.OH2]
	at gnu.io.RXTXPort.eventLoop(Native Method) [199:com.neuronrobotics.nrjavaserial:3.15.0.OH2]
	at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1611) [199:com.neuronrobotics.nrjavaserial:3.15.0.OH2]
2019-11-07 21:19:18.546 [WARN ] [device.connector.DSMRSerialConnector] - RuntimeException during handling serial event: 1
java.lang.NumberFormatException: For input string: "3"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:?]
	at java.lang.Integer.parseInt(Integer.java:580) ~[?:?]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemHexString.getStateValue(CosemHexString.java:47) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemHexString.getStateValue(CosemHexString.java:1) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemObject.parseCosemValues(CosemObject.java:121) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemObjectFactory.getCosemObjectInternal(CosemObjectFactory.java:141) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemObjectFactory.getCosemObject(CosemObjectFactory.java:104) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.p1telegram.P1TelegramParser.storeCurrentCosemObject(P1TelegramParser.java:363) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.p1telegram.P1TelegramParser.setState(P1TelegramParser.java:390) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.p1telegram.P1TelegramParser.parseData(P1TelegramParser.java:214) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.DSMRTelegramListener.handleData(DSMRTelegramListener.java:61) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.connector.DSMRBaseConnector.handleDataAvailable(DSMRBaseConnector.java:112) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.connector.DSMRSerialConnector.handleDataAvailable(DSMRSerialConnector.java:305) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.connector.DSMRSerialConnector.serialEvent(DSMRSerialConnector.java:264) [228:org.openhab.binding.dsmr:2.4.0]
	at org.eclipse.smarthome.io.transport.serial.rxtx.RxTxSerialPort$1.serialEvent(RxTxSerialPort.java:81) [204:org.eclipse.smarthome.io.transport.serial.rxtx:0.10.0.oh240]
	at gnu.io.RXTXPort.sendEvent(RXTXPort.java:780) ~[199:com.neuronrobotics.nrjavaserial:3.15.0.OH2]
	at gnu.io.RXTXPort.eventLoop(Native Method) [199:com.neuronrobotics.nrjavaserial:3.15.0.OH2]
	at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1611) [199:com.neuronrobotics.nrjavaserial:3.15.0.OH2]
2019-11-07 21:19:19.582 [WARN ] [device.connector.DSMRSerialConnector] - RuntimeException during handling serial event: 1
java.lang.NumberFormatException: For input string: "3"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:?]
	at java.lang.Integer.parseInt(Integer.java:580) ~[?:?]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemHexString.getStateValue(CosemHexString.java:47) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemHexString.getStateValue(CosemHexString.java:1) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemObject.parseCosemValues(CosemObject.java:121) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemObjectFactory.getCosemObjectInternal(CosemObjectFactory.java:141) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemObjectFactory.getCosemObject(CosemObjectFactory.java:104) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.p1telegram.P1TelegramParser.storeCurrentCosemObject(P1TelegramParser.java:363) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.p1telegram.P1TelegramParser.setState(P1TelegramParser.java:395) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.p1telegram.P1TelegramParser.parseData(P1TelegramParser.java:218) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.DSMRTelegramListener.handleData(DSMRTelegramListener.java:61) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.connector.DSMRBaseConnector.handleDataAvailable(DSMRBaseConnector.java:112) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.connector.DSMRSerialConnector.handleDataAvailable(DSMRSerialConnector.java:305) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.connector.DSMRSerialConnector.serialEvent(DSMRSerialConnector.java:264) [228:org.openhab.binding.dsmr:2.4.0]
	at org.eclipse.smarthome.io.transport.serial.rxtx.RxTxSerialPort$1.serialEvent(RxTxSerialPort.java:81) [204:org.eclipse.smarthome.io.transport.serial.rxtx:0.10.0.oh240]
	at gnu.io.RXTXPort.sendEvent(RXTXPort.java:780) ~[199:com.neuronrobotics.nrjavaserial:3.15.0.OH2]
	at gnu.io.RXTXPort.eventLoop(Native Method) [199:com.neuronrobotics.nrjavaserial:3.15.0.OH2]
	at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1611) [199:com.neuronrobotics.nrjavaserial:3.15.0.OH2]
2019-11-07 21:21:01.981 [WARN ] [device.connector.DSMRSerialConnector] - RuntimeException during handling serial event: 1
java.lang.NumberFormatException: For input string: "5"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:?]
	at java.lang.Integer.parseInt(Integer.java:569) ~[?:?]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemHexString.getStateValue(CosemHexString.java:47) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemHexString.getStateValue(CosemHexString.java:1) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemObject.parseCosemValues(CosemObject.java:121) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemObjectFactory.getCosemObjectInternal(CosemObjectFactory.java:141) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemObjectFactory.getCosemObject(CosemObjectFactory.java:104) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.p1telegram.P1TelegramParser.storeCurrentCosemObject(P1TelegramParser.java:363) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.p1telegram.P1TelegramParser.setState(P1TelegramParser.java:390) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.p1telegram.P1TelegramParser.parseData(P1TelegramParser.java:214) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.DSMRTelegramListener.handleData(DSMRTelegramListener.java:61) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.connector.DSMRBaseConnector.handleDataAvailable(DSMRBaseConnector.java:112) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.connector.DSMRSerialConnector.handleDataAvailable(DSMRSerialConnector.java:305) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.connector.DSMRSerialConnector.serialEvent(DSMRSerialConnector.java:264) [228:org.openhab.binding.dsmr:2.4.0]
	at org.eclipse.smarthome.io.transport.serial.rxtx.RxTxSerialPort$1.serialEvent(RxTxSerialPort.java:81) [204:org.eclipse.smarthome.io.transport.serial.rxtx:0.10.0.oh240]
	at gnu.io.RXTXPort.sendEvent(RXTXPort.java:780) ~[199:com.neuronrobotics.nrjavaserial:3.15.0.OH2]
	at gnu.io.RXTXPort.eventLoop(Native Method) [199:com.neuronrobotics.nrjavaserial:3.15.0.OH2]
	at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1611) [199:com.neuronrobotics.nrjavaserial:3.15.0.OH2]
2019-11-07 21:22:12.816 [WARN ] [device.connector.DSMRSerialConnector] - RuntimeException during handling serial event: 1
java.lang.NumberFormatException: For input string: "0"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:?]
	at java.lang.Integer.parseInt(Integer.java:569) ~[?:?]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemHexString.getStateValue(CosemHexString.java:47) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemHexString.getStateValue(CosemHexString.java:1) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemObject.parseCosemValues(CosemObject.java:121) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemObjectFactory.getCosemObjectInternal(CosemObjectFactory.java:141) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemObjectFactory.getCosemObject(CosemObjectFactory.java:104) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.p1telegram.P1TelegramParser.storeCurrentCosemObject(P1TelegramParser.java:363) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.p1telegram.P1TelegramParser.setState(P1TelegramParser.java:390) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.p1telegram.P1TelegramParser.parseData(P1TelegramParser.java:214) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.DSMRTelegramListener.handleData(DSMRTelegramListener.java:61) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.connector.DSMRBaseConnector.handleDataAvailable(DSMRBaseConnector.java:112) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.connector.DSMRSerialConnector.handleDataAvailable(DSMRSerialConnector.java:305) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.connector.DSMRSerialConnector.serialEvent(DSMRSerialConnector.java:264) [228:org.openhab.binding.dsmr:2.4.0]
	at org.eclipse.smarthome.io.transport.serial.rxtx.RxTxSerialPort$1.serialEvent(RxTxSerialPort.java:81) [204:org.eclipse.smarthome.io.transport.serial.rxtx:0.10.0.oh240]
	at gnu.io.RXTXPort.sendEvent(RXTXPort.java:780) ~[199:com.neuronrobotics.nrjavaserial:3.15.0.OH2]
	at gnu.io.RXTXPort.eventLoop(Native Method) [199:com.neuronrobotics.nrjavaserial:3.15.0.OH2]
	at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1611) [199:com.neuronrobotics.nrjavaserial:3.15.0.OH2]
2019-11-07 21:23:00.896 [WARN ] [device.connector.DSMRSerialConnector] - RuntimeException during handling serial event: 1
java.lang.NumberFormatException: For input string: "#0"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:?]
	at java.lang.Integer.parseInt(Integer.java:569) ~[?:?]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemHexString.getStateValue(CosemHexString.java:47) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemHexString.getStateValue(CosemHexString.java:1) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemObject.parseCosemValues(CosemObject.java:121) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemObjectFactory.getCosemObjectInternal(CosemObjectFactory.java:141) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemObjectFactory.getCosemObject(CosemObjectFactory.java:104) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.p1telegram.P1TelegramParser.storeCurrentCosemObject(P1TelegramParser.java:363) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.p1telegram.P1TelegramParser.setState(P1TelegramParser.java:390) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.p1telegram.P1TelegramParser.parseData(P1TelegramParser.java:214) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.DSMRTelegramListener.handleData(DSMRTelegramListener.java:61) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.connector.DSMRBaseConnector.handleDataAvailable(DSMRBaseConnector.java:112) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.connector.DSMRSerialConnector.handleDataAvailable(DSMRSerialConnector.java:305) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.connector.DSMRSerialConnector.serialEvent(DSMRSerialConnector.java:264) [228:org.openhab.binding.dsmr:2.4.0]
	at org.eclipse.smarthome.io.transport.serial.rxtx.RxTxSerialPort$1.serialEvent(RxTxSerialPort.java:81) [204:org.eclipse.smarthome.io.transport.serial.rxtx:0.10.0.oh240]
	at gnu.io.RXTXPort.sendEvent(RXTXPort.java:780) ~[199:com.neuronrobotics.nrjavaserial:3.15.0.OH2]
	at gnu.io.RXTXPort.eventLoop(Native Method) [199:com.neuronrobotics.nrjavaserial:3.15.0.OH2]
	at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1611) [199:com.neuronrobotics.nrjavaserial:3.15.0.OH2]
2019-11-07 21:23:02.603 [WARN ] [device.connector.DSMRSerialConnector] - RuntimeException during handling serial event: 1
java.lang.NumberFormatException: For input string: "#0"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:?]
	at java.lang.Integer.parseInt(Integer.java:569) ~[?:?]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemHexString.getStateValue(CosemHexString.java:47) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemHexString.getStateValue(CosemHexString.java:1) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemObject.parseCosemValues(CosemObject.java:121) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemObjectFactory.getCosemObjectInternal(CosemObjectFactory.java:141) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemObjectFactory.getCosemObject(CosemObjectFactory.java:104) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.p1telegram.P1TelegramParser.storeCurrentCosemObject(P1TelegramParser.java:363) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.p1telegram.P1TelegramParser.setState(P1TelegramParser.java:395) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.p1telegram.P1TelegramParser.parseData(P1TelegramParser.java:218) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.DSMRTelegramListener.handleData(DSMRTelegramListener.java:61) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.connector.DSMRBaseConnector.handleDataAvailable(DSMRBaseConnector.java:112) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.connector.DSMRSerialConnector.handleDataAvailable(DSMRSerialConnector.java:305) ~[228:org.openhab.binding.dsmr:2.4.0]
	at org.openhab.binding.dsmr.internal.device.connector.DSMRSerialConnector.serialEvent(DSMRSerialConnector.java:264) [228:org.openhab.binding.dsmr:2.4.0]
	at org.eclipse.smarthome.io.transport.serial.rxtx.RxTxSerialPort$1.serialEvent(RxTxSerialPort.java:81) [204:org.eclipse.smarthome.io.transport.serial.rxtx:0.10.0.oh240]
	at gnu.io.RXTXPort.sendEvent(RXTXPort.java:780) ~[199:com.neuronrobotics.nrjavaserial:3.15.0.OH2]
	at gnu.io.RXTXPort.eventLoop(Native Method) [199:com.neuronrobotics.nrjavaserial:3.15.0.OH2]
	at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1611) [199:com.neuronrobotics.nrjavaserial:3.15.0.OH2]

Based on the logging I would assume you run openHAB 2.4.0.

Can you install the version from the Eclipse IoT Marketplace (You can enable this in PaperUI ->System with Maturity Level Beta) and uninstall the 2.4.0 binding and install the version from the Marketplace.

Sorry, 2.5 was a typo. it’s 2.4.0-1 :slight_smile:

I’ll try tomorrow, thanks for the suggestion. Is the standard binding deprecated then?

No it’s not deprecated, but there have been improvements that are already in 2.5.0-SNAPSHOT, but not in the 2.4.0-1 release. The marketplace binding has these improvements too. It’s only relevant when you’re running 2.4.0. If this versions fixes your problem then use it until you upgrade. Than you can switch back to the version provided with the release.

OK, uninstalled the binding, installed the new one.


It picked up all the existing items without a hitch (phew). But the warning persists:

image

java.lang.NumberFormatException: For input string: "4"

	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:?]

	at java.lang.Integer.parseInt(Integer.java:569) ~[?:?]

	at org.openhab.binding.dsmr.internal.device.cosem.CosemHexString.getStateValue(CosemHexString.java:51) ~[231:org.openhab.binding.dsmr:2.5.0.201903140712]

	at org.openhab.binding.dsmr.internal.device.cosem.CosemHexString.getStateValue(CosemHexString.java:1) ~[231:org.openhab.binding.dsmr:2.5.0.201903140712]

	at org.openhab.binding.dsmr.internal.device.cosem.CosemObject.parseCosemValues(CosemObject.java:125) ~[231:org.openhab.binding.dsmr:2.5.0.201903140712]

	at org.openhab.binding.dsmr.internal.device.cosem.CosemObjectFactory.getCosemObjectInternal(CosemObjectFactory.java:145) ~[231:org.openhab.binding.dsmr:2.5.0.201903140712]

	at org.openhab.binding.dsmr.internal.device.cosem.CosemObjectFactory.getCosemObject(CosemObjectFactory.java:108) ~[231:org.openhab.binding.dsmr:2.5.0.201903140712]

	at org.openhab.binding.dsmr.internal.device.p1telegram.P1TelegramParser.storeCurrentCosemObject(P1TelegramParser.java:380) ~[231:org.openhab.binding.dsmr:2.5.0.201903140712]

	at org.openhab.binding.dsmr.internal.device.p1telegram.P1TelegramParser.setState(P1TelegramParser.java:412) ~[231:org.openhab.binding.dsmr:2.5.0.201903140712]

	at org.openhab.binding.dsmr.internal.device.p1telegram.P1TelegramParser.parse(P1TelegramParser.java:223) ~[231:org.openhab.binding.dsmr:2.5.0.201903140712]

	at org.openhab.binding.dsmr.internal.device.DSMRTelegramListener.handleData(DSMRTelegramListener.java:74) ~[231:org.openhab.binding.dsmr:2.5.0.201903140712]

	at org.openhab.binding.dsmr.internal.device.connector.DSMRBaseConnector.handleDataAvailable(DSMRBaseConnector.java:116) ~[231:org.openhab.binding.dsmr:2.5.0.201903140712]

	at org.openhab.binding.dsmr.internal.device.connector.DSMRSerialConnector.handleDataAvailable(DSMRSerialConnector.java:309) ~[231:org.openhab.binding.dsmr:2.5.0.201903140712]

	at org.openhab.binding.dsmr.internal.device.connector.DSMRSerialConnector.serialEvent(DSMRSerialConnector.java:268) [231:org.openhab.binding.dsmr:2.5.0.201903140712]

	at org.eclipse.smarthome.io.transport.serial.rxtx.RxTxSerialPort$1.serialEvent(RxTxSerialPort.java:81) [204:org.eclipse.smarthome.io.transport.serial.rxtx:0.10.0.oh240]

	at gnu.io.RXTXPort.sendEvent(RXTXPort.java:780) ~[199:com.neuronrobotics.nrjavaserial:3.15.0.OH2]

	at gnu.io.RXTXPort.eventLoop(Native Method) [199:com.neuronrobotics.nrjavaserial:3.15.0.OH2]

	at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1611) [199:com.neuronrobotics.nrjavaserial:3.15.0.OH2]

2019-11-08 20:31:05.413 [WARN ] [device.connector.DSMRSerialConnector] - RuntimeException during handling serial event: 1

java.lang.NumberFormatException: For input string: "4"

	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:?]

	at java.lang.Integer.parseInt(Integer.java:569) ~[?:?]

	at org.openhab.binding.dsmr.internal.device.cosem.CosemHexString.getStateValue(CosemHexString.java:51) ~[231:org.openhab.binding.dsmr:2.5.0.201903140712]

	at org.openhab.binding.dsmr.internal.device.cosem.CosemHexString.getStateValue(CosemHexString.java:1) ~[231:org.openhab.binding.dsmr:2.5.0.201903140712]

	at org.openhab.binding.dsmr.internal.device.cosem.CosemObject.parseCosemValues(CosemObject.java:125) ~[231:org.openhab.binding.dsmr:2.5.0.201903140712]

	at org.openhab.binding.dsmr.internal.device.cosem.CosemObjectFactory.getCosemObjectInternal(CosemObjectFactory.java:145) ~[231:org.openhab.binding.dsmr:2.5.0.201903140712]

	at org.openhab.binding.dsmr.internal.device.cosem.CosemObjectFactory.getCosemObject(CosemObjectFactory.java:108) ~[231:org.openhab.binding.dsmr:2.5.0.201903140712]

	at org.openhab.binding.dsmr.internal.device.p1telegram.P1TelegramParser.storeCurrentCosemObject(P1TelegramParser.java:380) ~[231:org.openhab.binding.dsmr:2.5.0.201903140712]

	at org.openhab.binding.dsmr.internal.device.p1telegram.P1TelegramParser.setState(P1TelegramParser.java:412) ~[231:org.openhab.binding.dsmr:2.5.0.201903140712]

	at org.openhab.binding.dsmr.internal.device.p1telegram.P1TelegramParser.parse(P1TelegramParser.java:223) ~[231:org.openhab.binding.dsmr:2.5.0.201903140712]

	at org.openhab.binding.dsmr.internal.device.DSMRTelegramListener.handleData(DSMRTelegramListener.java:74) ~[231:org.openhab.binding.dsmr:2.5.0.201903140712]

	at org.openhab.binding.dsmr.internal.device.connector.DSMRBaseConnector.handleDataAvailable(DSMRBaseConnector.java:116) ~[231:org.openhab.binding.dsmr:2.5.0.201903140712]

	at org.openhab.binding.dsmr.internal.device.connector.DSMRSerialConnector.handleDataAvailable(DSMRSerialConnector.java:309) ~[231:org.openhab.binding.dsmr:2.5.0.201903140712]

	at org.openhab.binding.dsmr.internal.device.connector.DSMRSerialConnector.serialEvent(DSMRSerialConnector.java:268) [231:org.openhab.binding.dsmr:2.5.0.201903140712]

	at org.eclipse.smarthome.io.transport.serial.rxtx.RxTxSerialPort$1.serialEvent(RxTxSerialPort.java:81) [204:org.eclipse.smarthome.io.transport.serial.rxtx:0.10.0.oh240]

	at gnu.io.RXTXPort.sendEvent(RXTXPort.java:780) ~[199:com.neuronrobotics.nrjavaserial:3.15.0.OH2]

	at gnu.io.RXTXPort.eventLoop(Native Method) [199:com.neuronrobotics.nrjavaserial:3.15.0.OH2]

	at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1611) [199:com.neuronrobotics.nrjavaserial:3.15.0.OH2]

Any other ideas?

Can you run with log level trace? log:set TRACE org.openhab.binding.dsmr Do you know how to set it? This will log the original message so it will be very verbose. And send the log to me via direct message. Then I can see what goes wrong and fix the issue.

I’ve updated the binding in the Eclipse IoT Marketplace. This version is specific for openHAB 2.4.0. It removed the warn log. If you would run with debug level it would still show an exception. But these should not happen when log level is info or higher.

1 Like

Thanks so much!!