Tellstick binding for OpenHab2

I know there is no official support, but the binding @jarlebh made worked in the alpha version. I guess I just have to use 1.8 binding for the time being. It was nice though with the auto discovery :wink:
With the 1.8 binding I have a problem with my sensors, but I guess that is something I am doing wrong.

You could also ask @jarlebh to make it work on 2.0 and provide a new version (or create a PR).

I also have the same problem as @Don_Janssen, the binding @jarlebh made is not working on the beta version.
I have Tellstick Net so I cannot use the official binding.
@jarlebh could you please make the binding work for the beta version?

Sorry for the delay, the code is here:

It is just not ready for a pull request yet, I have not had time for personal reasons. However I will try to get it working. It does work locally in dev environment.

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.