DSMR binding on Synology DS418

I have a problem with the DSMR binding on my Synology DS418 running Openhab 2.3 and 64bit oracle java (v191 hardfloat abi). The default DSMR binding just starts without any error, but no things are found. So I installed the beta binding from the eclipse iot market. This produces the following output:

2018-12-10 09:02:21.738 [WARN ] [eclipse.jetty.servlet.ServletHandler] - 
javax.servlet.ServletException: org.glassfish.jersey.server.ContainerException: java.lang.NoSuchMethodError: org.eclipse.smarthome.io.transport.serial.SerialPortIdentifier.isCurrentlyOwned()Z
	at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:489) [167:org.glassfish.jersey.containers.jersey-container-servlet-core:2.22.2]
	at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427) [167:org.glassfish.jersey.containers.jersey-container-servlet-core:2.22.2]
	at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388) [167:org.glassfish.jersey.containers.jersey-container-servlet-core:2.22.2]
	at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341) [167:org.glassfish.jersey.containers.jersey-container-servlet-core:2.22.2]
	at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228) [167:org.glassfish.jersey.containers.jersey-container-servlet-core:2.22.2]
	at com.eclipsesource.jaxrs.publisher.internal.ServletContainerBridge.service(ServletContainerBridge.java:76) [15:com.eclipsesource.jaxrs.publisher:5.3.1.201602281253]
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:848) [85:org.eclipse.jetty.servlet:9.3.21.v20170918]
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:584) [85:org.eclipse.jetty.servlet:9.3.21.v20170918]
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) [183:org.ops4j.pax.web.pax-web-jetty:6.0.9]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) [82:org.eclipse.jetty.security:9.3.21.v20170918]
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) [84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180) [84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:284) [183:org.ops4j.pax.web.pax-web-jetty:6.0.9]
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512) [85:org.eclipse.jetty.servlet:9.3.21.v20170918]
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) [84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112) [84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80) [183:org.ops4j.pax.web.pax-web-jetty:6.0.9]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134) [84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.eclipse.jetty.server.Server.handle(Server.java:534) [84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:333) [84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) [84:org.eclipse.jetty.server:9.3.21.v20170918]
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:283) [76:org.eclipse.jetty.io:9.3.21.v20170918]
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:108) [76:org.eclipse.jetty.io:9.3.21.v20170918]
	at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93) [76:org.eclipse.jetty.io:9.3.21.v20170918]
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303) [87:org.eclipse.jetty.util:9.3.21.v20170918]
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148) [87:org.eclipse.jetty.util:9.3.21.v20170918]
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136) [87:org.eclipse.jetty.util:9.3.21.v20170918]
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671) [87:org.eclipse.jetty.util:9.3.21.v20170918]
	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589) [87:org.eclipse.jetty.util:9.3.21.v20170918]
	at java.lang.Thread.run(Thread.java:748) [?:?]

Does someone has any clue what could be wrong? I also had problems with the Z-Wave binding, caused by nrjavaserial not being compiled for my processor architecture (Realtek RTD1296, aarch64). This issue is solved by the developer of nrjavaserial by recompiling for my architecture. Could this also be the issue for DSMR? Only a few Synology types use the RTD1296 CPU.

Thanks in advance!

Robin

It throws the exception because you’re running a DSMR version that depends on code that is only available in openHAB 2.4.0. So it can be resolved by using an older version of the DSMR addon that doesn’t depend on this 2.4.0 only code or by upgrading openHAB to a 2.4.0 milestone/snapshot version.

1 Like

Thanks, That makes sense.

I re-installed the 2.3 binding and found out how to set the log level to DEBUG. This got me the following log messages:

