AndreasAhrens.se


Views, guides, tech stuff, Cryptocurrencies and ICOs from the mind of Andreas Ahrens

Tags


AndreasAhrens.se

Getting Telldus Core to run on Raspian Jessie - Raspberry Pi

3rd April 2016

I'm setting up my old Tellstick on a Raspberry Pi to get back into home automation. I started off by following a guide at [Elinux](http://elinux.org/R-Pi_Tellstick_core" target="_blank) but didn't get it to work the whole way through the installation. I picked up bits and pieces from various forum posts to get to the full installation. Below are the steps I followed.

note: this guide has been updated for latest versions of Telldus Code 2.1.2

First, I get the core

cd /home/pi/Downloads/
wget http://download.telldus.se/TellStick/Software/telldus-core/telldus-core-2.1.2.tar.gz

Time to install prerequisites.

sudo apt-get install libftdi1 libftdi-dev libconfuse0 libconfuse-dev cmake

And unpack the source code

cd /usr/src
sudo tar xzf ~/Downloads/telldus-core-2.1.2.tar.gz

Then enter the created directory

cd telldus-core-2.1.2

And run cmake

sudo cmake .

If you get

-- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE)

You might have to install Doxygen first.

sudo apt-get install doxygen

After that, I still got:

CMake Error: File /usr/src/telldus-core-2.1.2/Doxyfile.in does not exist.

running

sudo wget http://developer.telldus.com/export/4342bbaa1dcd90011b66e8c1540db6ba904877fe/telldus-core/Doxyfile.in

solves that problem and now you can once again do

sudo cmake .

Just for 2.1.1 installations

The following was needed for installing 2.1.1, but is no longer needed if you install 2.1.2.

This is where we need to deviate from the guide. As per this [post by Telldus](http://developer.telldus.com/changeset/488ab8c7542600e5499c1b6ae5f193455bf1c25d/" target="_blank), we need to modify the Socket_unix.cpp file.

sudo nano /usr/src/telldus-core-2.1.1/common/Socket_unix.cpp

After

#include <stdio.h>

you should add

#include <unistd.h> 

Then ctrl+x, Y and enter to save.

Then I ran

sudo nano /etc/ld.so.conf.d/tellduscore.conf 

And entered

/usr/local/lib

then just save and exit nano.

From here on, still valid for 2.1.2

Now we can finally make and install.

sudo make
sudo make install

and update library cache

sudo ldconfig

If you run Jessie like me, you can disregard the Install Service part of the guide, since that only works on earlier builds. Instead we will use Systemd.

sudo nano /lib/systemd/system/telldusd.service

And put in the following in this empty file

[Unit]
Description=Tellstick service daemon
After=multi-user.target

[Service]
Type=forking
ExecStart=/usr/local/sbin/telldusd

[Install]
WantedBy=multi-user.target

Then reload systemctl

sudo systemctl daemon-reload

Time to start the daemon!

sudo systemctl start telldusd.service

Check that it worked with

systemctl status telldusd.service

The terminal should output something like

● telldusd.service - Tellstick service daemon
Loaded: loaded (/lib/systemd/system/telldusd.service; disabled)
Active: active (running) since Sun 2016-04-03 17:29:25 UTC; 16min ago
Process: 28856 ExecStart=/usr/local/sbin/telldusd (code=exited, status=0/SUCCESS)
Main PID: 28857 (telldusd)
CGroup: /system.slice/telldusd.service
       └─28857 /usr/local/sbin/telldusd

Time to enable it to start on every reboot:

sudo systemctl enable telldusd.service

Some have reported that they had to put the telldusd.service in /etc/systemd/system/telldusd.service instead of /lib/systemd/system/telldusd.service but I didn't have to.

Now just configure your switches by running

sudo nano /etc/tellstick.conf

More information on how to set them up at [http://developer.telldus.com/wiki/TellStick_conf](http://developer.telldus.com/wiki/TellStick_conf" target="_blank)

I got my information from the following posts, full credit for the solution to the original posters. I just put them all together in one guide.

[Problem med telldusd service.](https://www.telldus.com/forum/viewtopic.php?f=8&t=5625" target="_blank)

[Lyckas inte kompilera Telldus Core för Fedora 17](https://www.telldus.com/forum/viewtopic.php?f=8&t=2298" target="_blank)

View Comments