Difference between revisions of "HomeAutomation and Tellstick"

From BubbaWiki
Jump to navigation Jump to search
 
(34 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This guide will help you to install the fantastic software HomeAutomation and the very neat piece of hardware Telldus Tellstick on a B3. The information here is collected from various threads on http://forum.excito.net/.<br>  
<p>This guide will help you to install the fantastic software HomeAutomation and the very neat piece of hardware Telldus Tellstick on a B3. <br />
</p><p>The information here is collected from various threads on http://forum.excito.com/, thank you <b>DanielM </b>and <b>Moloko</b>!<br />
</p><p><br />
</p><p>More about HomeAutomation is found here: http://karpero.mine.nu/ha/
</p><p>More about Tellstick is found here: http://www.telldus.se<br />
</p>
<h1> Install Tellstick  </h1>
<p><b>Conditions</b><br />
</p>
<ul><li>Tellstick not connected to B3<br />
</li><li>Logged in as root on B3
</li></ul>
<p><br />
</p><p>1. Install telldus-core on B3. First edit the file /etc/apt/sources.list with for example nano:<br />
</p>
<pre>nano /etc/apt/sources.list</pre>
<br />  


<br>  
<p>Add the following line: </p>
<pre>deb http://download.telldus.com/debian/ stable main </pre>
<br />
<p>Save and exit from nano.</p>


= Installera Tellstick  =
2. The Telldus public key is needed. Run the command: <br />


== Utgångsläge<br> ==
<pre>wget -q http://download.telldus.se/debian/telldus-public.key -O- | apt-key add -</pre>  


<br>  
<p>The key fingerprint is</p>


*Tellstick ej ansluten<br>  
<pre>70C4 10C9 D73D 53E8 38B3 1C58 5A94 9181 E501 EA76
*Inloggad som root på B3
Telldus Technologies AB <info.tech@telldus.se></pre>


<br>  
3. Update the repository list by running the command:<br />  


1. Hämta paket och installera paket för att kompilera egna program<br>
<pre>apt-get update</pre>  
<pre>apt-get install cmake</pre><pre>apt-get install build-essential</pre>
<br>  


2. Installera paket som telldus behöver för kompilering<br>  
<p><br />4. Install the latest Telldus core:</p>
<pre>apt-get install libconfuse-dev libqt4-dev help2man
<pre>apt-get install telldus-core</pre>  
</pre>  
<br>
 
3. Hämta hem mjukvaran till Tellstick o packa upp. Använd senaste tellstick core: http://download.telldus.se/TellStick/Software/telldus-core/.<br>  
<pre>wget http://download.telldus.se/TellStick/Software/telldus-core/telldus-core-2.0.4.tar.gz</pre><pre>tar xvfz telldus-core-2.0.4.tar.gz</pre><pre>cd telldus-core</pre>
<br>4. Bygg tdtool och rfcmd, med följande kommando:
<pre>cmake -DBUILD_LIBTELLDUS-CORE=1 -DBUILD_TDTOOL=1 -DBUILD_RFCMD_WITH_LIBFTDI=0 -DGENERATE_MAN=1</pre><pre>make</pre><pre>make install</pre>
<br>5. Edit the file /etc/ld.so.conf.d/local.conf (if not excisting, add the file):
<pre>nano /etc/ld.so.conf.d/local.conf
</pre>
Add the following line:
<pre>/usr/local/lib </pre>
<br>  


6. Kör sen:
<p><br />5. Insert the Tellstick into B3 </p>
<pre>ldconfig</pre><pre>rm -f /var/state/telldus-core.conf</pre>  
<p>6. To add receiver units, edit the file /etc/tellstick.conf </p>
<br>7. Sätt i Tellsticki B3
 
8. För att lägga till mottagarenheter, editera filen /etc/tellstick.conf  
<pre>nano /etc/tellstick.conf</pre>  
<pre>nano /etc/tellstick.conf</pre>  
Anpassa configfilen efter dina switchar, i detta fallet: 1st NEXA NEYCR-1000 och 1st NEXA LWMR-210.  
<p>Adjust the config file to your receiver units. In this case: 1pcs NEXA NEYCR-1000 and 1pcs NEXA LWMR-210.  
<pre>deviceNode = "/dev/tellstick"
</p>
<pre>deviceNode = &quot;/dev/tellstick&quot;
device {
device {
id = 1
id = 1
name = "Office"
name = &quot;Office&quot;
protocol = "arctech"
protocol = &quot;arctech&quot;
model = "codeswitch"
model = &quot;codeswitch&quot;
parameters {
parameters {
house = "557666"
house = &quot;112233&quot;
unit = "1"
unit = &quot;1&quot;
}
}
}
}
Line 55: Line 57:
device {
device {
id = 2
id = 2
name = "Outside"
name = &quot;Outside&quot;
protocol = "arctech"
protocol = &quot;arctech&quot;
model = "selflearning-dimmer"
model = &quot;selflearning-dimmer&quot;
parameters {
parameters {
house = "557655"
house = &quot;445566&quot;
unit = "1"
unit = &quot;1&quot;
}
}
}  
}  
</pre>  
</pre>  
<br>  
<p>After editing the file restart the service:</p>
<pre>/etc/init.d/telldusd restart</pre>  


== Installera HomeAutomation<br>  ==
<p>Some notes for tellstick.conf. <br />
 
</p>
<br>1. Installera AT för schemaläggning:
<ul><li>Change the values after the "house" parameter to a randomly chosen number. The uniqe numbers will make sure your units do not interfere with other units. Read about the Tellstick config file here: http://developer.telldus.se/wiki/TellStick_conf.<br />
</li></ul>
<ul><li>If using 'model = "codeswitch" ' the 'house' parameter should be a letter.<br />
</li></ul>
<ul><li>If you want to add more receiver units add more units to this configuration file. <br />
</li></ul>
<p>7. Add an udev rule for the tellstick. Create the file:<br />
</p>
<pre>nano /etc/udev/rules.d/99-tellstick.rules
</pre>
<p>Add the content:<br />
</p>
<pre>KERNEL==&quot;ttyUSB*&quot;, BUS==&quot;usb&quot;, SYSFS{idVendor}==&quot;1781&quot;, SYSFS{idProduct}==&quot;0c30&quot;, NAME=&quot;tellstick&quot;, GROUP=&quot;www-data&quot;
</pre>
<p>8. Reboot B3.<br />
</p>
<h1> Install HomeAutomation<br /</h1>
<p><br />1. First of all install AT for scheduling on B3.
</p>
<pre>apt-get install at
<pre>apt-get install at
</pre>  
</pre>  
2. Plocka bort www-data från filerna: /etc/cron.deny, /etc/at.deny, /etc/cron.allow and /etc/at.allow files (if they exist).  
<p>2. Remove the user www-data from the files: /etc/cron.deny, /etc/at.deny, /etc/cron.allow and /etc/at.allow files (if they exist).  
</p>
<pre>nano /etc/at.deny</pre>  
<pre>nano /etc/at.deny</pre>  
3. Ladda ner senaste HomeAutomation-mjukvara till din PC. http://karpero.mine.nu/ha/index.php?page=download&amp;hl=sv_SE  
<p>3. Download the latest version of the HomeAutomation software to your PC,&nbsp; http://karpero.mine.nu/ha/index.php?page=download&amp;hl=sv_SE  
 
</p><p>4. Unzip and place the files into /home/web/HA on your B3.<br />  
4. Packa upp i /home/web/HApå din B3<br>
</p>
 
<p>7. HomeAutomation needs the timezone to be set in Appache2. Edit the file php.ini:<br />
5. Editera konfigurationsfilen /home/web/HA/config_sample_linux.php. Sätt sökvägen i filen till: /home/web/HA .
</p>
 
6. Döp om konfigurationsfilen config_sample_linux.php till config.php
 
7. Sätt tidszon för Appache2. Editera filen php.ini.<br>
<pre>nano /etc/php5/apache2/php.ini
<pre>nano /etc/php5/apache2/php.ini
</pre>
</pre>  
Ändra date.timezone till följande:<br>
<p>Change the "date.timezone" to match your location (in example Europe/Stockholm).<br />
</p>
<pre>”date.timezone = Europe/Stockholm”
<pre>”date.timezone = Europe/Stockholm”
</pre>
</pre>  
<br>
<p>8. Restart Apache:
 
</p>
8. Starta om B3 för att php-ändringarna ska ta
<pre>apachectl restart
 
</pre>  
9. Lägg till en databas för HomeAutomation. Installera myPhPAdmin på B3.<br>
<p>9. Change the ownership and priviliges for the folder /home/web/HA:<br />
<pre>apt-get install phpMyAdmin
</p>
</pre>
<pre>chmod -R 755 /home/web/HA/
Skapa databasen<br>
</pre><pre>chown -R www-data:www-data /home/web/HA/
<pre>mysqladmin create &lt;välj-databas-namn&gt;</pre>
</pre>
10. Logga in på http://b3/HA/ och följ instruktionerna.
<p>10. Add a database for HomeAutomation. <br />
 
</p>
11. För databasen: ange Databasnamnet du skapat
<pre>mysqladmin create HADatabase</pre>
 
<p>11. Open a web browser to configure HomeAutomation. Browse to http://b3/HA/ and follow the instructions.
Usr: root
</p><p>Regarding the database information, use the following information:  
 
</p><p>Database name:"HADatabase"&nbsp;
Psw: ”” (dvs tomt)
</p><p>Usr: root
 
</p><p>Psw: ”” (empty)<br />
11. Konfigurering av HomeAutomation via UIt http://b3/HA/ <br>a. Uppdatera enheter från tellstick under menyn ”Enheter” <br>b. Ev behövs det en inlärning av Nexa-enheter från web-UIt också.. dvs: <br>i. Tryck på learn-knappen på NEXA<br>ii. Slå på din enhet under menyn Enheter.<br>iii. Se till att din enhet blir syncad med Tellsticken.. dvs blinkar.
</p>
 
<br />  
<br>  
<p>I needed to edit the path to Tdtool. Click the Settings menu and change the Tdtool path to:</p>
 
<pre>/usr/bin/</pre>
Information hämtad från: http://forum.excito.net/viewtopic.php?f=6&amp;t=2181 och http://forum.excito.net/viewtopic.php?f=11&amp;t=2882
<br />  
 
<br>  
 
9. Koppla in din NEXA-mottagare i väggen och i en lampa och synca den:  
 
a. Tryck på learn-knappen på NEXA<br>b. På kommandoraden, kör: rfcmd /dev/tellstick codeswitch A 1 1<br>c. Se till att din NEXA-enhet blir syncad med Tellsticken.. lampan blinkar. <br>  


<br>
<h1> Connecting your receiver units  </h1>
<p>1. Connect your receiver unit/units into a wall outlet.
</p><p>2. Connect a lamp in the receiver unit.
</p><p>3. Turn the lamp power switch on (lamp will not lit).
</p>
<h1> Configuring your receiver units in HomeAutomation  </h1>
<p>1. Open a web browser. Browse to http://b3/HA
</p><p>2. Log in with username 'admin' and password 'admin'.
</p><p>3. Import your receiver units from the earlier edited tellstick config file (repeat this step every time you have edited the file: /etc/tellstick.conf).<br />
</p><p>3.1 Click the menu "Konfiguration" - "Enheter".<br />
</p><p>3.2 Click the text "Uppdatera från Tellstick".
</p><p>4. Sync your NEXA units from the web UI:
</p><p>4.1. In the UI, click the menu "Enheter".<br />
</p><p>4.2. Press the learn-button on one NEXA unit.
</p><p>4.3. Click the lamp on in the web UI.
</p><p>4.4. Make sure that the unit gets synched, the connected lamp will blink.
</p><p><br />
</p><p>Now should everything be in place for starting to play with the settings and scheduling in HomeAutomation!<br />
</p><p>Good luck&nbsp;:)
</p><p><br />
</p>

Latest revision as of 03:21, 28 July 2015

This guide will help you to install the fantastic software HomeAutomation and the very neat piece of hardware Telldus Tellstick on a B3.

The information here is collected from various threads on http://forum.excito.com/, thank you DanielM and Moloko!


More about HomeAutomation is found here: http://karpero.mine.nu/ha/

More about Tellstick is found here: http://www.telldus.se

Install Tellstick

Conditions

  • Tellstick not connected to B3
  • Logged in as root on B3


1. Install telldus-core on B3. First edit the file /etc/apt/sources.list with for example nano:

nano /etc/apt/sources.list


Add the following line:

deb http://download.telldus.com/debian/ stable main 


Save and exit from nano.

2. The Telldus public key is needed. Run the command:

wget -q http://download.telldus.se/debian/telldus-public.key -O- | apt-key add -

The key fingerprint is

70C4 10C9 D73D 53E8 38B3 1C58 5A94 9181 E501 EA76
Telldus Technologies AB <info.tech@telldus.se>

3. Update the repository list by running the command:

apt-get update


4. Install the latest Telldus core:

apt-get install telldus-core


5. Insert the Tellstick into B3

6. To add receiver units, edit the file /etc/tellstick.conf

nano /etc/tellstick.conf

Adjust the config file to your receiver units. In this case: 1pcs NEXA NEYCR-1000 and 1pcs NEXA LWMR-210.

