In these next commands, Change {version} to the downloaded version.
#cd /usr/src
#gunzip telldus-core-{version}.tar.gz
#tar xvf telldus-core-{version}.tar
#mv telldus-core-{version} telldus-core
#cd telldus-core
#sudo cmake .
#sudo make
#sudo make install
#sudo ldconfig
#cd /etc/init.d
#sudo cp skeleton telldusd
Open the newly created file in your favorite editor (as root with sudo) and do these changes:
Line 3, change:
# Provides: skeleton
into:
# Provides: telldusd
Line 8-10, change:
# Short-Description: Example initscript
# Description: This file should be used to construct scripts to be
# placed in /etc/init.d.
into:
# Short-Description: Tellstick service daemon
# Description: Tellstick service daemon controlling remote switches.
#
Line 20-24, change:
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="Description of the service"
NAME=daemonexecutablename
DAEMON=/usr/sbin/$NAME
DAEMON_ARGS="--options args"
into:
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin
DESC="Tellsick service daemon"
NAME=telldusd
DAEMON=/usr/local/sbin/$NAME
DAEMON_ARGS=""
Make the script executable.
#sudo chmod +x telldusd
Test the init-script by starting the service and checking its status.
#sudo service telldusd start
#sudo service telldusd status
Install the script to start at boot.
#sudo update-rc.d telldusd defaults
Finally use the tdtool command to turn switches on and off! So in this case I am turning on switch 1 (1 as specified in the config file)
#tdtool --on 1
To automate my home setup I have written the following python script, it turns things on using the tellstick when I walk in the room (including sending wake packets to computers etc). It then turns them all off again if I'm gone for more than 5 minutes.