DSMR binding Serial Port does not exist

Hi,

I am trying to read the Belgium Smart meter (DSMR 5) via the Cedel Serial to USB.

The binding never comes online and I got this in the standard logs :

2022-10-23 14:28:50.252 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'dsmr:dsmrBridge:88dbeb9ec2' changed from UNINITIALIZED (DISABLED) to INITIALIZING
2022-10-23 14:28:50.272 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'dsmr:dsmrBridge:88dbeb9ec2' changed from INITIALIZING to UNKNOWN
2022-10-23 14:29:26.824 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'dsmr:dsmrBridge:88dbeb9ec2' changed from UNKNOWN to OFFLINE (CONFIGURATION_ERROR): Serial port does not exist.
2022-10-23 14:29:32.468 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'dsmr:dsmrBridge:88dbeb9ec2' changed from OFFLINE (CONFIGURATION_ERROR): Serial port does not exist. to UNKNOWN
2022-10-23 14:30:16.120 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'dsmr:dsmrBridge:88dbeb9ec2' changed from UNKNOWN to UNINITIALIZED
2022-10-23 14:30:16.162 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'dsmr:dsmrBridge:88dbeb9ec2' changed from UNINITIALIZED to UNINITIALIZED (DISABLED)
2022-10-23 14:30:24.455 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'dsmr:dsmrBridge:88dbeb9ec2' changed from UNINITIALIZED (DISABLED) to INITIALIZING
2022-10-23 14:30:24.483 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'dsmr:dsmrBridge:88dbeb9ec2' changed from INITIALIZING to UNKNOWN

and

2022-10-23 14:37:04.602 [WARN ] [device.connector.DSMRSerialConnector] - RuntimeException during handling serial event: 1
java.lang.NullPointerException: null
	at org.openhab.binding.dsmr.internal.device.cosem.OBISIdentifier.<init>(OBISIdentifier.java:94) ~[bundleFile:?]
	at org.openhab.binding.dsmr.internal.device.cosem.CosemObjectFactory.getCosemObject(CosemObjectFactory.java:87) ~[bundleFile:?]
	at org.openhab.binding.dsmr.internal.device.p1telegram.P1TelegramParser.storeCurrentCosemObject(P1TelegramParser.java:405) ~[bundleFile:?]
	at org.openhab.binding.dsmr.internal.device.p1telegram.P1TelegramParser.setState(P1TelegramParser.java:437) ~[bundleFile:?]
	at org.openhab.binding.dsmr.internal.device.p1telegram.P1TelegramParser.parse(P1TelegramParser.java:234) ~[bundleFile:?]
	at org.openhab.binding.dsmr.internal.device.DSMRTelegramListener.handleData(DSMRTelegramListener.java:74) ~[bundleFile:?]
	at org.openhab.binding.dsmr.internal.device.connector.DSMRBaseConnector.handleDataAvailable(DSMRBaseConnector.java:116) ~[bundleFile:?]
	at org.openhab.binding.dsmr.internal.device.connector.DSMRSerialConnector.handleDataAvailable(DSMRSerialConnector.java:317) ~[bundleFile:?]
	at org.openhab.binding.dsmr.internal.device.connector.DSMRSerialConnector.serialEvent(DSMRSerialConnector.java:276) [bundleFile:?]
	at org.openhab.core.io.transport.serial.rxtx.RxTxSerialPort$1.serialEvent(RxTxSerialPort.java:82) [bundleFile:?]
	at gnu.io.RXTXPort.sendEvent(RXTXPort.java:834) ~[bundleFile:5.2.1.OH1]
	at gnu.io.RXTXPort.eventLoop(Native Method) [bundleFile:5.2.1.OH1]
	at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:108) [bundleFile:5.2.1.OH1]

I can read the information perfectly with screen /dev/ttyUSB0 115200 and via the serial binding on the same port.

DSMR Binding is version 3.3.0 on mint installed openhabian.

What did I miss ?

Your standard log suggest openHAB can’t read the serial port. This might be an access rights issue. Check the documentation to see if this might help: Serial Port Configuration | openHAB

The runtime exception is strange. Looking at the code I would not expect it to throw a null pointer at that line. So I’m not sure what is happening. It also doesn’t seem to be related to standard log errors it give as that error message is only triggered when it cant find the port. If the serial port documentation did provide a y new insights can you run with log level trace and send me the log via direct message.

To close this item :

using the Cedel Serial to USB cable, I noticed that in combination with a Raspberry Pi 3 Model B rev a52082 and 3 Model B rev a22082, this device does not work as expected…

In combinatoin with Raspberry Pi 4 Model B rev c0311, it works.

The probleem reading the data from the meter has nothing to do with the binding.

Nevertheless, thanks to @hilbrand for the effort.

1 Like