DSMR binding suitable for Belgium Smart Meters

Hi,

I have a smart meter installation in Belgium. I’ve read that they are compliant with the Dutch smart meters DSMR 5. But they’ve mentioned that there are small differences in the data transfered. Has anyone tried out this binding?

KR

Jan

2 Likes

It’s based on the Dutch DSMR, but not exactly matches all data. There is a pull request (#6645) to add specific support for Belgium meters. You can manually download and install a jar from here: https://github.com/Hilbrand/openhab-addons/releases/tag/dsmr_emucs

great. That was exactly the answer I was hoping for ;).
I will give it a try. You mentioned in the PR that this is tested by a belgium customer. What was the set up there (raspberry, pc, …)

Here is the thread that started it: DSMR Gas reading I don’t know what he is using, I suspect Raspberry Pi as the port was linux type.

Hey, I tested it and the original binding works but only for electricity. The gas reading was not included. With the great help of Hilbrand who updated the binding it works now for the Belgian Fluvius meters including gas reading.

Correct, I’m using a Raspberry Pi.

1 Like

Hi,

stupid question, but I finally got all the materials I need to link it to the meter.
But now I get the error “serial port already in use”. How does this come? Or is there another thread that is tackling this?

Btw, I added it manually because he didn’t found it. Probably due to the error I get now.

Kind regards and already much thanks for the help.

Check the DSMR documentation, there is a link to the serial configuration settings. Remove the manual configuration, and just to be sure restart the whole system, because if your port was in use due to some misconfiguration it won’t unlock anymore until restart. This should normally not be needed, but since I have no idea what you have done this is just a precaution measure.

First of all thanks for the feedback Hilbrand.
I’m running it on a raspberry pi. So i followed the documentation to enable the serial ports through the openhabian-config tool.

I rebooted the system. but still he can not find any binding.
I’ve tested with the two possible configuration of the openhabian-config tool. I’ve tried the two possible usb ports.

