Tellstick binding for OpenHab2

I have got an Oregon Scientific PCR800.

Sadly enough though I’ve done some reading into the Telldus developer documentation and I found the following text:

Currently only temperature and humidity are implemented.

Kinda explains why this binding only supports those types. Can’t really understand how Telldus are reasoning here, feels kinda stupid to support more types and only expose two of them in the api :disappointed_relieved:

Have read the last comments and for you new users are anything unclear in the readme file over here?

I will do a cosmic update to get the markdown formatting right so can also clarify some parts if there is a need for it.

Anyone have something to add?

Read it, looks good!
But just one thing, I actually don’t know if this is an answer to your questions, but I have got some thoughts about it. It was not possible to run 64-bits OS, 32-bits JVM and 2.1.0.201701231847 Tellstick Binding.
But my serial-device(enocean) works with 64-bits OS, 64-bits JVM so that’s how it will be.

In your README.md:
+For USB connected tellsticks only, eg. Basic and DUO

+First of all you need to make sure that your JVM is matching your installed Telldus Center. This normally means openHab must run on a 32bit JVM for windows and a 64bit JVM for linux. For windows the binding is hardcoded to look for Telldus Center in Programs Files (“C:/Program Files/Telldus/;C:/Program Files (x86)/Telldus/”). If you have trouble getting the telldus core library to work you can modify the library path using

In http://docs.openhab.org/installation/index.html /Installation/Overview/Prerequisites:
Also make sure to use the 32-bit version of the JVM, even on 64-bit operating systems. Serial connections won’t work with a 64-bit JVM, so bindings like Z-Wave won’t be working with it.

I am now running 64-bit OS, 64bit JVM, openhab2 Last Stable(2.1.0 snapshot Build 752), 2.1.0.201701231847 Tellstick Binding, since yesterday and so far is everything working as expected.

Good! Something is wrong with the “Binding Configuration” heading though.

If I were you I’d add an explanation why only temperature and humidity is supported for sensors. So no more users need to think you’re the one that missed them :slight_smile:

edit: By the way, I have a new plan for how to get my rain sensor values into openhab. I’ll simply put a script in /usr/local/share/telldus/scripts/sensorevent/ (the place where telldus-core looks for scripts to execute when sensor values are changed) which calls openhab rest api to change the value of an item. I’ll get back to this when I’ve got it working, might be useful for other people as well.

It should be easy to implement the rain sensor, but I would need some raw event data from telldus. Maybe you would see this is you turn debug on for the telldus binding.

Well, I’ve got a script in /usr/local/share/telldus/scripts/rawdeviceevent that continuously puts the RAWDATA in a log file. Would that be what you need? Example of a line:

class:sensor;protocol:oregon;model:2914;id:11;raintotal:190.1;rainrate:0.0;

edit: I also tried the debug log level of the binding and got the following:

10:24:32.411 [DEBUG] [andler.core.TelldusCoreBridgeHandler] - Sensor Event for TellstickSensor [sensorId=11, protocol=oregon, model=2914, timeStamp=Sat Jan 28 10:23:45 CET 2017, data={RAINRATE=0.0, RAINTOTAL=190.1}] event TellstickSensorEvent [sensorId=11, model=2914, protocol=oregon, data=0.0, timestamp=1485595472000]
10:24:32.431 [DEBUG] [andler.core.TelldusCoreBridgeHandler] - Update curr 0.0 new 0.0
10:24:32.435 [DEBUG] [andler.core.TelldusCoreBridgeHandler] - Sensor Event for TellstickSensor [sensorId=11, protocol=oregon, model=2914, timeStamp=Sat Jan 28 10:23:45 CET 2017, data={RAINRATE=0.0, RAINTOTAL=190.1}] event TellstickSensorEvent [sensorId=11, model=2914, protocol=oregon, data=190.1, timestamp=1485595472000]
10:24:32.437 [DEBUG] [andler.core.TelldusCoreBridgeHandler] - Update curr 190.1 new 190.1

I’m having trouble with the binding locking up and losing the connection to telldusd if I send several ON/OFF commands at once from a rule, anyone else experiencing this? Stopping and starting the bundle fixes it, and tdtool works so I think it’s an internal issue in the binding.

I’ve worked around it with Thread::Sleep(2000) commands in my rules to give it some time to process each item.

1 Like

Sound like a reasonable workaround.
It would be possible to create things dynamically from the sensor events using the API and then update the things. Eg. the user does not need to manually add things to match data output from telldus core.

An even better approach would be to have an inbox endpoint which allows creations of things so the user can choose which sensors to actually use.

I have made an attempt on adding Wind and Rain sensors, they are now a new type of sensors. Since I have neither a rain or wind sensor you will need to test this for me.
This is tested using Openhab 2.0 stable (ignore the 2.1 in the filename)
https://dl.dropboxusercontent.com/u/26815772/org.openhab.binding.tellstick-2.1.0-SNAPSHOT.jar

1 Like

Newbie question (I’ve never installed any binding manually, just through paper ui and habmin): I guess I’ll just download the jar and put it in /usr/share/openhab2/addons (and maybe do a bundle:start on it), but do I have to uninstall or stop the existing 2.0.0 binding first? And what happens with my existing things when I do that?

Yes, that is important. Or else you get into trouble :wink:
Not sure about your things.

