Installation

Get the packages

Two components are needed to install Domoweb :

  • domogik-mq : the message queue component used by all components which want/need to use the message queue (Domogik, Domoweb, ...)
  • domoweb

You have to install Domogik-mq only if you don’t install Domoweb on the same server as Domogik. Please do as you did for Domogik-mq installation during installing Domogik and just set the install as client instead of master.

Note

The following commands assume that you are using the /opt/dmg/ folder as the root folder for Domoweb. And so Domoweb will be installed in the /opt/dmg/domoweb/ folder.

Download Domoweb :

$ cd /opt/dmg
$ wget --content-disposition https://github.com/domogik/domoweb/archive/0.5.2.tar.gz
$ tar xvzf domoweb-0.5.2.tar.gz
$ ln -s domoweb-0.5.2 domoweb
$ cd domoweb

Launch the installation script

Run the install script. If needed the install script provide options:

$ sudo python install.py -h
Usage: install.py [options]

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  --uninstall           Uninstall Domoweb
  --simul               Simulation mode for Uninstall
  --nodeps              Do not install dependencies
  -u USER, --user=USER  User that will run Domoweb (default: domoweb)
  --libdir=LIBDIR       Folder for domoweb lib files (default:
                        /var/lib/domoweb)
  --logdir=LOGDIR       Folder for domoweb log files (default:
                        /var/log/domoweb)
  --piddir=PIDDIR       Folder for domoweb pid files (default:
                        /var/run/domoweb)
  --noconfig            Do not install Init and /etc files
  --nodbupdate          Do not update the Domoweb DB
  --notest              Do not test Domoweb Installation

If you are ready launch it:

$ sudo ./install.py

The first step will install all required dependencies.

 [ Installing setuptools... ]
Setuptools version 0.6c11 or greater has been installed.
(Run "ez_setup.py -U setuptools" to reinstall or upgrade.)
 [ Installing dependencies... ]
Searching for django==1.4
Best match: Django 1.4
Processing Django-1.4-py2.7.egg
Django 1.4 is already the active version in easy-install.pth
Installing django-admin.py script to /usr/bin

Using /usr/lib/python2.7/site-packages/Django-1.4-py2.7.egg
Processing dependencies for django==1.4
Finished processing dependencies for django==1.4
...

The script will prompt for the system user that will launch DomoWeb. You should keep the default choice.

[ Checking user ] Which user will run domogik (default : domoweb)? [ Looking for user domoweb ] ==> User domoweb found

The script will now create the required folders, and assign them to the domoweb user.

[ Checking /var/lib/domoweb folder ]
[ Updating rights for user domoweb[1000] ]
[ Checking /var/log/domoweb folder ]
[ Updating rights for user domoweb[1000] ]
[ Checking /var/run/domoweb folder ]
[ Updating rights for user domoweb[1000] ]

If you already have DomoWeb configuration files, you will be asked for keeping them or not.

 [ Installing /etc/domoweb.cfg ]
You already have Domoweb configuration files. Do you want to keep them ? [Y/n] Y

The script will next install the system files.

[ Installing /etc/default/domoweb ]
[ Configuring /etc/default/domoweb ]
[ Installing /etc/rc.d/domoweb ]
[ Installing /etc/logrotate/domoweb ]

Database creation or update if already exist (it is not the Domogik database : it is a local sqlite database)

[ Updating Domoweb DB... ]
Syncing...
Creating tables ...
Installing custom SQL ...
Installing indexes ...
Installed 0 object(s) from 0 fixture(s)

Synced:
 > django.contrib.auth
 > django.contrib.contenttypes
 > django.contrib.sessions
 > django.contrib.messages
 > django.contrib.sites
 > django.contrib.admin
 > south

Not synced (use migrations):
 - domoweb
(use ./manage.py migrate to migrate these)

 domoweb
  (*) 0001_initial
  (*) 0002_auto__add_page__add_pagetheme
  (*) 0003_auto__del_field_page_theme_id__add_field_page_left__add_field_page_rig
  (*) 0004_root_page
  (*) 0005_auto__chg_field_page_right__del_unique_page_right__chg_field_page_id__


 [ Apply DB migration script ]
Running migrations for domoweb:
- Nothing to migrate.
 - Loading initial data for domoweb.
Installed 0 object(s) from 0 fixture(s)

The final test to check the Domoweb installation.

 ==> Everything seems to be good, DomoWeb should be installed correctly.
 ==> Testing installation
Please press Enter when ready.

[ Test imports ]
==> Imports are good
[ Checking global config file ]
==> Global config file exists and contains right stuff
[ Test user / config file ]
==> Domogik's user exists and has a config file
[ Check user config file contents ]
==> Config file correctly loaded
[ Checking init.d / rc.d ]
==> /etc/init.d/domoweb or /etc/rc.d/domoweb found with good permissions
[ Checking Domoweb DB ]
==> /var/lib/domoweb/domoweb.db found

==> ================================================== <==
==>  Everything seems ok, you should be able to start  <==
==>       DomoWeb with /etc/init.d/domoweb start       <==
==>             or /etc/rc.d/domoweb start             <==
==>  DomoWeb UI is available on                        <==
==>                            http://127.0.0.1:40404/ <==
==> ================================================== <==

If you are a already a Domoweb 0.4 user

You will need to upgrade your configuration file : /etc/domoweb.cfg.

Upgrade the rest_url value with the new port and path in the url : the REST server on Domogik side is now included in the Administration component. For a basic configuration, replace 40405 by 40406 and add /rest at the end of the url.

For example: ::
rest_url = ‘http://127.0.0.1:40405
Will become : ::
rest_url = ‘http://127.0.0.1:40406/rest

Activate SSL support

If you wish to use the microphone with Domoweb to speak to the butler, you will need to use configure Domoweb to use SSL. You can simply activate ssl by executing the ssl_activate.sh script :

./ssl_activate.sh

A self signed certificate will be generated and the configuration file /etc/domoweb/cfg will be upgraded.

Make Domoweb start with your computer

For Debian or Ubuntu systems:

$ sudo update-rc.d domoweb defaults

Start Domoweb

sudo /etc/init.d/domoweb start

Now, you can access UI on this url : http://127.0.0.1:40404/

You will need a login and password to access Domoweb. You can create a new account in Domogik administration or use the default one :

  • login = admin
  • password = 123

To change the password, you can go in Domogik administration.

Use Domoweb

Currently, to use Domoweb, you should use Chrome or Chromium browsers to get the best performances. Domoweb will of course work fine with Firefox, but it will be slower.

Uninstall

$ sudo python install.py --uninstall