deviceNode = "/dev/tellstick"
device {
id = 1
name = "Office"
protocol = "arctech"
model = "codeswitch"
parameters {
house = "112233"
unit = "1"
}
}

device {
id = 2
name = "Outside"
protocol = "arctech"
model = "selflearning-dimmer"
parameters {
house = "445566"
unit = "1"
}
} 

After editing the file restart the service:

/etc/init.d/telldusd restart

Some notes for tellstick.conf.

  • Change the values after the "house" parameter to a randomly chosen number. The uniqe numbers will make sure your units do not interfere with other units. Read about the Tellstick config file here: http://developer.telldus.se/wiki/TellStick_conf.
  • If using 'model = "codeswitch" ' the 'house' parameter should be a letter.
  • If you want to add more receiver units add more units to this configuration file.

7. Add an udev rule for the tellstick. Create the file:

nano /etc/udev/rules.d/99-tellstick.rules

Add the content:

KERNEL=="ttyUSB*", BUS=="usb", SYSFS{idVendor}=="1781", SYSFS{idProduct}=="0c30", NAME="tellstick", GROUP="www-data"

8. Reboot B3.

Install HomeAutomation


1. First of all install AT for scheduling on B3.

apt-get install at

2. Remove the user www-data from the files: /etc/cron.deny, /etc/at.deny, /etc/cron.allow and /etc/at.allow files (if they exist).

