Standard installation

Installation

Note

  • These examples assume Debian or another apt-based distribution (Ubuntu, etc). Adjust accordingly (eg, use yum instead if using RedHat-based distribution).
  • Domogik includes its own xPL hub. If you are running another xPL hub on your target machine (xpl-perl, etc), you will have to stop it before installation.

Todo

Mac installation

Dependencies

Check your Python version with:

python -V

Warning

Right now Domogik requires Python 2.7. Python 3 is not (yet) supported.

If you don’t already have Python 2.7 or above (you have it if you are running a recent Linux system), then you can run for example:

$ apt-get install python2.7
$ ln -sf /usr/bin/python2.7 /usr/bin/python

Even if you have python2.7 or higher installed, check that the development package is also installed, or do (replace 2.X with your version):

$ apt-get install python2.7-dev gcc

Install SSL librairies:

$ apt-get install libssl-dev

Install librairies for mysql access and command line client:

$ apt-get install libmysqlclient-dev mysql-client

Mysql server

Note

  • If you have already a Mysql server installed, you will only have to create the Domogik database.
  • It is highly recommended to use the innodb engine (which can be enabled in /etc/mysql/my.cnf)

Install packages for mysql server:

$ apt-get install mysql-server

Log on the mysql database as root user:

$ mysql -u root -p
Enter password:

Create a database called “domogik”:

mysql> CREATE DATABASE domogik;
Query OK, 1 row affected (0.00 sec)

Create the user “domogik” to use the new database:

mysql> GRANT ALL PRIVILEGES ON domogik.* to domogik@localhost IDENTIFIED BY 'domopass';
Query OK, 0 rows affected (0.00 sec)

mysql>exit

Download Domogik

Go on Download to get Domogik. You will get a file named domogik-<release>.tgz. Download it and extract it:

$ wget http://repo.domogik.org/...
$ tar xvzf domogik-<release>.tgz
$ cd domogik-<release>

Install Domogik

From domogik-<release> folder, run the install:

$ sudo ./install.sh

Note

During installation, a new user will be created if necessary.

If you want to use the C hub instead of the python hub (the default one), use the –hub_c option. See here for more informations on the xpl hubs.

You will be asked for the following questions:

If you want to use a proxy, please set it now. It will only be used during the installation. (ex: http://1.2.3.4:8080)

During the installation, some python librairies could be downloaded. If you use a proxy, you must set it here.

Which user will run domogik, it will be created if it does not exist yet? (default : domogik)

System user that will launch Domogik. You should keep the default choice.

If the choosen user doesn’t exist, you will have to answser following questions:

Enter new UNIX password:
...
Retype new UNIX password:
...
Changing the user information for domogik
Enter the new value, or press ENTER for the default
    Full Name []:
    Room Number []:
    Work Phone []:
    Home Phone []:
    Other []:
Is the information correct? [Y/n]
...

Enter twice a password for the user and eventually, fill values about the new user:

You already have a domogik.cfg file. Do you want to keep it ? [Y/n]

If you already have a Domogik config file, you will be asked for keeping it or not:

Which interface do you want to bind to? (default : lo) :

To use Domogik only on a local computer, choose lo. To access it from another computer or use multi host features, choose the appropriate network interface (e.g. : eth0):

If you need to access Domogik from outside, you can specify an IP now :

Used to access to Domogik over the internet. You can set your public IP here (depending on your configuration, you could need to create a port redirection on your router. Warning : Domogik is not yet secure, use this with caution!

You need to have a working Mysql server with a domogik user and database.
You can create it using these commands (as mysql admin user) :
 > CREATE DATABASE domogik;
 > GRANT ALL PRIVILEGES ON domogik.* to domogik@localhost IDENTIFIED BY 'randompassword';
Press Enter to continue the installation when your setup is ok.

If you have installed Mysql server and create the Domogik database, just press Enter.

Set connection information for the database:

Please set your mysql parameters.
Username : domogik
Password : domopass
Port [3306] :
Host [localhost] :
Database name [domogik]:
Your database already contains some tables, do you want to drop them. If you choose No, new items will *NOT* be installed ? [Y/n]

In case the Domogik database is not empty (it is not the first installation), you will get this warning.
Depending on your needs choose the appropriate option. Y choice will delete all existing data.
Everything seems to be good, Domogik should be installed correctly.
I will start the test_config.py script to check it.
Please press Enter when ready.

Just press enter to start the check script:

==> ================================================== <==
==>  Everything seems ok, you should be able to start  <==
==>       Domogik with /etc/init.d/domogik start       <==
==>             or /etc/rc.d/domogik start             <==
==> ================================================== <==

The installation is finished and seems to be OK.

Optional : postgresql (instead of mysql)

If you wish to use postgresql instead of mysql

  • Create your database
  • Edit your /etc/domogik/domogik.cfg file and put database information : db_type (postgresql), db_user, db_password...

Make Domogik start with your computer

For Debian or Ubuntu systems:

$ sudo update-rc.d domogik defaults

For Archlinux: add @domogik at the very end of the line starting with DAEMON.

Start domogik

$ sudo /etc/init.d/domogik start
* Starting xPL (python version)... Done.
* Starting Manager (with -d -r -p -E)... Done.
* Updating packages cache... Done

It will start :

  • The xpl hub
  • The Domogik manager on this host
  • The database manager and the REST interface module (which will take in account the parameters you defined in your configuration file : host, IP...)

Next step : domoweb, the web user interface

You can now install Domoweb, the web user interface.

It doesn’t work?