Rebooted a couple of times, but still nothing found in the auto discovery :(.

To get more information on what is happening you can enable logging: log:set TRACE org.openhab.binding.dsmr

Here is the output of the debug statements. I suppose that the reason I got the error was an impatient of my side. But still no connection. Btw, this is the cable I’m using: https://webshop.cedel.nl/Slimme-meter-kabel-P1-naar-USB

2020-01-12 18:22:47.144 [DEBUG] [discovery.DSMRBridgeDiscoveryService] - 
Started DSMR discovery scan
2020-01-12 18:22:47.172 [DEBUG] [discovery.DSMRBridgeDiscoveryService] - Start discovery on serial port: /dev/ttyUSB0
2020-01-12 18:22:47.177 [DEBUG] [internal.device.DSMRSerialAutoDevice] - Initialized port '/dev/ttyUSB0'
2020-01-12 18:22:47.180 [DEBUG] [internal.device.DSMRSerialAutoDevice] - Stop discovery of port settings.
2020-01-12 18:22:47.185 [TRACE] [device.connector.DSMRSerialConnector] - Opening port /dev/ttyUSB0
2020-01-12 18:22:47.199 [TRACE] [device.connector.DSMRSerialConnector] - Configure serial port parameters: Baudrate:115200, databits:8, parity:none, stopbits:1
2020-01-12 18:22:47.205 [TRACE] [device.connector.DSMRSerialConnector] - SerialPort opened successful on /dev/ttyUSB0
2020-01-12 18:23:12.209 [DEBUG] [internal.device.DSMRSerialAutoDevice] - Discover port settings is running for half time now and still nothing discovered, switching baudrate and retrying
2020-01-12 18:23:12.214 [DEBUG] [device.connector.DSMRSerialConnector] - Update port /dev/ttyUSB0 with settings: Baudrate:9600, databits:7, parity:even, stopbits:1
2020-01-12 18:23:37.209 [DEBUG] [internal.device.DSMRSerialAutoDevice] - Discover port settings is running for half time now and still nothing discovered, switching baudrate and retrying
2020-01-12 18:23:37.211 [DEBUG] [device.connector.DSMRSerialConnector] - Update port /dev/ttyUSB0 with settings: Baudrate:115200, databits:8, parity:none, stopbits:1
2020-01-12 18:24:02.209 [DEBUG] [internal.device.DSMRSerialAutoDevice] - Discover port settings is running for half time now and still nothing discovered, switching baudrate and retrying
2020-01-12 18:24:02.211 [DEBUG] [device.connector.DSMRSerialConnector] - Update port /dev/ttyUSB0 with settings: Baudrate:9600, databits:7, parity:even, stopbits:1
2020-01-12 18:24:27.209 [DEBUG] [internal.device.DSMRSerialAutoDevice] - Stop discovery of port settings.
2020-01-12 18:24:27.210 [DEBUG] [internal.device.DSMRSerialAutoDevice] - Discover port settings is running for half time now and still nothing discovered, switching baudrate and retrying
2020-01-12 18:24:27.213 [DEBUG] [discovery.DSMRBridgeDiscoveryService] - [/dev/ttyUSB0] Error on port during discovery: DONT_EXISTS
2020-01-12 18:24:27.215 [DEBUG] [discovery.DSMRBridgeDiscoveryService] - Stop discovery scan on port [/dev/ttyUSB0].
2020-01-12 18:24:27.214 [DEBUG] [device.connector.DSMRSerialConnector] - Update port /dev/ttyUSB0 with settings: Baudrate:115200, databits:8, parity:none, stopbits:1
2020-01-12 18:24:27.217 [TRACE] [r.internal.device.DSMRDeviceRunnable] - Device shutdown
2020-01-12 18:24:27.221 [DEBUG] [device.connector.DSMRSerialConnector] - Closing DSMR serial port
2020-01-12 18:24:27.251 [DEBUG] [internal.device.DSMRSerialAutoDevice] - Stop discovery of port settings.
2020-01-12 18:24:27.255 [TRACE] [internal.device.DSMRSerialAutoDevice] - stopped with state:ERROR
2020-01-12 18:24:27.259 [DEBUG] [discovery.DSMRBridgeDiscoveryService] - Start discovery on serial port: /dev/ttyAMA0
2020-01-12 18:24:27.263 [DEBUG] [internal.device.DSMRSerialAutoDevice] - Initialized port '/dev/ttyAMA0'
2020-01-12 18:24:27.266 [DEBUG] [internal.device.DSMRSerialAutoDevice] - Stop discovery of port settings.
2020-01-12 18:24:27.269 [TRACE] [device.connector.DSMRSerialConnector] - Opening port /dev/ttyAMA0
2020-01-12 18:24:27.278 [TRACE] [device.connector.DSMRSerialConnector] - Configure serial port parameters: Baudrate:115200, databits:8, parity:none, stopbits:1
2020-01-12 18:24:27.281 [TRACE] [device.connector.DSMRSerialConnector] - SerialPort opened successful on /dev/ttyAMA0
2020-01-12 18:24:52.284 [DEBUG] [internal.device.DSMRSerialAutoDevice] - Discover port settings is running for half time now and still nothing discovered, switching baudrate and retrying
2020-01-12 18:24:52.286 [DEBUG] [device.connector.DSMRSerialConnector] - Update port /dev/ttyAMA0 with settings: Baudrate:9600, databits:7, parity:even, stopbits:1
2020-01-12 18:25:17.284 [DEBUG] [internal.device.DSMRSerialAutoDevice] - Discover port settings is running for half time now and still nothing discovered, switching baudrate and retrying
2020-01-12 18:25:17.286 [DEBUG] [device.connector.DSMRSerialConnector] - Update port /dev/ttyAMA0 with settings: Baudrate:115200, databits:8, parity:none, stopbits:1
2020-01-12 18:25:42.285 [DEBUG] [internal.device.DSMRSerialAutoDevice] - Discover port settings is running for half time now and still nothing discovered, switching baudrate and retrying
2020-01-12 18:25:42.287 [DEBUG] [device.connector.DSMRSerialConnector] - Update port /dev/ttyAMA0 with settings: Baudrate:9600, databits:7, parity:even, stopbits:1
2020-01-12 18:26:07.285 [DEBUG] [internal.device.DSMRSerialAutoDevice] - Discover port settings is running for half time now and still nothing discovered, switching baudrate and retrying
2020-01-12 18:26:07.284 [DEBUG] [internal.device.DSMRSerialAutoDevice] - Stop discovery of port settings.
2020-01-12 18:26:07.287 [DEBUG] [device.connector.DSMRSerialConnector] - Update port /dev/ttyAMA0 with settings: Baudrate:115200, databits:8, parity:none, stopbits:1
2020-01-12 18:26:07.289 [DEBUG] [discovery.DSMRBridgeDiscoveryService] - [/dev/ttyAMA0] Error on port during discovery: DONT_EXISTS
2020-01-12 18:26:07.292 [DEBUG] [discovery.DSMRBridgeDiscoveryService] - Stop discovery scan on port [/dev/ttyAMA0].
2020-01-12 18:26:07.295 [TRACE] [r.internal.device.DSMRDeviceRunnable] - Device shutdown
2020-01-12 18:26:07.298 [DEBUG] [device.connector.DSMRSerialConnector] - Closing DSMR serial port
2020-01-12 18:26:07.352 [DEBUG] [internal.device.DSMRSerialAutoDevice] - Stop discovery of port settings.
2020-01-12 18:26:07.356 [TRACE] [internal.device.DSMRSerialAutoDevice] - stopped with state:ERROR
2020-01-12 18:26:07.360 [DEBUG] [discovery.DSMRBridgeDiscoveryService] - Stop discovery scan on port [].
2020-01-12 18:26:07.362 [DEBUG] [discovery.DSMRBridgeDiscoveryService] - Stop DSMR discovery scan

It seems to make a connection but doesn’t look it receives any data. You might connect with a Linux command to check the serial connection and see if you receive anything at all. I don’t have the exact commands at hand, so a Google search could give you some options.

I’ve tried the cu program, but indeed don’t receive any data. @SuysH did you have any issues? Which cable do you use?

KR

Jan

Hey,
If you take a computer and look via the program Putty or any other terminal program and see if there is coming data on the USB.
Did you ask Fluvius for an login account and via there to enable the P1 port of your meter? I remember that it was not evident to find the way thru the menus on the website and that you first need access to the port and if you have access you need to enable it also.
Regards, Hans

That explains alot ;). No I did not do that. I will take a look where to do that.

Kind Regards

Jan

1 Like

To be honest, I know this document, but I did not read it entirely :wink: Now I’ve found the section activation.

I’ve found it. Really many thanks for this. This is not clear in all those documents.

Hi, a really stupid noob question, but how do you install this?

steps that I did:

  1. install the official dsmr binding
  2. copy the jar file that you provided in the addons folder
  3. bundle:uninstall of the official binding

but that did not do the trick I guess. I still have not all the data.
To be honest, before installing the snapshot version, I did already added the things. I only got once the error of wrong format in my log file.
Did I do something wrong?

see image

I think you already have your answer. Just remove the things and start a discovery.