-
Notifications
You must be signed in to change notification settings - Fork 25
Installation
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.
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.
Install Node.js, NPM and Mosquitto. Please follow your distribution's guides to install them.
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
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")
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 $HOMA_BASEDIR/misc/mosquitto.service
$ sudo systemctl start mosquitto
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).
tbd
tbd