Raspberry PI Tellstick DUO Home Automation Guide.

Moderator: Telldus

Post Reply
firenacho
Posts: 11
Joined: Thu Jan 18, 2018 11:08 am

Raspberry PI Tellstick DUO Home Automation Guide.

Post by firenacho » Thu Jan 18, 2018 11:08 am

I have successfully configured Raspi with Tellstick Duo and I want to share my findings with you guides. Please note that these notes were originally written as my own memos, they are quite detailed but you should already know some linux before attempting.

Before you start here is some important findings i found about Raspi + Tellstick Duo:

- Invest in an external powered USB hub ! It seems the Raspi delivers to little power to the DUO, buy this to get better range
- You should also invest in a better antenna to give you some more bonus range. I bought this, you will need some metal from a paper clip to connect it to the tellstick: http://www.jula.no/inneantenne-med-magn ... b-g-924730


// This guide uses:
// Raspbian version: Linux 3.6.11+
// Tellstick DUO
// Home Automation v2_0_2 http://karpero.mine.nu/ha/
// Weather Parser v0_6_6 http://karpero.mine.nu/ha/

*********************
* Setting static ip *
*********************

Run ifconfig to see your IP settings.
nano /etc/network/interfaces

This is an example config:

auto lo
auto eth0
iface lo inet loopback

iface eth0 inet static
address 192.168.1.220
netmask 255.255.255.0
gateway 192.168.1.1


***EXAMPLE CONFIG END


//After doing Raspberry Pi basic config like enabling SSH and setting static ip, do the following:

apt-get update
apt-get upgrade

//Add this line to in the following file:
nano /etc/apt/sources.list
deb-src http://download.telldus.com/debian/ stable main

//Install Public key
wget -q http://download.telldus.se/debian/telldus-public.key -O- | sudo apt-key add -
apt-get update

//Make a new folder where you download temporary files so you can easily delete them afterwards
mkdir download
cd download

//download and install telldus-core
apt-get build-dep telldus-core
apt-get install cmake libconfuse-dev libftdi-dev help2man
apt-get --compile source telldus-core
sudo dpkg --install *.deb

//Clean up files
cd ..
rm -Rf download/

// Connect Tellstick Duo and test it with TDTOOls, it should work now
//TDtool commandoer
tdtool --on
tdtool --off
tdtool --learn
tdtool --list

//Tdtool configuration, guide: http://developer.telldus.com/wiki/TellStick_conf
nano /etc/tellstick.conf

// How to restart telldus service after config changes
service telldusd restart



// Install apache2, mysql, php and phpmyadmin
apt-get install apache2
apt-get install php5
apt-get install mysql-server
apt-get install phpmyadmin

//Disable directory browsing on Apache2 by editing the following file:
nano /etc/apache2/sites-enabled/000-default

//Remove the word "Indexes" from this sentence:
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all

//Save and restart apache2 service
service apache2 restart

//Reset Root pw to make it easier to work with winscp etc.
passwd root

//Install at and cron
apt-get install at
apt-get install cron

//Make a new database in phpmyadmin to HomeAutomation
//Copy HomeAutomation files + patches to server and set owner as www-data
cd /var/www/
chown -R www-data:www-data homeautomation/
//Set user rights on all files to 777 with WinSCP, remember recursive

//Add www-data to plugdev group
adduser www-data plugdev

//Browse to HomeAutomation and configure
//Check that this setting is correct
Tdtool path: /usr/bin/
1-Wire Temperature: Yes (To get Weather Parser to work)

Remove www-data from AT deny list and restart:
nano /etc/ta.deny
shutdown -r now

//HomeAutomation now works, configure devices with TDtool and test. Next steps are for including weather sensors

*************************************************

Making Weather Parser work:

The temperature graph will bug out if you dont install the Verdana.tff font, find it on Internet and copy it to this folder with WinSCP:
/usr/share/fonts/truetype/


Add crontab for www-data, remember to end with a blank line or cron will not work. Number defines interval in minutes:
crontab -u www-data -e
*/10 * * * * php /var/www/homeautomation/parser/parser.php


To list jobs use: crontab -u www-data -l

aryan
Posts: 88
Joined: Thu Jan 18, 2018 11:08 am

Re: Raspberry PI Tellstick DUO Home Automation Guide.

Post by aryan » Fri Aug 30, 2019 8:50 am

I think there is a little typo here

Code: Select all

nano /etc/ta.deny
should be

Code: Select all

nano /etc/at.deny

Post Reply