SmartHomeNG  is a software that serves a basis for home automation. It interconnects multiple devices using plugins to access their specific interfaces. This file contains basic information about the basic directories of SmartHomeNG.
Additional information can be found in the SmartHomeNG Wiki.
|SmartHomeNG was built using the Pycharm IDE.|
|The admin interface of SmartHomeNG was built using the WebStorm IDE.|
|bin||the main python file is based here|
|dev||if you plan to create a plugin then this is the folder you want to have a closer look at|
|doc||Source files for the user- and developer documentation|
|etc||the three basic configuration files smarthome.yaml, module.yaml, plugin.yaml, logic.yaml and logging.yaml are located here, you will edit these files to reflect your basic settings|
|items||put here your own files for your items|
|lib||some more core python modules are in this directory. You won't need to change anything here|
|logics||here your logic files are put|
|modules||here are all loadable core-modules located (one subdirectory for every module)|
|plugins||here are all plugins located (one subdirectory for every plugin). The plugins have to be installed from a separate repository (smarthomeNG/plugins)|
|scenes||the scenes are stored here|
|tests||The code for the automated travis tests is stored here|
|tools||there are some tools which help you for creating an initial configuration|
|var||everything that is changed by smarthome is put here, e.g. logfiles, cache, sqlite database etc.|
As of Version 1.5 the old conf format will still be valid but will be moved out of the docs since it's deprecated now for some time.
Upon installation you will need to create this file and specify your location.
# smarthome.yaml # look e.g. at http://www.mapcoordinates.net/de lat: '52.52' lon: '13.40' elev: 36 tz: Europe/Berlin
Upon installation you will need to create this file and configure the modules and their parameters. On first start of SmartHomeNG this file is created from
An example is shown below:
# module.yaml http: module_name: http starturl: admin admin: module_name: admin #enable, if mqtt protocol is going to be used #mqtt: # module_name: mqtt
Upon installation you will need to create this file and configure the plugins and their parameters. On first start of SmartHomeNG this file is created from
An example is shown below:
# plugin.yaml database: plugin_name: database driver: sqlite3 connect: - database:./var/db/smarthomeng.db - check_same_thread:0 cli: plugin_name: cli ip: 0.0.0.0 update: True websocket: plugin_name: visu_websocket knx: plugin_name: knx host: 127.0.0.1 port: 6720 ow: plugin_name: onewire smartvisu: plugin_name: visu_smartvisu smartvisu_dir: /var/www/html/smartVISU
In the logic.conf you specify your logics and when they will be run.
On first start of SmartHomeNG this file is created from
An example is shown below
# etc/logic.yaml AtSunset: filename: sunset.py crontab: sunset
This directory contains one or more item configuration files. The filename does not matter, except it has to end with '.yaml'.
# items/global.yaml global: sun: type: bool attribute: foo
This directory contains your logic files. Simple or sophisitcated python scripts. You could address your smarthome item by
If you want to read an item call
sh.item.path() or to set an item
# logics/sunset.py if sh.global.sun(): # if sh.global.sun() == True: sh.gloabl.sun(False) # set it to False