Tellstick binding for OpenHab2

I don’t understand why all the imports are failing now, is something major changed ?

A binding should never depend on the logback implementation, but only on the org.slf4j logger interfaces.
Logback is not part of openHAB 2 anymore, this is the reason for the message above.

Ok, I can’t remember why I had to add those. It got issues with many other imports after fixing logback.
I guess I just have to try them all then.

Jarle

I am not able to get it to work, I am getting these on many of the imports.
Unresolved requirement: Import-Package: com.google.common.collect
Unresolved requirement: Import-Package: org.apache.http

Any clues ? I have tried to compare my manifest with other modules without finding anything.

Working tellstick binding

Make sure to install it using the install function in felix, I wasted hours trying to install it the old way using the addon folder.

If you get into trouble with not initalized items (when you have like 10+) then add this to your riuntime.cfg

org.eclipse.smarthome.threadpool:thingHandler=10,10000
org.eclipse.smarthome.threadpool:thingManager=11,11111
org.eclipse.smarthome.threadpool:ConfigStatusService=10,100

Is the dropbox link from jan 21 the correct one? It still is named …20150821… which sounds old? And dropbox says its 6 months old.
Also im still getting "Unresolved requirement: Import-Package: ch.qos.logback.classic; version=“1.0.7"” =)

/C

If i run the command like, “openhab>bundle:list -s |grep tellstick” I got the answer like “167 | Active | 80 | 1.9.0.201601190212 | org.openhab.binding.tellstick”.
So I asume your tellstick-binding is an old one.
I’m running openhab2 version 2.0.0.b2

Ya im running the 1.9 version aswell now, but i thought it was a new 2.0 version since the link seems to indicate that. but the file seems old.

/C

I’ve uploaded a new version, this has been running perfect for me for some weeks.

Awesome! ill give it a test.

/C

When i add it the first time it works. After i restart oh2 i get this.

