Difference between revisions of "Spacecontrol/HomeAutomation Installation"

From Whitespace (Hackerspace Gent)
Jump to: navigation, search
(Configuration)
(Configuration)
 
(One intermediate revision by one user not shown)
Line 23: Line 23:
  
 
== Configuration ==
 
== Configuration ==
The rest of the configuration can be done through the webinterface. Just point your browser to your installation location. In out case that's http://gatekeeper.
+
The rest of the configuration can be done through the webinterface. Just point your browser to your installation location. In our case that's http://gatekeeper.
  
 
/etc/php5/cgi/php.ini  
 
/etc/php5/cgi/php.ini  
Line 43: Line 43:
 
https://wiki.ubuntu.com/Lighttpd%2BPHP<br />
 
https://wiki.ubuntu.com/Lighttpd%2BPHP<br />
 
http://www.ubuntugeek.com/lighttpd-webserver-setup-with-php5-and-mysql-support.html
 
http://www.ubuntugeek.com/lighttpd-webserver-setup-with-php5-and-mysql-support.html
 +
 +
 +
 +
 +
Some ideas on HomeAutomation development can be found [[../HomeAutomation Development|here]]:

Latest revision as of 15:39, 5 September 2011

Installation[edit]

To run this software we will use the low power BeagleBoard we have laying idly by. This board is running Ubuntu 11.04. First step is to install all necessary packets, simply do:

sudo apt-get install lighttpd php5-cgi mysql-client mysql-server php5-mysql php5-cli at

Now we need to enable php support in lighttpd. The module needed to do this is called fastcgi. After that a reload is required so the changes take effect.

sudo lighty-enable-mod fastcgi 
sudo lighty-enable-mod fastcgi-php
sudo service lighttpd force-reload

To test if everything is working so far create a file /var/www/index.php with the following containing "<?php phpinfo(); ?>". Now browse to the device your installing on and you should see a overview page of your php installation.

Then download the zip file containing the latest stable release from the website. That's version 2.0.2 in our case. Unzip and copy the entire content to /var/www. The ownership of all files was set to www-data.

sudo chown www-data:www-data -R *

The last step of the installation is to copy the configuration file and fill in the path of your installation.

cp /var/www/config_smaple /var/www/config.php

Configuration[edit]

The rest of the configuration can be done through the webinterface. Just point your browser to your installation location. In our case that's http://gatekeeper.

/etc/php5/cgi/php.ini

date.timezone = Europe/Brussels

create database homeautomation;
create user 'homeautomation'@'localhost' identified by 'tellstick';
grant all privileges on homeautomation.* to 'homeautomation'@'localhost' with grant option;

After a while of not getting the times events to work I noticed that the time setting on the BeagleBoard was of because it was set to the wrong timezone. If you need to update the timezone setting in Ubuntu on the command line use this command.

dpkg-reconfigure tzdata

Links:[edit]

https://wiki.ubuntu.com/Lighttpd%2BPHP
http://www.ubuntugeek.com/lighttpd-webserver-setup-with-php5-and-mysql-support.html



Some ideas on HomeAutomation development can be found here: