Tellstick binding for OpenHab2

Disappointing that the two posts I have made on the forum has gone unanswered :frowning:

However that aside - I did get this working. Turns out you need to have the 1.9.8 version installed first, then stop it using ESH and make sure the 2.0.0 is started.

Once I did this and created my thing file all my devices came in!

@Basse_03 I wonder if you would have the time to write an how-to on how you succeeded with getting this to work in OH2?

I am very extremely new to OH2, so new that I still don’t know how to create XXX.things files


A detailed how-to would be great and wonderful - and a good way to get started!

Edit: Perhaps @mitsumaui could have the solution as well?

Thanks!
Johan S

I got this to work yesterday, but I would love to have the status from Telldus Live refreshed more frequently. Is there any way of increasing the refreshrate? My usecase is motion sensors controlling Philips Hue devices, so decreasing the delay as much as possible would be nice - currently there is a long delay before it’s updated.

@Johan_Soderstrom: I can try to write a short step-by-step guide of what I did to get it to work once I get home, but I’m a Openhab-newbie aswell (first go at it yesterday :smiley:)

@DavidEmanuelsen that would be greatly appreciated! As a father of two small ones the tinkering time is highly limited :wink:

Hi,

I just started with OH yesterday and while i wait for a RFXcom and a Z-Wave USB stick i though that I might try the Tellstick binding as I’ve been running Tellstick NET since the product launched.

After a few trial and error runs, this is what worked for me;

Installed latest Java JDK 8 on my Mac Mini.
Extracted the latest OH2 snapshot.
Installed the Tellstick 1.9.0 binding from the Paper UI.
Downloaded the jar package https://www.dropbox.com/s/1gsln4ckv2fxup5/org.openhab.binding.tellstick_2.0.0.201508211430.jar?dl=0
Added it to the addons folder.
ESH: bundle:list | grep Tell
stop xxx (id of Tellstick 1.9.0)
Uninstalled 1.9.0
Now I could add a binding to the Live gateway either from the Paper UI or a separate things file.
Entered my API keys and now I got all my Telldus Live sensors in the Inbox.

Before i uninstalled 1.9.0 i could not save the Live Gateway thing and got a exception in the log about a TellstickBindingConstant class.

But now it works good, I just need to check if the refresh rate can be fixed and if a can have multiple Telldus Live gateways so I can intergrate another account/house.

1 Like

Sorry for not answering any posts, I have not worked with openhab for quite some time.
I updated the binding to the latest version of openhab and tested it today.

You still need to have the openhab 1 compabliity feature installed, so you have to install a openhab1 addon first I believe. I will include the required libraries into this JAR soon.

I got the binding to work. But as soon as i restart the binding or openhab2 the sensors stop working.
I paper ui the sensor i showing status “OFFLINE - HANDLER_INITIALIZING_ERROR”

And this morning the binding had stopt talking to telldus live servers.
No updates in the log from telldus. So i hade to stop and start the binding to wake it up.

I got the new binding (as abow) to work. I am running openhab2-offline build#486.
But I do had to put this binding in addons and then stop and start openhab2 to get it Active.
I have not yet done any testings with my Tellstick Duo, but at least , it seems like the binding is working so far.

//Örjan

I have the same problem. It stopped working after openHAB restart all the sensors and switches are OFFLINE. When I try to restart bundle i get a lot of classcast exceptions in the log of this kind:2016-09-28 21:58:01.084 [ERROR] [ome.core.thing.link.ThingLinkManager] - Exception occured while informing handler:org.eclipse.smarthome.core.thing.internal.ThingImpl cannot be cast to org.eclipse.smarthome.core.thing.Bridge
java.lang.ClassCastException: org.eclipse.smarthome.core.thing.internal.ThingImpl cannot be cast to org.eclipse.smarthome.core.thing.Bridge
at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.getBridge(BaseThingHandler.java:498)[102:org.eclipse.smarthome.core.thing:0.9.0.b1]
at org.openhab.binding.tellstick.handler.TelldusDevicesHandler.getTellstickBridgeHandler(TelldusDevicesHandler.java:203)[203:org.openhab.binding.tellstick:2.0.0.201609201911]
at org.openhab.binding.tellstick.handler.TelldusDevicesHandler.handleCommand(TelldusDevicesHandler.java:66)[203:org.openhab.binding.tellstick:2.0.0.201609201911]
at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.channelLinked(BaseThingHandler.java:199)[102:org.eclipse.smarthome.core.thing:0.9.0.b1]
at org.eclipse.smarthome.core.thing.link.ThingLinkManager.informHandlerAboutLinkedChannel(ThingLinkManager.java:263)[102:org.eclipse.smarthome.core.thing:0.9.0.b1]
at org.eclipse.smarthome.core.thing.link.ThingLinkManager.receiveTypedEvent(ThingLinkManager.java:304)[102:org.eclipse.smarthome.core.thing:0.9.0.b1]
at org.eclipse.smarthome.core.thing.link.ThingLinkManager.receiveTypedEvent(ThingLinkManager.java:1)[102:org.eclipse.smarthome.core.thing:0.9.0.b1]
at org.eclipse.smarthome.core.events.AbstractTypedEventSubscriber.receive(AbstractTypedEventSubscriber.java:50)[96:org.eclipse.smarthome.core:0.9.0.b1]
at org.eclipse.smarthome.core.internal.events.OSGiEventManager$1.call(OSGiEventManager.java:192)[96:org.eclipse.smarthome.core:0.9.0.b1]
at org.eclipse.smarthome.core.internal.events.OSGiEventManager$1.call(OSGiEventManager.java:1)[96:org.eclipse.smarthome.core:0.9.0.b1]
at org.eclipse.smarthome.core.common.SafeMethodCaller$CallableWrapper.call(SafeMethodCaller.java:177)[96:org.eclipse.smarthome.core:0.9.0.b1]
at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_65]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_65]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_65]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_65]