09:11:35.165 [ERROR] [ome.core.thing.internal.ThingManager] - Exception occured while calling thing handler factory ‘org.openhab.binding.tellstick.internal.TellstickHandlerFactory@674da01e’: java.lang.ClassCastException: org.eclipse.smarthome.core.thing.internal.ThingImpl cannot be cast to org.eclipse.smarthome.core.thing.Bridge
java.util.concurrent.ExecutionException: java.lang.ClassCastException: org.eclipse.smarthome.core.thing.internal.ThingImpl cannot be cast to org.eclipse.smarthome.core.thing.Bridge
at java.util.concurrent.FutureTask.report(FutureTask.java:122)[:1.8.0_72]
at java.util.concurrent.FutureTask.get(FutureTask.java:206)[:1.8.0_72]
at org.eclipse.smarthome.core.common.SafeMethodCaller.callAsynchronous(SafeMethodCaller.java:179)[88:org.eclipse.smarthome.core:0.8.0.201602251230]
at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:72)[88:org.eclipse.smarthome.core:0.8.0.201602251230]
at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:56)[88:org.eclipse.smarthome.core:0.8.0.201602251230]
at org.eclipse.smarthome.core.thing.internal.ThingManager.registerHandler(ThingManager.java:559)[94:org.eclipse.smarthome.core.thing:0.8.0.201602251230]
at org.eclipse.smarthome.core.thing.internal.ThingManager.registerHandler(ThingManager.java:526)[94:org.eclipse.smarthome.core.thing:0.8.0.201602251230]
at org.eclipse.smarthome.core.thing.internal.ThingManager.thingAdded(ThingManager.java:429)[94:org.eclipse.smarthome.core.thing:0.8.0.201602251230]
at org.eclipse.smarthome.core.thing.internal.ThingRegistryImpl.notifyTrackers(ThingRegistryImpl.java:206)[94:org.eclipse.smarthome.core.thing:0.8.0.201602251230]
at org.eclipse.smarthome.core.thing.internal.ThingRegistryImpl.notifyListenersAboutAddedElement(ThingRegistryImpl.java:125)[94:org.eclipse.smarthome.core.thing:0.8.0.201602251230]
at org.eclipse.smarthome.core.thing.internal.ThingRegistryImpl.notifyListenersAboutAddedElement(ThingRegistryImpl.java:1)[94:org.eclipse.smarthome.core.thing:0.8.0.201602251230]
at org.eclipse.smarthome.core.common.registry.AbstractRegistry.added(AbstractRegistry.java:58)[88:org.eclipse.smarthome.core:0.8.0.201602251230]
at org.eclipse.smarthome.core.common.registry.AbstractProvider.notifyListeners(AbstractProvider.java:51)[88:org.eclipse.smarthome.core:0.8.0.201602251230]
at org.eclipse.smarthome.core.common.registry.AbstractProvider.notifyListeners(AbstractProvider.java:70)[88:org.eclipse.smarthome.core:0.8.0.201602251230]
at org.eclipse.smarthome.core.common.registry.AbstractProvider.notifyListenersAboutAddedElement(AbstractProvider.java:74)[88:org.eclipse.smarthome.core:0.8.0.201602251230]
at org.eclipse.smarthome.model.thing.internal.GenericThingProvider.access$8(GenericThingProvider.java:1)[117:org.eclipse.smarthome.model.thing:0.8.0.201602251230]
at org.eclipse.smarthome.model.thing.internal.GenericThingProvider$11.apply(GenericThingProvider.java:618)[117:org.eclipse.smarthome.model.thing:0.8.0.201602251230]
at org.eclipse.smarthome.model.thing.internal.GenericThingProvider$11.apply(GenericThingProvider.java:1)[117:org.eclipse.smarthome.model.thing:0.8.0.201602251230]
at org.eclipse.xtext.xbase.lib.IterableExtensions.forEach(IterableExtensions.java:399)[128:org.eclipse.xtext.xbase.lib:2.6.2.v201407030533]
at org.eclipse.smarthome.model.thing.internal.GenericThingProvider.modelChanged(GenericThingProvider.java:621)[117:org.eclipse.smarthome.model.thing:0.8.0.201602251230]
at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.notifyListeners(ModelRepositoryImpl.java:200)[106:org.eclipse.smarthome.model.core:0.8.0.201602251230]
at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.addOrRefreshModel(ModelRepositoryImpl.java:97)[106:org.eclipse.smarthome.model.core:0.8.0.201602251230]
at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.checkFile(FolderObserver.java:240)[106:org.eclipse.smarthome.model.core:0.8.0.201602251230]
at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.notifyUpdateToModelRepo(FolderObserver.java:169)[106:org.eclipse.smarthome.model.core:0.8.0.201602251230]
at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.updated(FolderObserver.java:150)[106:org.eclipse.smarthome.model.core:0.8.0.201602251230]
at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updated(ManagedServiceTracker.java:189)[7:org.apache.felix.configadmin:1.8.8]
at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:152)[7:org.apache.felix.configadmin:1.8.8]
at org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:85)[7:org.apache.felix.configadmin:1.8.8]
at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.provide(ConfigurationManager.java:1444)[7:org.apache.felix.configadmin:1.8.8]
at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.run(ConfigurationManager.java:1400)[7:org.apache.felix.configadmin:1.8.8]
at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:143)[7:org.apache.felix.configadmin:1.8.8]
at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:110)[7:org.apache.felix.configadmin:1.8.8]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_72]
Caused by: java.lang.ClassCastException: org.eclipse.smarthome.core.thing.internal.ThingImpl cannot be cast to org.eclipse.smarthome.core.thing.Bridge
at org.openhab.binding.tellstick.internal.TellstickHandlerFactory.createHandler(TellstickHandlerFactory.java:64)[174:org.openhab.binding.tellstick:2.0.0.201602212121]
at org.eclipse.smarthome.core.thing.binding.BaseThingHandlerFactory.registerHandler(BaseThingHandlerFactory.java:113)[94:org.eclipse.smarthome.core.thing:0.8.0.201602251230]
at org.eclipse.smarthome.core.thing.internal.ThingManager$6.call(ThingManager.java:563)[94:org.eclipse.smarthome.core.thing:0.8.0.201602251230]
at org.eclipse.smarthome.core.thing.internal.ThingManager$6.call(ThingManager.java:1)[94:org.eclipse.smarthome.core.thing:0.8.0.201602251230]
at org.eclipse.smarthome.core.common.SafeMethodCaller$CallableWrapper.call(SafeMethodCaller.java:170)[88:org.eclipse.smarthome.core:0.8.0.201602251230]
at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_72]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_72]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_72]
… 1 more

Try to restart again, I have seen that error a few times. But it normally
goes away.

The binding is installed and its listed as installed in bundle:list but if i run bundle:start 151 i get this:

Error executing command: Error executing command on bundles:
Error starting bundle151: Could not resolve module: org.openhab.binding.tellstick [151]
Unresolved requirement: Import-Package: org.apache.http

This is using a nightly build from today, so it might be that thats causing it, but thought id mention it.

/C

ok, it is probably not downloading the dependencies when you use the
install command. This dependency is probably downloaded by some of the
other plugins in the “standard” install.

søn. 6. mar. 2016 kl. 23.25 skrev Christer Åkerlund <
bot@community.openhab.org>:

Worked fine after a couple of restarts.

How do you mean?

I think he means you should simply do a

openhab> feature:install openhab-binding-tellstick

on the command line.

If i do a "openhab> feature:install openhab-binding-tellstick"
i get the 1.9 tellstick binding.
So i tried “openhab> install url” url being the dropbox link to the tellstick 2 binding.
But then i get Unable to install bundle.

I install it the very same way as you did and I also got the 1.9 tellstick binding running.
So I did like:
openhab> stop 176
openhab> start 175
openhab> bundle:list
175 | Active | 80 | 2.0.0.201602212121 | Tellstick Binding
176 | Resolved | 80 | 1.9.0.b2 | openHAB Tellstick Binding

And it seems like everything works, but unfortunately will there not be any packages received from the Tellstick.

So I switch back to as below with the very same openhab2-session running, and everything works just great.

175 | Resolved | 80 | 2.0.0.201602212121 | Tellstick Binding
176 | Active | 80 | 1.9.0.b2 | openHAB Tellstick Binding

//Örjan