2018-12-10 16:04:06.765 [DEBUG] [.binding.dsmr.internal.DSMRActivator] - DSMR binding has been started.
2018-12-10 16:04:06.877 [DEBUG] [org.openhab.binding.dsmr            ] - ServiceEvent REGISTERED - {org.openhab.model.item.binding.BindingConfigReader, org.openhab.binding.dsmr.DSMRBindingProvider}={service.id=397, service.bundleid=258, service.scope=bundle, component.name=org.openhab.binding.dsmr.genericbindingprovider, component.id=269} - org.openhab.binding.dsmr
2018-12-10 16:04:06.915 [DEBUG] [ab.binding.dsmr.internal.DSMRBinding] - Activate DSMRBinding
2018-12-10 16:04:06.932 [DEBUG] [org.openhab.binding.dsmr            ] - ServiceEvent REGISTERED - {org.osgi.service.cm.ManagedService}={service.id=398, service.bundleid=258, service.scope=bundle, service.pid=org.openhab.dsmr, component.name=org.openhab.binding.dsmr.binding, component.id=268} - org.openhab.binding.dsmr
2018-12-10 16:04:06.949 [DEBUG] [ab.binding.dsmr.internal.DSMRBinding] - updated() is called!
2018-12-10 16:04:06.952 [DEBUG] [ab.binding.dsmr.internal.DSMRBinding] - dsmr:port=/dev/ttyUSB0
2018-12-10 16:04:06.954 [DEBUG] [ab.binding.dsmr.internal.DSMRBinding] - dsmr:portsettings="115200 8n1"
2018-12-10 16:04:06.978 [DEBUG] [ab.binding.dsmr.internal.DSMRBinding] - dsmr:invalid=null
2018-12-10 16:04:06.980 [DEBUG] [ab.binding.dsmr.internal.DSMRBinding] - dsmr:electricity.channel=null
2018-12-10 16:04:06.980 [DEBUG] [org.openhab.binding.dsmr            ] - BundleEvent STARTED - org.openhab.binding.dsmr
2018-12-10 16:04:07.003 [DEBUG] [ab.binding.dsmr.internal.DSMRBinding] - dsmr:gas.channel=1
2018-12-10 16:04:07.040 [DEBUG] [ab.binding.dsmr.internal.DSMRBinding] - dsmr:water.channel=2
2018-12-10 16:04:07.051 [DEBUG] [ab.binding.dsmr.internal.DSMRBinding] - dsmr:heating.channel=3
2018-12-10 16:04:07.053 [DEBUG] [ab.binding.dsmr.internal.DSMRBinding] - dsmr:cooling.channel=4
2018-12-10 16:04:07.054 [DEBUG] [ab.binding.dsmr.internal.DSMRBinding] - dsmr:generic.channel=5
2018-12-10 16:04:07.056 [DEBUG] [ab.binding.dsmr.internal.DSMRBinding] - dsmr:slaveelectricity.channel=6
2018-12-10 16:04:07.057 [DEBUG] [ab.binding.dsmr.internal.DSMRBinding] - Configuration succeeded
2018-12-10 16:04:07.087 [INFO ] [b.core.service.AbstractActiveService] - DSMR Binding has been started
2018-12-10 16:04:07.093 [DEBUG] [ab.binding.dsmr.internal.DSMRBinding] - There is no existing DSMR binding configuration => refresh cycle aborted!
2018-12-10 16:04:07.596 [DEBUG] [ab.binding.dsmr.internal.DSMRBinding] - There is no existing DSMR binding configuration => refresh cycle aborted!
2018-12-10 16:04:08.105 [DEBUG] [ab.binding.dsmr.internal.DSMRBinding] - There is no existing DSMR binding configuration => refresh cycle aborted!
2018-12-10 16:04:08.607 [DEBUG] [ab.binding.dsmr.internal.DSMRBinding] - There is no existing DSMR binding configuration => refresh cycle aborted!
2018-12-10 16:04:09.109 [DEBUG] [ab.binding.dsmr.internal.DSMRBinding] - There is no existing DSMR binding configuration => refresh cycle aborted!
2018-12-10 16:04:09.611 [DEBUG] [ab.binding.dsmr.internal.DSMRBinding] - There is no existing DSMR binding configuration => refresh cycle aborted!
2018-12-10 16:04:10.115 [DEBUG] [ab.binding.dsmr.internal.DSMRBinding] - There is no existing DSMR binding configuration => refresh cycle aborted!

I thought the DSMR binding was auto discovering, so I didn’t add a .items file yet. Unfortunately this did not solve the problem. I tried the following:

  • Connected the P1 port to my laptop to read the data with putty, works fine
  • added .items file for some dsmr items
  • added the ttyUSB0 to the JAVA_OPTS

No success unfortunately. I have the XS210 ESMR5 smartmeter, just a few weeks old. Could that be the problem?

The old DSMR binding (as available in openHAB) is an openHAB 1.x binding and doesn’t support auto discovery. The new binding is more stable but does require openHAB 2.4. That version is about to be released 17 December. So maybe wait for that or use the snapshot version.

It might also be possible your smart meter is not recognized yet as it’s new as you mentioned and would explain why it doesn’t work with the old binding. If you would run the new version of the binding it will give you more detailed information if your meter is not supported. In that case you can post the detailed log info here (or in a message to me) and I’ll add the meter and update the binding in the market place.

1 Like

Thanks for the help, I will wait for the next release then. I have seen other people on the forum with the same smartmeter working with openhab

Hi Hilbrand.

I am a new user and have setup the system. I have a Synology DS218Play and the P1 USB serial cable. Running openHAB 2.5. I am not able to select the USB port, it’s only showing /dev/ttyACM0. I am even not able to edit the field. Can you give advice? I installed already the Serial AddOn.

Many thanks in advance, Fred

Did you check the serial port documentation as mentioned in the DSMR Binding documentation?: https://www.openhab.org/docs/administration/serial.html
The serial add-on has no relation with the DSMR binding, so having it installed should make no difference in a normal installation.

Hi Hilbrand,

I solved it by downloading the USB Serial port drivers from the Domoticz download site.
ACM0 became ACM1 (USB Z-Stick) and USB0 was listed.

Maybe it can be of help to another person having the same ussues.