KuguHome / openhab-binding-wmbus

openHAB binding to receive and decode WMBus messages (OMS+Techem)
https://www.kugu-home.com/
Eclipse Public License 1.0
20 stars 11 forks source link

openhab 3.1.1 wont start with wmbus binding #9

Open WiredLife opened 2 years ago

WiredLife commented 2 years ago

if i start openhab with the org.openhab.binding.wmbus-3.1.0-SNAPSHOT-20210805 included in /usr/share/openhab/addons i get this error following by many errors which kill any binding which uses serial communication

16:28:37.949 [WARN ] [ommon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception: java.lang.NoClassDefFoundError: org/openhab/core/io/transport/serial/UnsupportedCommOperationException at org.openmuc.jrxtx.SerialPortBuilder.build(SerialPortBuilder.java:140) ~[?:?] at org.openmuc.jmbus.transportlayer.SerialLayer.open(SerialLayer.java:30) ~[?:?] at org.openmuc.jmbus.wireless.AbstractWMBusConnection.open(AbstractWMBusConnection.java:77) ~[?:?] at org.openmuc.jmbus.wireless.WMBusConnection$Builder.build(WMBusConnection.java:162) ~[?:?] at org.openmuc.jmbus.wireless.WMBusConnection$WMBusSerialBuilder.build(WMBusConnection.java:98) ~[?:?] at org.openhab.binding.wmbus.handler.WMBusBridgeHandler.lambda$0(WMBusBridgeHandler.java:135) ~[?:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?] at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[?:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?] at java.lang.Thread.run(Thread.java:829) [?:?] Caused by: java.lang.ClassNotFoundException: org.openhab.core.io.transport.serial.UnsupportedCommOperationException cannot be found by org.openhab.binding.wmbus_3.1.0.202108051905 at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:519) ~[org.eclipse.osgi-3.16.200.jar:?] at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:171) ~[org.eclipse.osgi-3.16.200.jar:?] at java.lang.ClassLoader.loadClass(ClassLoader.java:522) ~[?:?] ... 12 more

if i start openhab without it and put it there later, all runs ok

is there a solution to fix this?

JensHoRi commented 2 years ago

Hello WiredLife,

as I just found out, it has to do something with the serial handler.

So please install add-on wmbus as latest, so after Update install bindings like EnOcean oder ZWave (depends what you need) first, and if everything is up and running (give at least 15-30 minutes I think), then put the wmbus.jar in the addon folder.

For my system this works.

Otherwise if wmbus is installed first, it seems to use a wrong serial or has got an unresolved dependency in newer version of openhab. Please let us know here if it works for you too.

JensHoRi commented 2 years ago

Just one additional hint: same procedure works with 3.2.0-1 and wmbus binding snapshot 20210805 too. Wait until everything ist installed, up and running, after that put Snapshot in adding folder