Tried restarting the bundle a number of times but that don’t help. Did you get your to work again?

If i restart the bundel it works for me for 24 houre then i have to restart the bundel again.

But the sensors have to be removed befor restart and then added again after restart of bundel.

Oh, ok I’ll try that then but that doesn’t sound good. Hope we can solve
this problem in some way

Any news?
Realy like this binding exept that it stops reciving sensor data after a day or so.
I see in the log that the data is coming in to openhab but it is not updating the items.

Any news in this thread ?

I have been trying to get this to work whitout any success this weekend. Log entries below.

==> /opt/openhab2/userdata/logs/events.log <==
2016-10-23 19:31:32.728 [hingStatusInfoChangedEvent] - ‘tellstick:telldus-live:cd91478a’ changed from INITIALIZING to ONLINE

==> /opt/openhab2/userdata/logs/openhab.log <==
2016-10-23 19:31:32.728 [WARN ] [ler.live.TelldusLiveDeviceController] - ExecutionException error in get
java.util.concurrent.ExecutionException: java.net.ConnectException: http://api.telldus.com/xml/devices/list?supportedMethods=19
at com.ning.http.client.providers.netty.NettyResponseFuture.abort(NettyResponseFuture.java:341)[200:org.openhab.binding.tellstick:2.0.0.201609201911]
at com.ning.http.client.providers.netty.NettyConnectListener.operationComplete(NettyConnectListener.java:107)[200:org.openhab.binding.tellstick:2.0.0.201609201911]
at org.jboss.netty.channel.DefaultChannelFuture.notifyListener(DefaultChannelFuture.java:427)[200:org.openhab.binding.tellstick:2.0.0.201609201911]
at org.jboss.netty.channel.DefaultChannelFuture.addListener(DefaultChannelFuture.java:145)[200:org.openhab.binding.tellstick:2.0.0.201609201911]
at com.ning.http.client.providers.netty.NettyAsyncHttpProvider.doConnect(NettyAsyncHttpProvider.java:1130)[200:org.openhab.binding.tellstick:2.0.0.201609201911]
at com.ning.http.client.providers.netty.NettyAsyncHttpProvider.execute(NettyAsyncHttpProvider.java:927)[200:org.openhab.binding.tellstick:2.0.0.201609201911]
at com.ning.http.client.AsyncHttpClient.executeRequest(AsyncHttpClient.java:524)[200:org.openhab.binding.tellstick:2.0.0.201609201911]
at com.ning.http.client.AsyncHttpClient$BoundRequestBuilder.execute(AsyncHttpClient.java:240)[200:org.openhab.binding.tellstick:2.0.0.201609201911]
at org.openhab.binding.tellstick.handler.live.TelldusLiveDeviceController.callRestMethod(TelldusLiveDeviceController.java:318)[200:org.openhab.binding.tellstick:2.0.0.201609201911]
at org.openhab.binding.tellstick.handler.live.TelldusLiveBridgeHandler.updateDevices(TelldusLiveBridgeHandler.java:108)[200:org.openhab.binding.tellstick:2.0.0.201609201911]
at org.openhab.binding.tellstick.handler.live.TelldusLiveBridgeHandler.refreshDeviceList(TelldusLiveBridgeHandler.java:100)[200:org.openhab.binding.tellstick:2.0.0.201609201911]
at org.openhab.binding.tellstick.handler.live.TelldusLiveBridgeHandler$1.run(TelldusLiveBridgeHandler.java:64)[200:org.openhab.binding.tellstick:2.0.0.201609201911]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_111]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)[:1.8.0_111]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)[:1.8.0_111]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)[:1.8.0_111]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_111]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_111]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_111]
Caused by: java.net.ConnectException: http://api.telldus.com/xml/devices/list?supportedMethods=19
at com.ning.http.client.providers.netty.NettyConnectListener.operationComplete(NettyConnectListener.java:103)[200:org.openhab.binding.tellstick:2.0.0.201609201911]

 17 more