Yep, my things are still working. The rainsensor is not working very well though… It has got channels for rainrate and total rain so I tried connecting an item. Now the thing has status OFFLINE - HANDLER_INITIALIZING_ERROR, don’t really know what happened. The item shows value -NaN. I got a stacktrace in the log, http://pastebin.com/RTTJQsPH

Tried again with log level info, might give you more info: http://pastebin.com/9KUF1DMP

I fixed the error you fund in the logs, please try to download again.

1 Like

You’re the greatest! Works like a charm now. Thanks a lot!

Hi,

After a couple of weeks of tinkering with openhab have to say an amazing work you’ve done with it!
I just got Tellstick Net v2 in addition to my razberry controls. Binding works well with Telldus live, but anxiously waiting for the local API support so we could get rid of the unnecessary roundtrip and maybe reduce the lag a bit.

One question regards the Tellstick Binding:
Is there a way to force update from rules/scripts to check statuses from Telldus Live? I would rather do more frequent status checks after a change is made, than keep polling Telldus every few seconds.
Say, I have a power outlet switch, when I turn it on, the state of the item goes back to off and is only updated to “on” after the next poll to telldus. If the sync was done 1 sec after each state change (or command to telldus live) the lag would be minimal and we wouldn’t need to knock on Telldus Live site so frequently all the time

Cheers!

I’m new on OpenHAB, runs it on a Pine64 with the bundled package (http://docs.openhab.org/installation/pine.html) and have the binding to Telldus (2.0). It works, but, rather regular all devices goes offline for a while before going online again, like every 10 minutes or so, from “events.log”:

2017-03-02 14:00:52.865 [hingStatusInfoChangedEvent] - ‘tellstick:switch:2ffb74ce:1528586’ changed from ONLINE to OFFLINE (COMMUNICATION_ERROR)

same for each and every device I have managed by my Telldus ZNet V2.

It seems very strange if I should have such frequent Internet connectivity issue, I can ping sunet.se -t and don’t have a drop for hours. Is it possible to connect to local API (in ZNet V2) instead of using API for Live! service?

Thanks!

I have seen something similar, I will try to investigate. I could do a retry before deciding that there is a communication error

I have created a new version that should retry 3 times before deciding to make the bridge/item offline.
This version also supports the refresh command, just send REFRESH to any tellstick live item and it will trigger a refresh from telldus live.
https://dl.dropboxusercontent.com/u/26815772/org.openhab.binding.tellstick-2.1.0-SNAPSHOT.jar

I have a problem with the binding. All five switches works, but when I execute a rule where four of them gets sendcommand OFF, I get a lot of errors and it takes at least a couple of minutes before all the lights are of. Same happens when I set the Lights group switch off. I use the latest snapshot, installed on a raspberry pi.

Here is a part of the log, efter the last error it’s just confirmations of sendCommands. Does anyone understand what’s happening? :slight_smile:

16:50.668 [ERROR] [andler.core.TelldusCoreBridgeHandler] - Fail
d to send msg:OFF to TellstickDevice [deviceId=45, name=vardagsrum
status=2, deviceType=DEVICE, data=null]
org.tellstick.device.TellstickException: vardagsrum: Could not con
ect to the Telldus Service
at org.tellstick.device.SwitchableDeviceImpl.off(Switchabl
DeviceImpl.java:21)[215:org.openhab.binding.tellstick:2.1.0.201702
21957]
at org.openhab.binding.tellstick.handler.core.TelldusCoreD
viceController.turnOff(TelldusCoreDeviceController.java:213)[215:o
g.openhab.binding.tellstick:2.1.0.201702121957]
at org.openhab.binding.tellstick.handler.core.TelldusCoreD
viceController.sendEvent(TelldusCoreDeviceController.java:171)[215
org.openhab.binding.tellstick:2.1.0.201702121957]
at org.openhab.binding.tellstick.handler.core.TelldusCoreD
viceController.access$0(TelldusCoreDeviceController.java:147)[215:
rg.openhab.binding.tellstick:2.1.0.201702121957]
at org.openhab.binding.tellstick.handler.core.TelldusCoreD
viceController$TelldusCoreWorker.run(TelldusCoreDeviceController.j
va:268)[215:org.openhab.binding.tellstick:2.1.0.201702121957]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]
22:17:19.293 [ERROR] [andler.core.TelldusCoreBridgeHandler] - Fail
d to send msg:OFF to TellstickDevice [deviceId=47, name=koksfonste
, status=2, deviceType=DEVICE, data=null]
org.tellstick.device.TellstickException: koksfonster: Could not co
nect to the Telldus Service
at org.tellstick.device.SwitchableDeviceImpl.off(Switchabl
DeviceImpl.java:21)[215:org.openhab.binding.tellstick:2.1.0.201702
21957]
at org.openhab.binding.tellstick.handler.core.TelldusCoreD
viceController.turnOff(TelldusCoreDeviceController.java:213)[215:o
g.openhab.binding.tellstick:2.1.0.201702121957]
at org.openhab.binding.tellstick.handler.core.TelldusCoreD
viceController.sendEvent(TelldusCoreDeviceController.java:171)[215
org.openhab.binding.tellstick:2.1.0.201702121957]

Could you please run openhab with DEBUG level set on org.openhab.binding.tellstick ? The attach the log on a new thread here.

1 Like