Giter VIP home page Giter VIP logo

smarthome-1's Introduction

README.md

This file contains basic information about the basic directories of smarthomeNG

directory description
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
etc the three basic configuration files smarthome.conf, plugin.conf and logic.conf are located here, you will edit these files to reflect your basic settings
examples some examples of items, etc. this is only for informational purpose
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
plugins one subdirectory for every plugin is located here
scenes the scenes are 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.

Some more detailed info on the configuration files

etc/smarthome.conf

Upon installation you will need to create this file and specify your location.

# smarthome.conf
# look e.g. at http://www.mapcoordinates.net/de
lat = 52.52
lon = 13.40
elev = 36
tz = 'Europe/Berlin'

etc/plugin.conf

Upon installation you will need to create this file and configure the plugins and their attributes. An example is shown below

[knx]
   class_name = KNX
   class_path = plugins.knx
   host = 127.0.0.1
   port = 6720
#   send_time = 600 # update date/time every 600 seconds, default none
#   time_ga = 1/1/1 # default none
#   date_ga = 1/1/2 # default none
[ow]
    class_name = OneWire
    class_path = plugins.onewire
[visu]
    class_name = WebSocket
    class_path = plugins.visu
    smartvisu_dir = /var/www/html/smartVISU
[cli]
    class_name = CLI
    class_path = plugins.cli
    ip = 0.0.0.0
    update = True
[sql]
    class_name = SQL
    class_path = plugins.sqlite

etc/logic.conf

In the logic.conf you specify your logics and when they will be run. An example is shown below

# etc/logic.conf
[AtSunset]
    filename = sunset.py
    crontab = sunset

items/

This directory contains one or more item configuration files. The filename does not matter, except it has to end with '.conf'.

# items/global.conf
[global]
    [[sun]]
        type = bool
        attribute = foo

logics/

This directory contains your logic files. Simple or sophisitcated python scripts. You could address your smarthome item by sh.item.path. If you want to read an item call sh.item.path() or to set an item sh.item.path(Value).

# logics/sunset.py
if sh.global.sun():  # if sh.global.sun() == True:
    sh.gloabl.sun(False)  # set it to False

smarthome-1's People

Contributors

bmxp avatar cstrassburg avatar greentux avatar hebe2k avatar jumi2006 avatar mhdevel avatar mknx avatar mode2k avatar mptei avatar ohinckel avatar richih avatar roggmaeh avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.