Caused by: java.nio.channels.UnresolvedAddressException
at sun.nio.ch.Net.checkAddress(Net.java:101)[:1.8.0_111]
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:622)[:1.8.0_111]
at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink.connect(NioClientSocketPipelineSink.java:108)[200:org.openhab.binding.tellstick:2.0.0.201609201911]
at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink.eventSunk(NioClientSocketPipelineSink.java:70)[200:org.openhab.binding.tellstick:2.0.0.201609201911]
at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:54)[200:org.openhab.binding.tellstick:2.0.0.201609201911]
at org.jboss.netty.handler.codec.http.HttpClientCodec.handleDownstream(HttpClientCodec.java:97)[200:org.openhab.binding.tellstick:2.0.0.201609201911]
at org.jboss.netty.handler.stream.ChunkedWriteHandler.handleDownstream(ChunkedWriteHandler.java:109)[200:org.openhab.binding.tellstick:2.0.0.201609201911]
at org.jboss.netty.channel.Channels.connect(Channels.java:634)[200:org.openhab.binding.tellstick:2.0.0.201609201911]
at org.jboss.netty.channel.AbstractChannel.connect(AbstractChannel.java:207)[200:org.openhab.binding.tellstick:2.0.0.201609201911]
at org.jboss.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:229)[200:org.openhab.binding.tellstick:2.0.0.201609201911]
at org.jboss.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:182)[200:org.openhab.binding.tellstick:2.0.0.201609201911]
at com.ning.http.client.providers.netty.NettyAsyncHttpProvider.doConnect(NettyAsyncHttpProvider.java:1091)[200:org.openhab.binding.tellstick:2.0.0.201609201911]

 14 more

Log enties after enabling it. Never get any items in the inbox.

Running the latest version of Openhab.
installed 1.9.0 of the telldus plugoin, added the jar file to the addon folder, then stopped 1.9.0, unisnstalled it.
So it now only lists the v2.0 of the extension.
Then add bridge, and get the output as above.

Any good ideas to try ?

br
Tor-Ivar Kristoffersen

I figured it out myself.

The problem is that yum install java on Centos 7 installs openjdk, and not oracle jdk.
Manually adding Oracle JDK, and removeing openjdk resolved this right away

So to anyone seeing this, try "java -version"
If it lists openjdk, remove it !

TIK

I have now create a new version of the binding that includes the needed jars. Also a lot more testing on the tellstick duo has been performed. I hope this works better for everybody.
https://dl.dropboxusercontent.com/u/26815772/org.openhab.binding.tellstick-2.0.0-SNAPSHOT.jar

It works fine to just drop the binding in the addons folder.

Also readme in progress:

@jarlebh: works great so far!
Thanks for your effort!

Hi, I am running this addon in OpenHab2 beta4, and able to interact with Telldus live. My main goal is to monitor temperature sensors, and store them in a persistent database (influx).

All seems to flow well, with the exception of temperature changes not being caught and reflected back to OpenHab.

In openhab logs, I can see that a changed temperature is coming from telldus live server. In example “dataType=TEMPERATURE, data=23.3”, but the changed temperature is not reflected back to the sensor channel, and stay same as it was at initial discovery/ startup.

Appreciate any tips on what may be wrong, and please accept my apologizes if I have missed something obvious.

Again, thanks for your effort on this!

I personally don`t have a working tellstick.net, only a test unit. So there might be some issues with the updates. I will have a look and see if there is a clue in the code.
Could you turn on debug and send the log when the sensor changes ?
Use
log:set DEBUG org.openhab.binding.tellstick

Thanks! I will share logs with you when I am back home later today.
Will send them as PM, as I don’t want to pollute this thread with logs

Every item i add is stuck in initializing when using the new binding. Does not matter if it is a switch, dimmer or a sensor.

from events.log
2016-11-28 23:43:54.575 [InboxRemovedEvent ] - Discovery Result with UID ‘tellstick:switch:1:13’ has been removed.
2016-11-28 23:43:54.581 [ThingAddedEvent ] - Thing ‘tellstick:switch:1:13’ has been added.
2016-11-28 23:43:54.586 [hingStatusInfoChangedEvent] - ‘tellstick:switch:1:13’ changed from UNINITIALIZED to INITIALIZING
nothing from openhab.log

I have a few sensors and switches (+10) so I tried the tip about adding a few lines in runtime.cfg but it didnt help or I made something wrong there. If I only add one switch I get the same result. Even with a fresh install of the latest openhab 2 (Build 622)