Skip to content
binarybucks edited this page Apr 30, 2013 · 30 revisions

This guide describes all required steps to install a server instance for the HomA smart home framework. Due to its distributed and modular architecture, many components can be installed on different machines on the same network. For the sake of simplicity, this document assumes that all components are installed on a single system.

Notes

During the installation guide, the term $HOMA_BASEDIR refers to the root directory of the homA project. Please substitute the correct path with the directory to which you clone the code during the Download step.

This guide is aimed at users that have a basic knowledge of Linux and the command-line. In case you encounter any problems, you need help or you just want to say hi, please feel free to create an issue or join our Google+ Community

Dependencies

Install Node.js, NPM and Mosquitto. Please follow your distribution's guides to install them.

Download

Clone the code into a directory of your choice. This directory will from now on be referred to as $HOMA_BASEDIR.

$ git clone https://github.com/binarybucks/homA.git $HOMA_BASEDIR

Settings

Create the directory where the basic configuration file is saved and add the required items.

$ sudo mkdir /etc/homa
$ sudo sh -c "echo HOMA_BASEDIR='$HOMA_BASEDIR' > /etc/homa/homa.conf"
$ sudo sh -c "echo HOMA_BROKER_HOST='localhost' >> /etc/homa/homa.conf"
$ sudo sh -c "echo HOMA_BROKER_PORT='1883' >> /etc/homa/homa.conf"

You probably want to export the configuration items as environment variables to automatically supply them as parameters for some components. Either execute this manually or add it to a file that your login shell sources during startup.

[[ -r /etc/homa/homa.conf ]] && . <(sed '/^export/!s/^/export /' "/etc/homa/homa.conf")

Broker

Enable the persistence option of the previously installed Mosquitto broker in /etc/mosquitto/mosquitto.conf. For debugging purposes it is probably also a good idea to enable some of Mosquitto's logging features.

persistence true
persistence_file mosquitto.db
persistence_location /var/lib/mosquitto/

log_dest syslog
log_type error
log_type warning
log_type notice
connection_messages true
log_timestamp true

If your system is running systemd (e.g. Arch Linux or Fedora) enable the Mosquitto service to start the broker automatically. Otherwise please refer to your distribution's documentation on how to start system services.

$ sudo systemctl enable mosquitto.service
$ sudo systemctl start mosquitto

Webinterface

If you would like to control components that integrate into the HomA smart home framework through a webinterface, please refer to [this guide] (https://github.com/binarybucks/homA/blob/master/interfaces/webinterface/README.md).

App

The HomA Android app is available on the Google Play store. After the installation, provide the network adress of the system where you installed the Mosquitto Broker as the Server Adress in the application settings.

Get it on Google Play

Tools

Some components might require the use of auxiliary tools for configuration purposes. Those are located in the $HOMA_BASEDIR/tools directory and generally don't require complex configuration. In case you exported the configuration items contained in /etc/homa/homa.conf as environment variables previously, these settings are read as default parameters automatically.

Generally, it is a good idea to add at least $HOMA_BASEDIR/tools/publish/publish.js to your path in order to facilitate further steps.

Components

Please refer to the according wiki page for a list of official components and their installation instructions.

Clone this wiki locally