The Telldus Tellstick Duo is a tiny usb device to control rf devices such as lightbulbs, thermo meters and a lot of other stuff. The software to control the device is open source and works fine on Ubuntu/Debian, OS X and Windows. People have also documented how to get it to work with CentOS 6. But if you are like me and want to run the latest CentOS version then it is a little bit more complicated. In this guide I will show you how to compile and get it to run on the latest version of CentOS 7.
1. Begin by plugging in your tellstick duo in your machine, if you tail /var/log/messages you will see the following when you plug it in:
Apr 25 16:13:08 plex kernel: usb 4-1: new full-speed USB device number 2 using uhci_hcd
Apr 25 16:13:08 plex kernel: usb 4-1: New USB device found, idVendor=1781, idProduct=0c31
Apr 25 16:13:08 plex kernel: usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Apr 25 16:13:08 plex kernel: usb 4-1: Product: TellStick Duo
Apr 25 16:13:08 plex kernel: usb 4-1: Manufacturer: Telldus
2. The next step is to install some repos and libraries so that we can compile the latest version of the software from telldus. Note, if this guide fails you can try to do “yum groupinstall Development Tools” instead.
yum install gcc gcc-c++ autoconf automake cmake
3. Install the epel repo
yum localinstall epel-release-7-5.noarch.rpm
4. Install all of the libftdi, libusb and libconfuse libraries
yum install libftdi*
yum install libusb*
yum install libconfuse*
5. Download and unpack the telldus software. At the time of writing the latest package is 2.1.2
NOTE ! depending on your version of Tellstick Duo, version 2.1.2 of the software may not work. If you run in to issues such as error messages saying “TellStick not found” when you run tdtool. try 2.1.1 instead.
If you then run into issues when compiling 2.1.1 with make, you may need to edit the file “telldus-core-2.1.1/common/Socket_unix.cpp”. Make sure you include unistd.h so that it looks like this in the top of the file:
#define BUFSIZE 512
END OF NOTE
tar xvf telldus-core-2.1.2.tar
6. Now when you are supposed to run “cmake .” it will fail:
[root@plex telldus-core-2.1.2]# cmake .
-- The C compiler identification is GNU 4.8.3
-- The CXX compiler identification is GNU 4.8.3
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.27.1")
-- checking for one of the modules 'libftdi'
-- Found Doxygen: /usr/bin/doxygen (found version "1.8.5")
CMake Error: File /usr/src/telldus-core-2.1.2/Doxyfile.in does not exist.
CMake Error at CMakeLists.txt:64 (CONFIGURE_FILE):
configure_file Problem configuring file
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
linked by target "telldusd" in directory /usr/src/telldus-core-2.1.2/service
-- Configuring incomplete, errors occurred!
See also "/usr/src/telldus-core-2.1.2/CMakeFiles/CMakeOutput.log".
See also "/usr/src/telldus-core-2.1.2/CMakeFiles/CMakeError.log".
This is because of two things. It cannot find the Doxyfile.in and the FTDI_LIBRARY is not found, this can be fixed. First download the Doxyfile.in:
Run the following cmake command to point to the library:
This is how it looks like:
[root@plex telldus-core-2.1.2]# cmake -DFTDI_LIBRARY=/usr/lib64/libftdi1.so
-- checking for one of the modules 'libftdi'
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/src/telldus-core-2.1.2
7. Almost done. Time to make it. Run this command:
All should be good and you can move on to installing it.
8. Install it:
9. Fix some symlinks and run ldconfig:
ln -s /usr/local/lib64/libtelldus-core.so.2 /lib64/libtelldus-core.so.2
10. Done! Start the daemon with this command
Note. You have to restart the daemon each time you change the tellstick.conf file. You can use kill or whatever you like to do this.
11. Configure your devices in the file /etc/tellstick.conf . This is what it looks like by default:
[root@plex telldus-core-2.1.2]# cat /etc/tellstick.conf
user = "nobody"
group = "plugdev"
ignoreControllerConfirmation = "false"
id = 1
name = "Example device"
protocol = "arctech"
model = "codeswitch"
house = "A"
unit = "1"
12. Once you have set up your devices according to the documentation you can control them using “tdtool”
[root@plex telldus-core-2.1.2]# tdtool --list
Number of devices: 1
1 Example device OFF
For me as I have an old version of the Tellstick Duo I have to use version 2.1.1 of the software. I get error messages such as:
[root@plex telldus-core-2.1.1]# tdtool --off 1
Turning off device 1, Livingroom - An error occurred while communicating with TellStick
You can fix this by doing what is documented here: