S300TH binding and openHAB2

openhab2
cul
s300th
Tags: #<Tag:0x00007f51eb53dce0> #<Tag:0x00007f51eb53da38> #<Tag:0x00007f51eb53d560>

(Martin) #1

Hello all,

just trying to migrate from Raspbian/openHAB1 to openHABian/openHAB2.

Lots of work and at the moment I am struggeling with S300TH. I got a CUL stick and 4 temperature/huminity indoor sensors plus an outdoor weather station for wind, rain and also temperature and huminty. So I really want to get it working again. :wink:

What I tried is putting org.openhab.binding.s300th-1.8.3.jar into /usr/share/openhab2/addons and the old configuration into /etc/openhab2/services/s300th.cfg and restarted OH2. Unfortunally I got an error message in openhab.log. It’s a lot of lines but basically I think that this is the essence of it:

Unexpected problem updating configuration org.openhab.s300th
java.lang.NoClassDefFoundError: org/openhab/io/transport/cul/CULManager

So I thought it might be a good idea putting org.openhab.io.transport.cul-1.8.3.jar into /usr/share/openhab2/addons, too. But nothing changed, the error stayed the same.

Then I stumbled upon this thread here in the forum but to be honest it is a bit to much for me. It starts with that I cannot find the files mentioned (I mean the 1.9.0 SNAPSHOT jar files), also in general I am having problems finding jar files for download.

It’s two things I am hoping for: That someone here can help me with my problem or maybe just put me into the right direction. And the second thing is that the S300TH binding will make it into the official release as I would think a lot of people are still using their expensive CUL sticks and the sensors.

Thank you very much,
Roi


(SiHui) #2

You need to install the compatibility layer:

http://docs.openhab.org/developers/development/compatibilitylayer.html#how-to-use-openhab-1x-add-ons-that-are-not-part-of-the-distribution


(Martin) #3

Thank you @sihui, just performed that and restarted OH2. Nothing changed, I still see the error I posted above in my first post.


(Martin) #4

I wanted to bump this threaed up again. Maybe someone has some more ideas. Here’s the complete error from the openhab.log file:

2017-05-09 10:56:45.610 [ERROR] [org.apache.felix.configadmin        ] - [org.osgi.service.event.EventHandler, org.osgi.service.cm.ManagedService, id=333, bundle=208/file:/usr/share/openhab2/addons/org.openhab.binding.s300th-1.8.3.jar]: Unexpected problem updating configuration org.openhab.s300th
java.lang.NoClassDefFoundError: org/openhab/io/transport/cul/CULManager
        at org.openhab.binding.s300th.internal.S300THBinding.openCUL(S300THBinding.java:82)
        at org.openhab.binding.s300th.internal.S300THBinding.setNewDeviceName(S300THBinding.java:77)
        at org.openhab.binding.s300th.internal.S300THBinding.updated(S300THBinding.java:149)
        at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updated(ManagedServiceTracker.java:189)[3:org.apache.felix.configadmin:1.8.12]
        at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:152)[3:org.apache.felix.configadmin:1.8.12]
        at org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:85)[3:org.apache.felix.configadmin:1.8.12]
        at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.provide(ConfigurationManager.java:1461)[3:org.apache.felix.configadmin:1.8.12]
        at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.run(ConfigurationManager.java:1417)[3:org.apache.felix.configadmin:1.8.12]
        at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:141)[3:org.apache.felix.configadmin:1.8.12]
        at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:109)[3:org.apache.felix.configadmin:1.8.12]
        at java.lang.Thread.run(Thread.java:748)[:1.8.0_131]
Caused by: java.lang.ClassNotFoundException: org.openhab.io.transport.cul.CULManager cannot be found by org.openhab.binding.s300th_1.8.3
        at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:389)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:352)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
        at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)[:1.8.0_131]
        ... 11 more

(Patrick Ruckstuhl) #5

It looks like you’re missing the cul transport binding. This is the feature openhab-transport-cul

See also my response here: Testing help needed for CUL refactoring


(Martin) #6

@tarioch thank you for your reply! Do you mean openhab-transport-cul1? Because there is no openhab-transport-cul on my installation, which is the current 2.1 snapshot of openHABian.

I tried this before and it did not work. Just tried it again. This is the error:

2017-05-09 20:32:36.144 [ERROR] [org.apache.felix.configadmin        ] - [org.osgi.service.event.EventHandler, org.osgi.service.cm.ManagedService, id=330, bundle=9/file:/usr/share/openhab2/addons/org.openhab.binding.s300th-1.8.3.jar]: Unexpected problem updating configuration org.openhab.s300th
java.lang.NoClassDefFoundError: org/openhab/io/transport/cul/CULManager
        at org.openhab.binding.s300th.internal.S300THBinding.openCUL(S300THBinding.java:82)
        at org.openhab.binding.s300th.internal.S300THBinding.setNewDeviceName(S300THBinding.java:77)
        at org.openhab.binding.s300th.internal.S300THBinding.updated(S300THBinding.java:149)
        at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updated(ManagedServiceTracker.java:189)[3:org.apache.felix.configadmin:1.8.12]
        at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:152)[3:org.apache.felix.configadmin:1.8.12]
        at org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:85)[3:org.apache.felix.configadmin:1.8.12]
        at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.provide(ConfigurationManager.java:1461)[3:org.apache.felix.configadmin:1.8.12]
        at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.run(ConfigurationManager.java:1417)[3:org.apache.felix.configadmin:1.8.12]
        at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:141)[3:org.apache.felix.configadmin:1.8.12]
        at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:109)[3:org.apache.felix.configadmin:1.8.12]
        at java.lang.Thread.run(Thread.java:748)[:1.8.0_131]
Caused by: java.lang.ClassNotFoundException: org.openhab.io.transport.cul.CULManager cannot be found by org.openhab.binding.s300th_1.8.3
        at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:389)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:352)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
        at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)[:1.8.0_131]
        ... 11 more

What I also tried: Next to org.openhab.binding.s300th-1.8.3.jar I also linked org.openhab.io.transport.cul-1.8.3.jar into /usr/share/openhab2/addons - which also produced an error. The error vanished today when I took a closer look to it and found that gnu.io is missing. So I loaded openhab-transport-serial in the OH shell with feature:install openhab-transport-serial, then, as mentioned, the error was gone. But the S300TH binding was loaded when OH was restarted but then after 2-3 minutes it was stopped. Without any error visible in the log.

Now, I remove org.openhab.io.transport.cul-1.8.3.jar from /usr/share/openhab2/addons and loaded openhab-transport-cul1 through the OH shell - which produced the error above. The error stays also when I uninstall openhab-transport-serial again through the OH shell.

I am missing something here, I’m sure. Or is it the wrong versions? You are mentioning newer versions, 1.9.x snapshot. Where can I download these? Was there changes in these versions comparing to the 1.8.3 I extracted from the OH1 debian packages?


(Patrick Ruckstuhl) #7

Try to enable the intertechno cul binding (through paper ui) and then try the s300th binding, this should hopefully get you all the dependencies you need for s300th.


(Martin) #8

Thank you! Unfortunally it did not work. I enabled Intertechno binding (I did not see a Intertechno CUL binding) and got this error when restarting OH2:

2017-05-21 19:39:54.722 [ERROR] [org.apache.felix.configadmin        ] - [org.osgi.service.event.EventHandler, org.osgi.service.cm.ManagedService, id=330, bundle=9/file:/usr/share/openhab2/addons/org.openhab.binding.s300th-1.8.3.jar]: Unexpected problem updating configuration org.openhab.s300th
java.lang.NoClassDefFoundError: org/openhab/io/transport/cul/CULManager
        at org.openhab.binding.s300th.internal.S300THBinding.openCUL(S300THBinding.java:82)
        at org.openhab.binding.s300th.internal.S300THBinding.setNewDeviceName(S300THBinding.java:77)
        at org.openhab.binding.s300th.internal.S300THBinding.updated(S300THBinding.java:149)
        at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updated(ManagedServiceTracker.java:189)[3:org.apache.felix.configadmin:1.8.12]
        at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:152)[3:org.apache.felix.configadmin:1.8.12]
        at org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:85)[3:org.apache.felix.configadmin:1.8.12]
        at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.provide(ConfigurationManager.java:1461)[3:org.apache.felix.configadmin:1.8.12]
        at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.run(ConfigurationManager.java:1417)[3:org.apache.felix.configadmin:1.8.12]
        at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:141)[3:org.apache.felix.configadmin:1.8.12]
        at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:109)[3:org.apache.felix.configadmin:1.8.12]
        at java.lang.Thread.run(Thread.java:748)[:1.8.0_131]
Caused by: java.lang.ClassNotFoundException: org.openhab.io.transport.cul.CULManager cannot be found by org.openhab.binding.s300th_1.8.3
        at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:389)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:352)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
        at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)[:1.8.0_131]
        ... 11 more
2017-05-21 19:39:55.443 [WARN ] [io.transport.cul.CULLifecycleManager] - CUL config is NULL, doing nothing

This was the only change I did to the system.


(Paul) #9

Hello!
I have nearly the same problem, did you find a solution?
Greetings,
Paul


(Paul) #10

ok, the issue is solved for me: taking the last snapshot (1.14.0) of the s300th binding cleared the error.
Greetings,
Paul