nano /etc/at.deny

3. Download the latest version of the HomeAutomation software to your PC,  http://karpero.mine.nu/ha/index.php?page=download&hl=sv_SE

4. Unzip and place the files into /home/web/HA on your B3.

7. HomeAutomation needs the timezone to be set in Appache2. Edit the file php.ini:

nano /etc/php5/apache2/php.ini

Change the "date.timezone" to match your location (in example Europe/Stockholm).

”date.timezone = Europe/Stockholm”

8. Restart Apache:

apachectl restart

9. Change the ownership and priviliges for the folder /home/web/HA:

chmod -R 755 /home/web/HA/
chown -R www-data:www-data /home/web/HA/

10. Add a database for HomeAutomation.

mysqladmin create HADatabase

11. Open a web browser to configure HomeAutomation. Browse to http://b3/HA/ and follow the instructions.

Regarding the database information, use the following information:

Database name:"HADatabase" 

Usr: root

Psw: ”” (empty)


I needed to edit the path to Tdtool. Click the Settings menu and change the Tdtool path to:

/usr/bin/


Connecting your receiver units

1. Connect your receiver unit/units into a wall outlet.

2. Connect a lamp in the receiver unit.

3. Turn the lamp power switch on (lamp will not lit).

Configuring your receiver units in HomeAutomation

1. Open a web browser. Browse to http://b3/HA

2. Log in with username 'admin' and password 'admin'.

3. Import your receiver units from the earlier edited tellstick config file (repeat this step every time you have edited the file: /etc/tellstick.conf).

3.1 Click the menu "Konfiguration" - "Enheter".

3.2 Click the text "Uppdatera från Tellstick".

4. Sync your NEXA units from the web UI:

4.1. In the UI, click the menu "Enheter".

4.2. Press the learn-button on one NEXA unit.

4.3. Click the lamp on in the web UI.

4.4. Make sure that the unit gets synched, the connected lamp will blink.


Now should everything be in place for starting to play with the settings and scheduling in HomeAutomation!

Good luck :)