Tellstick Controller

Java interface for the Telldus Tellstick.
It turns any computer into a wireless home automation center by being the link between your computer and electronics & ligths.
Can only handle NEXA units for now.
Have not done anything on this for a long time so it is kind of dead :-(
  • Contoll Tellstick.
  • Turn on and off NEXA device.
  • Works on every OS Tellstick works on (linux, Window, Mac OS X).
Here you can download the code: Google Drive

Dependencies

Java 1.6
Linux
Telldus Tellstick (http://www.telldus.se/products/tellstick)
Computer with usb port
NEXA device (http://www.nexa.se)
SteelsquidClassCollection
RXTX, if you use RXTX [TellstickJavaController.java] (http://rxtx.qbang.org/)
Telldus-core, if you use wrapper [TellstickCoreController.java] (http://www.telldus.se/products/tellstick)

Usage (All needed jar is under the lib directory, except telldus-core)

You can either use my java driver (with RXTX) or telldus-core (wrapper for telldus-core).
I recommend using wrapper for telldus-core.

Java driver (RXTX):
Will only works on Linux i686 and x86_64.
You must have RXTXcomm.jar and SteelsquidClassCollection.jar in classpath.
The librxtxSerial.so in the java-library-path.
Ex: java -Djava.library.path=../lib/Linux/x86_64-unknown-linux-gnu -classpath ../dist/SteelsquidTellstickController.jar:../lib/SteelsquidClassCollection.jar:../lib/RXTXcomm.jar org.steelsquid.tellstick.ExecTest
If you run Ubuntu install the package librxtx-java.
Then you only need to add this to the classpath: /usr/share/java/RXTXcomm.jar
If the tellstick is in other place than /dev/ttyUSB0 or /dev/tellstick you have to set the gnu.io.rxtx.SerialPorts proprty
Example in code: System.setProperty("gnu.io.rxtx.SerialPorts", "/dev/xxxx");
Example on startup: -Dgnu.io.rxtx.SerialPorts="/dev/xxxx"

Wrapper for telldus-core:
Works on every OS tellstick works on (linux, Window, Mac OS X).
You have to install Delldus Tellstick software (http://www.telldus.se/products/tellstick).
Get the path to tdtool binary. In my case (Ubuntu): /usr/bin/tdtool.

See org.Tellstick.tellstick.ExecTest for example of usage.
You must have a Tellstick connected to usb port.
Change the 'PORT' and 'TDTOOL' variabel in the code to the one you have, for example: /dev/tellstick and /usr/bin/tdtool.
Comment and uncomment these rows to test java driver or telldus-core wrapper:
//tellstick = createTelldusCore(); //Create a Telldus-core controller
tellstick = createJava(); //Create a java rxtx driver controller
Before you run the program the first time, press the learn button on the NEXA device and then send a on command.

Short description of classes

org.steelsquid.tellstick.ExecTest
A example usage of the Tellstick controller.
See doc/readme.txt for more info.

org.steelsquid.tellstick.AbstractTellstickController
TellstickJavaController and TellstickTelldusCoreJavaController extends this.

org.steelsquid.tellstick.TellstickJavaController
Controll the Telldus Tellstick USB electronics & lights controller.
Using Java drivera with RXTX.

org.steelsquid.tellstick.TellstickCoreJavaController
Controll the Telldus Tellstick USB electronics & lights controller.
Using Telldus-core.

org.steelsquid.tellstick.TellstickException
If error on comunication with the tellstick.

ToDo

Other divices than NEXA

Revision history

2010-09-22   0.1   Initial release
2010-09-29   0.2   Some small changes
2010-12-03   0.3   Can now use telldus-core insted of java driver
2010-12-14   0.4   Using tdtool insted of rfcmd
2010-12-16   0.5   Works on all OS Tellstick works on
2011-06-15   0.6   Nothing new in the code but using Netbeans 7