Skip to content
HiroP0 edited this page Mar 9, 2017 · 2 revisions

This document describes configuration and setup procedures required to run Z-Way HA

Setting up config.xml

To run Z-Way Home Automation system, z-way-server configuration file (config.xml which placed into the root Z-Way Server folder) must consists of this directive:

<automation-file>PATH_TO_AUTOMATION_CODEBASE/main.js</automation-file>

where PATH_TO_AUTOMATION_CODEBASE is a root path ofthe home automation code folder. By default, this path is “automation” and configuration look like this:

<automation-file>automation/main.js</automation-file>

Both full and relative paths can be used here.

Setting up config.json

Home Automation system itself configures in the config.json file placed in the HA root code folder and this file must consists a valid JSON object.

For user convenience a config-sample.json is delivered with the system, which provides a minimal configuration and can be copied to config.json for further work.

Top level of the configuration object consists of two keys:

basePath — String, poiniting to the root automation system folder (without “/” at the end). In case of using relative path, this must be calculated from the Z-Way Server root folder.

controller — Object, describes automation controller's configuration

Automation controller's setup

modulesPath — String, pointing to the modules folder (without “/” at the end). In case of using relative path, this must be calculated from the Z-Way Server root folder.

modules — Array of Strings, list of modules which classes Automation Controller will load on startup. Only loaded module classes can be instantiated. Module order is unsignificate.

instances — Array of Objects. Every key is a unique module instance name. Key values is objects constst of two keys: “module” which is a module classname from the list disqussed above and “config” which is a configuration of the particular module instance which will be passed to the instance init() method during instantiation.

Module instances will be created according to the order of the keys of “instances” structure.

Warning! Current Z-Way Home Automation system requires “EventLog” and “ZWave” modules to be always instantiated. First of them creates event logging subsystem and latter enables Z-Wave network bindings.